Amazon S3 to Amazon EventBridge to AWS Lambda

Amazon S3 → Amazon EventBridge → AWS Lambda

Creates an S3 bucket that publishes events to EventBridge that are routed to Lambda.

This pattern contains a sample AWS Cloud Development Kit (AWS CDK) template for creating an AWS S3 bucket with AWS EventBridge notifications turned on
All S3 events in this bucket is sent to AWS EventBridge
This CDK template also deploys a AWS Lambda function which will process the event sent to AWS EventBridge and create a tag for the S3 object that was created
An EventBridge rule is also created to send only the Object Created event of the bucket to the Lambda function

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/s3-eventbridge-lambda-cdk

Deploy

cdk deploy


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

1. Delete the stack: cdk destroy..
2. Confirm the stack has been deleted: aws cloudformation list-stacks --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus"

Created by:

Arun Thangaraj

Arun Thangaraj

Arun is a Cloud Application Architect at AWS Professional Services based out of Dallas, TX.