fdiori
fdiori

Reputation: 101

AWS SNS How can I send JSON message to SNS via Javascript

When I try to use with below

Message: Data.json,

it returns error said the message is only be string.

Does anyone has suggestion on this?

Upvotes: 0

Views: 953

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 270254

You can convert a Python object (Data) to a JSON-formatted string with:

Message: json.dumps(Data)

The program will also need to use: import json

Upvotes: 1

Related Questions