When receiving events in Lambda from SNS the outer structure of the event will look somewhat like: { "Records": [...] }
In all the tutorials I have seen there has only ever been 1 record in the records field.
Is it safe to make the assumption that the "Records"-array will only ever contain 1 item?
Each SNS notification will contain not more than one message.
Refer Reliability section in SNS FAQ : https://aws.amazon.com/sns/faqs/
Having said that, each lambda function trigger will have just a single record
Just ran into the same thing, and for posterity, I think it is worth adding that in the official AWS tutorial, they rely on there being exactly one record:
https://docs.aws.amazon.com/lambda/latest/dg/with-sns-create-package.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With