Amazon S3 to AWS CloudTrail to Amazon EventBridge

Amazon S3 → CloudTrail → EventBridge

Creates a CloudTrail that routes S3 events to EventBridge

This pattern sends Amazon S3 events to Amazon EventBridge using AWS CloudTrail. The EventBridge event is sent to SQS for monitoring.
Data events are not logged by default. To record CloudTrail data events, supported resources or resource types have to be explicitly added (see the GitHub repo for additional context).
Note that from December 2021, S3 now publishes events directly to EventBridge - this pattern is provided as an alternative approach.

< 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

Deploy

sam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

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

Created by:

Jyoti Rathi

Jyoti Rathi

Cloud Application Architect @ AWS.