Amazon EventBridge to Amazon Data Firehose to Amazon S3 using Java CDK

Amazon EventBridge → Amazon Kinesis Firehose → Amazon S3

Sets up EventBridge, Data Firehose, and a S3 bucket for event delivery with dynamic partitioning based on metadata.

When a user sends a message to the EventBridge bus, the message gets routed to the EventBridge rule based on the "DetailType". Then, the EventBridge rule sends the "Detail" field value from the message to the rule target Firehose delivery stream. Once the message reaches the Firehose delivery stream, the JsonParsingEngine processes the message to read the "Department" field value, which is used for the S3 prefix. After message processing, the message gets delivered to the targeted S3 bucket by following the calculated S3 prefix based on the "Department" field value.

< 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/eventbridge-firehose-s3-cdk-java

Deploy

cdk deploy


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: cdk destroy.

Created by:

Matt Ridehalgh

Matt Ridehalgh

Matt Ridehalgh is a Solutions Architect at AWS.

Follow on LinkedIn