• About Me
  • Projects
  • WebApp
  • Archive

Barnaby Baron. Exploring AWS.

  • Building an event-driven architecture using DynamoDB and EventBridge!

Building an event-driven architecture using DynamoDB and EventBridge!

2024-08-21 3 min read Projects Barny Baron

Journey: 📊 Community Builder 📊

Subject matter: Building on AWS

Task: Building an event-driven architecture using DynamoDB and EventBridge!

Using the 6 Pillars of the AWS Well-Architected Framework, Performance Efficiency, Reliability, and Sustainability will be achieved in this build.

This week, I built an event-driven architecture using DynamoDB Streams and EventBridge Pipes.

Pipeline

This project is quite simple but demonstrates how AWS services work together to provide a working solution when notifications are required on specific database conditions.

Resource credit: This architecture was created using guidance from Helio Tarnowski on Medium Here.

What did I use to build this environment?

  • AWS Management Console

What is built?

  • A DynamoDB Table
  • An Eventbridge pipe
  • An SNS Topic

Event Stream

In this task, I built an event-driven architecture using three services; DynamoDB, SNS, and EventBridge.

I created a DynamoDB Table with a Partition Key and a Sort Key.

After the table had been created successfully, I turned on the DynamoDB stream option with a ’new image’ type so all changes to my table were captured.

I then switched over to SNS, created a new standard Topic, and subscribed a temporary email address to it.

Once I had confirmed the subscription in my temporary email, I moved over to EventBridge and created a new EB Pipe.

I configured this with a DynamoDB source of my payments database, filtered with a specific Event pattern to monitor for unauthorised payments, and pointed the target to be my SNS Topic.

To test my setup, I returned to my DynamoDB table and manually created a new item using JSON, the first of which was Authorised.

As expected, no email was received as the EventBridge Pipe is listening for unauthorised payments.

I created a new item in my DB table, again with JSON but this time set the authorisation parameter as ‘Not Authorised’.

After checking my email, I noticed that I had a new item waiting. My SNS Topic had delivered an email to me reporting an unauthorised payment in my DynamoDB Table.

This event-driven architecture showed how we can create scalable and resilient applications with only a few AWS products and services.

Next time?

I could broaden my configuration here in the future by doing the following:

  • Form the project using IaC and use Terraform to create the environment.
  • Create an API with a Cognito Authoriser and schedule PUT items from the Postman platform.

Some of the highlights…

DynamoDB creation:

DynamoDB Stream:

SNS Subscription:

Confirmed Sub:

EventBridge Pipe creation:

EventBridge Pipe filter:

EventBridge Pipe running:

DynamoDB Table authorised item:

DynamoDB Table unauthorised item:

DynamoDB Table display:

Checking for emails:

My interpretation of the architecture:

Architecture

I hope you have enjoyed the article!

Cloud

Community Builder DynamoDB EventBridge
Latest posts
  • Designing a Formula 1 Race Track and gaining insights from Amazon Nova
  • Year 2 - AWS Community Builder
  • Troubleshooting an EKS Pod creation error - Persistent Volume Controller Failed Binding
  • Building an EKS cluster and mounting an S3 bucket within a pod using the CSI Driver
  • Sopra Steria Merch Delivery!
  • AWS Community Builders Application Window!
  • Building a VPC and provisioning an EC2 instance using Modules!
Categories
  • AWS News (84)
  • Projects (29)
  • Exploring (19)
  • Troubleshooting (10)
  • General (8)
  • Quotes (5)
  • Video (3)
Social media
Archive
© 2025 by Barny Baron
Powered by Bilberry Hugo Theme