This article explains how to trigger a lambda function on S3 event notifications . Amazon S3 supports several event notification types and destinations where the notifications can be published. In this article we will be focusing on Lambda Function as an event destination.
1. Navigate to Amazon S3 console at https://console.aws.amazon.com/s3/ .
2. Select S3 bucket to invoke lambda functions on create object event.
3. Click on Properties tab.
4. Scroll down to Event notifications section.
5. Click on Create event notifications and enter Event name.
6. Select Event types for which you want to invoke the lambda function.
7. Scroll down to Destination section, select Lambda Function to trigger on events and click on Save changes.
1. Upload any test file to the configured S3 bucket.
2. Navigate to CloudWatch.
3. Navigate to Log groups for selected lambda function.
4. Validate lambda invocation with entry in Log Streams.