-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
I am getting this message when calling EventBridge API destination from a step function:
2024-09-18 13:46:12 2024-09-18T20:46:12.406 INFO --- [et.reactor-4] l.s.events.v1.provider : Unable to send event notification {'version': '0', 'id': 'ab2dace3-21a3-4b24-a600-dfe84dc6bc68', 'detail-type': 'provisionSuccess', 's... to target {'RuleArn': 'arn:aws:events:us-east-1:000000000000:rule/lambdacontrolplanestackcontrolplanesbtEventManagerSbtEventBusB93F9CC7/lambda-controlplane-stack-controlplanesbttenantMan-c33001b7', 'Arn': 'arn:aws:events:us-east-1:000000000000:api-destination/control-plane-api-destination/56549e9b-57d7-45f3-93f9-9e49dc15910e', 'HttpParameters': {'PathParameterValues': ['$.detail.tenantId']}, 'Id': 'Target0', 'InputPath': '$.detail.jobOutput', 'RoleArn': 'arn:aws:iam::000000000000:role/lambda-controlplane-stack-controlplanesbttenantMan-a82faaf0'}: Expecting value: line 1 column 1 (char 0)
This indicates the input json is not syntactically correct: perhaps the single quotes could be the issue?
Here is the PUT event:
2024-09-18 13:46:12 2024-09-18T20:46:12.407 INFO --- [et.reactor-4] l.request.internal.aws : AWS events.PutEvents => 200; 000000000000/us-east-1; PutEventsRequest({'Entries': [{'Source': 'applicationPlaneEventSource', 'Resources': ['arn:aws:states:us-east-1:000000000000:stateMachine:lambda-core-appplane-stack-provisioningScriptJobpro-cf8bfc74', 'arn:aws:states:us-east-1:000000000000:execution:lambda-core-appplane-stack-provisioningScriptJobpro-cf8bfc74:61e35c89-e35b-4a50-a5bb-0de265a30626'], 'DetailType': 'provisionSuccess', 'Detail': '{"tenantId": "6f8ba542-91f9-43d4-975b-9b32e189ec37", "jobOutput": {"tenantConfig": {"userPoolId": "poolID", "appClientId": "clientId", "apiGatewayUrl": "gatewayUrl"}, "tenantStatus": "Complete", "prices": ["price1", "price2"], "tenantName": "test1", "email": "me@nowhere.com"}}', 'EventBusName': 'arn:aws:events:us-east-1:000000000000:event-bus/lambdacontrolplanestackcontrolplanesbtEventManagerSbtEventBusB93F9CC7'}]}, headers={'Accept-Encoding': 'identity', 'X-Amz-Target': 'AWSEvents.PutEvents', 'Content-Type': 'application/x-amz-json-1.1', 'User-Agent': 'Boto3/1.35.14 md/Botocore#1.35.14 md/awscrt#0.21.5 ua/2.0 os/linux#5.15.153.1-microsoft-standard-WSL2 md/arch#x86_64 lang/python#3.11.9 md/pyimpl#CPython cfg/retry-mode#legacy Botocore/1.35.14', 'x-localstack-data': '{}', 'host': 'localhost:4566', 'X-Amz-Date': '20240918T204612Z', 'Authorization': 'AWS4-HMAC-SHA256 Credential=000000000000/20240918/us-east-1/events/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target;x-localstack-data, Signature=6d55e6650dec9af6aa2499c01047a5c1eb860246fe717968a54107e6171c0781', 'amz-sdk-invocation-id': '86d7e001-204e-40ec-8c95-75fb63257e0f', 'amz-sdk-request': 'attempt=1', 'Content-Length': '851', 'x-moto-account-id': '000000000000'}); PutEventsResponse({'FailedEntryCount': 0, 'Entries': [{'EventId': 'ab2dace3-21a3-4b24-a600-dfe84dc6bc68'}]}, headers={'Content-Type': 'application/x-amz-json-1.1', 'Content-Length': '89', 'x-amzn-requestid': 'dc155ac9-70e8-4c7e-9f3b-952db2fa39ba'})
The request does have mixed quotes.
This seems to be the event from the resource browser console:
--
2 | | "resourceType": "events",
3 | | "resource": "putEvents",
4 | | "region": "us-east-1",
5 | | "parameters": {
6 | | "Entries": [
7 | | {
8 | | "Detail": {
9 | | "tenantId": "6f8ba542-91f9-43d4-975b-9b32e189ec37",
10 | | "jobOutput": {
11 | | "tenantConfig": {
12 | | "userPoolId": "poolID",
13 | | "appClientId": "clientId",
14 | | "apiGatewayUrl": "gatewayUrl"
15 | | },
16 | | "tenantStatus": "Complete",
17 | | "prices": [
18 | | "price1",
19 | | "price2"
20 | | ],
21 | | "tenantName": "test1",
22 | | "email": "me@nowhere.com"
23 | | }
24 | | },
25 | | "DetailType": "provisionSuccess",
26 | | "EventBusName": "arn:aws:events:us-east-1:000000000000:event-bus/lambdacontrolplanestackcontrolplanesbtEventManagerSbtEventBusB93F9CC7",
27 | | "Source": "applicationPlaneEventSource"
28 | | }
29 | | ]
30 | | }
31 | | }
----- put event in cdk.out
":states:::events:putEvents","Parameters":{"Entries":[{"Detail":{"tenantId.$":"$.detail.tenantId","jobOutput":{"tenantConfig.$":"$.startLambda.Payload.output.tenantConfig","tenantStatus.$":"$.startLambda.Payload.output.tenantStatus","prices.$":"$.startLambda.Payload.output.prices","tenantName.$":"$.startLambda.Payload.output.tenantName","email.$":"$.startLambda.Payload.output.email"}},"DetailType":"provisionSuccess","EventBusName":"",
This is the task definition:
"notifySuccessEventBridgeTask": {
43 | | "End": true,
44 | | "Type": "Task",
45 | | "ResultPath": "$.notifySuccessEventBridgeTask",
46 | | "Resource": "arn:aws:states:::events:putEvents",
47 | | "Parameters": {
48 | | "Entries": [
49 | | {
50 | | "Detail": {
51 | | "tenantId.$": "$.detail.tenantId",
52 | | "jobOutput": {
53 | | "tenantConfig.$": "$.startLambda.Payload.output.tenantConfig",
54 | | "tenantStatus.$": "$.startLambda.Payload.output.tenantStatus",
55 | | "prices.$": "$.startLambda.Payload.output.prices",
56 | | "tenantName.$": "$.startLambda.Payload.output.tenantName",
57 | | "email.$": "$.startLambda.Payload.output.email"
58 | | }
59 | | },
60 | | "DetailType": "provisionSuccess",
61 | | "EventBusName": "arn:aws:events:us-east-1:000000000000:event-bus/lambdacontrolplanestackcontrolplanesbtEventManagerSbtEventBusB93F9CC7",
62 | | "Source": "applicationPlaneEventSource"
63 | | }
64 | | ]
65 | | }
66 | | },
Expected Behavior
The API is invoked.
How are you starting LocalStack?
With a docker-compose file
Steps To Reproduce
How are you starting localstack (e.g., bin/localstack
command, arguments, or docker-compose.yml
)
docker compose up
Environment
- OS: WSL/Docker
- LocalStack:
LocalStack version: 3.7.3dev28
LocalStack Docker image sha:
LocalStack build date: 9/17/2024
LocalStack build git hash:
Anything else?
No response