Setting up Amazon S3 Event Notifications for inventory completion - Amazon Simple Storage Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

Setting up Amazon S3 Event Notifications for inventory completion

You can set up an Amazon S3 event notification to receive notice when the manifest checksum file is created, which indicates that an inventory list has been added to the destination bucket. The manifest is an up-to-date list of all the inventory lists at the destination location.

Amazon S3 can publish events to an Amazon Simple Notification Service (Amazon SNS) topic, an Amazon Simple Queue Service (Amazon SQS) queue, or an Amazon Lambda function. For more information, see Amazon S3 Event Notifications.

The following notification configuration defines that all manifest.checksum files newly added to the destination bucket are processed by the Amazon Lambda cloud-function-list-write.

<NotificationConfiguration> <QueueConfiguration> <Id>1</Id> <Filter> <S3Key> <FilterRule> <Name>prefix</Name> <Value>destination-prefix/source-bucket</Value> </FilterRule> <FilterRule> <Name>suffix</Name> <Value>checksum</Value> </FilterRule> </S3Key> </Filter> <Cloudcode>arn:aws-cn:lambda:us-west-2:222233334444:cloud-function-list-write</Cloudcode> <Event>s3:ObjectCreated:*</Event> </QueueConfiguration> </NotificationConfiguration>

For more information, see Using Amazon Lambda with Amazon S3 in the Amazon Lambda Developer Guide.