Better Programming

Advice for programmers.

Follow publication

Member-only story

Exploring the Serverless Event-Driven Architecture

Meet your old friends Terraform, Lambda, SQS, and Python

Geoffrey Mariette
Better Programming
Published in
4 min readApr 1, 2022

--

Photo by Karine Avetisyan on Unsplash

As a developer, you don’t want your end-user to wait for a backend acknowledgment on post-processing event.
As an ops, you don’t want to allow ultra-powerful infrastructure to faster the backend processing time.

Let’s then dig into an event-driven architecture, which will satisfy all your needs:

  1. Fast response time for your end users —acknowledge a submission in a second for example
  2. Easily manageable backend with small pieces of code to maintain (split your post-processing tasks in the background)
  3. Low-cost infrastructure — you pay only for what you consume

As you can see on the schema above, we will deploy here a super simple architecture with three components (I will not mention Cloudwatch for example here, which I assume embed).

To deploy this architecture, I will use a terraform that I will not explain in detail, but still is available over this link: https://github.com/gmariette/medium-eda.

Note that aside from the resources mentioned above, the project also creates the IAM roles used by the lambda functions (please check on the IAM module to understand clearly…

--

--

Geoffrey Mariette
Geoffrey Mariette

Written by Geoffrey Mariette

Working in IT for 10 years, just want to share with others.

No responses yet

Write a response