Member-only story
Exploring the Serverless Event-Driven Architecture
Meet your old friends Terraform, Lambda, SQS, and Python
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:
- Fast response time for your end users —acknowledge a submission in a second for example
- Easily manageable backend with small pieces of code to maintain (split your post-processing tasks in the background)
- 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…