-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Labels
aws:snsAmazon Simple Notification ServiceAmazon Simple Notification Servicestatus: confirmedBug report was confirmedBug report was confirmedtype: bugBug reportBug report
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
I am running an SNS topic that publishes to a lambda function. The localstack code reads a type byte object from the lambda function invocation payload here and then tries to dump the result into json here which results in the following error:
sns_pub_0] l.services.sns.publisher : Unable to run Lambda function on SNS message: Object of type bytes is not JSON serializable
Expected Behavior
The payload bytes should be converted to a string before being dumped to json. The error should not be thrown.
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
(Using the standard docker-compose.yaml)
Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)
awslocal sns publish --message file://sns/message.json --topic-arn arn:aws:sns:us-east-1:000000000000:<topic_name>
Environment
- OS: macOS Ventura 13.2.1
- LocalStack: latestAnything else?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
aws:snsAmazon Simple Notification ServiceAmazon Simple Notification Servicestatus: confirmedBug report was confirmedBug report was confirmedtype: bugBug reportBug report