Amazon S3 to Amazon EventBridge claim check with presigned urls

S3 → Default Bus → Transform → Domain Bus → Consumer

Event-driven claim check pattern using S3 and EventBridge. Using Lambda to transform events into domain events with enrichment and presgined urls.

This pattern will listen to S3 events then transform them into Domain events (with enrichment) and have presigned urls back to the S3 object for downstream consumers.
How the claim check pattern works
  • 1. User uploads information into a bucket. In this example an insurance claim has been inserted to be processed.
  • 2. S3 has been configured to send events to EventBridge. This is your default event bus (all AWS accounts have one).
  • 3. Setup an EventBridge rule to only listen for files inserted into the claims folder and S3 objects that have been Created or Deleted
  • 4. Custom code picks up the events, and transforms it into a Domain Event. Events are enriched with data, and the S3 document is presigned with a url for an hour (for downstream consumers).
  • 5. Events are sent to custom domain event bus. In this example our Insurance event bus.
  • 6.Rules are setup for downstream consumers of our Domain Events (ClaimCreated, ClaimProcessed). We make assumptions that when files are removed from this Claim bucket that means that have been processed.
  • 7. Consumers receive the Domain Events and process as they see fit. (This example just logs out, but you could email, send to other targets etc).

Things to know
This pattern makes assumptions about business logic. The bucket in this example is an example of handling company claims. Files in the bucket are to be procesed, once deleted we assume they are processed..

< 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-to-eventbridge-claim-check-pattern

Deploy

cdk deploy


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: cdk delete.

Created by:

David Boyne

David Boyne

Helping people learn about event-driven architectures and serverless

Follow on LinkedIn