serverless: EventBridge event not correctly treat "true"
Bug Report
Description
-
What did you do? Create lambda invoked via event from EventBridge
-
What happened? oops, error đ
-
What shouldâve happened? true not âtrueâ in [{âexistsâ:âtrueâ}]
-
Whatâs the content of your
serverless.ymlfile? https://pastebin.pl/view/8846bc90 -
Whatâs the output you get when you use the
SLS_DEBUG=*environment variable (e.g.SLS_DEBUG=* serverless deploy)
ServerlessError: An error occurred: CarDetailsToDynamoDBCustomEventBridge1 - Failed to update resource. Event pattern is not valid. Reason: exists match pattern must be either true or false. at [Source: (String)"{"detail-type":["Lambda Function Invocation Result - Success"],"source":["lambda"],"detail":{"responsePayload":{"license_plate":[{"exists":"true"}]}}}"; line: 1, column: 141] See details in CloudWatch Log: 2020/03/25/[$LATEST]c8287290ed044dfa98074c2e58e1e8bc.
https://pastebin.pl/view/03bde7c6
Similar or dependent issues:
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 5
- Comments: 20 (6 by maintainers)
Any updates? The issue still persists.
According to the following ticket in the SAM project, Cloudfront team is already working on it: https://github.com/awslabs/serverless-application-model/issues/1455
I can confirm that this now works for me. See activity on this this issue
I tried with this yaml and it deployed correctly:
The same issue was also true for numeric values, but both booleans and numbers now works đ„ł