Amazon S3 to Amazon SQS with Amazon EventBridge with wildcard pattern match rule

Amazon S3 → Amazon EventBridge → Amazon SQS

The SAM template deploys an Amazon S3 bucket, an Amazon EventBridge rule with wildcard pattern match having target as an Amazon SQS queue.

This template creates an S3 bucket that publishes events to Amazon EventBridge, an EventBridge rule with wildcard filter to select only the desired events from dynamic subfolders in Amazon S3 bucket and also an Amazon SQS queue as the target.
Once the stack is deployed, we will use upload-to-s3.sh to create dynamic subfolders based on current date and timestamp within the S3 bucket and upload new files.
This will trigger multiple events, however, only the events that will match the wildcard pattern as per the EventBridge rule, will be selected and a message will be sent to the SQS queue.
We will inspect the messages from the SQS queue to validate the same.

< 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-wildcard-sam

Deploy

sam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the content of the Amazon S3 bucket
Delete the stack: sam delete.
See the GitHub repo for detailed instruction.

Created by:

Biswanath Mukherjee

Biswanath Mukherjee

Sr. Solutions Architect working at AWS India.

Follow on LinkedIn