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 AWS 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 AWS 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> <CloudFunction>arn:aws:lambda:us-west-2
:222233334444
:cloud-function-list-write</CloudFunction> <Event>s3:ObjectCreated:*</Event> </QueueConfiguration> </NotificationConfiguration>
For more information, see Using AWS Lambda with Amazon S3 in the AWS Lambda Developer Guide.