Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message property should be a JSON escaped string #8

Open
pmcevoy opened this issue Jun 10, 2020 · 0 comments
Open

Message property should be a JSON escaped string #8

pmcevoy opened this issue Jun 10, 2020 · 0 comments

Comments

@pmcevoy
Copy link

pmcevoy commented Jun 10, 2020

Within the example events, the SNS object is JSON. However, the Message property in each event should actually be a string, and thus should be "stringified" JSON if it contains a nested object. When reading the SNS event, every lambda example I am reading indicates to JSON.parse(event.Records[0].Sns.Message) to get the inner object before processing the content.

I understand that you are trying to document the entire structure from the SNS to the inner message object, but it makes the example events harder to use in (say) the "Test" facility of the AWS Lambda page.

Perhaps you can separate the SNS event example and the inner object examples?

Pete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant