Do s3:ObjectCreated:Put event notidfications always contain a single record?

0

Is it possible for s3:ObjectCreated:Put event notifications to contain more than one record/event inside Records, or will Records always contain one event for object created events and is simply a list to accommodate other notification types? I have never seen more than one event inside Records and can not find any clear info in the docs, I've also noticed some official getting started examples loop through Records and some simply do Records[0], e.g. https://docs.aws.amazon.com/lambda/latest/dg/with-s3-example.html

Thanks

1 Answer
1

S3 event notifications will contain one record per notification.

The code you are seeing that references looping through multiple event records is likely sample code for looping through a retrieval of multiple SQS queue items retrieved. You can retrieve multiple records at a time from SQS and then loop through them.

References:

profile pictureAWS
Jen_F
answered 6 months ago
profile pictureAWS
EXPERT
reviewed 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions