This repository contains the code to illustrate the guest lecture on infrastructure as code. The supporting slide deck can be found here.
Illustrate how IaC can be used to manage cloud infrastructure and how it can be leveraged to build resilient and scalable applications.
The code starts with a simple API that handles a single endpiont and triggers an email if it is above a certain temperature.
To ensure reliability and scalability, the email service is extracted to a cloud function. This can scale separately from the API and is more resilient to failures. It also "improves" the latency of the API and does not require waiting for the email to be sent.
To ensure that the application is resilient and scalable, we add dead letter queues and alerting. These will alert us if the application is not behaving as expected.
We also add a monitoring system to the application. This system will alert us if the application is not behaving as expected in a clearer way. We use Sentry as a provider for this.