Lambda
Rationale
Lambda is the service we use for running serverless functions.
The main reasons why we chose it over other alternatives are the following:
- It allows us to execute tasks without having to design any infrastructure.
- It complies with several certifications from ISO and CSA. Many of these certifications are focused on granting that the entity follows best practices regarding secure cloud-based environments and information security.
- It supports many different runtimes, allowing to run code for programming languages like Python, Ruby, Go, among others.
- It supports lambda scheduling, allowing to run lambdas on a scheduled basis. This is especially useful for tasks like CI workers cleaning.
- It integrates with other AWS services, allowing us to easily manage EC2 instances or sending emails via SQS.
- Resources can be written as code using Terraform.
- Lambda logs and performance can be monitored using CloudWatch.
Alternatives
- Cloudflare Workers: We use it to set up security headers with Cloudflare. It does not easily connect with other AWS services.
- Google Functions: It does not easily connect with other AWS services.
- Azure Functions: It does not easily connect with other AWS services.
Usage
We use Lambda for
- cleaning GitLab CI stale machines by using scheduled lambdas.
Guidelines
- You can access the AWS Lambda console after authenticating on AWS.
- Any changes to Lambda's infrastructure must be done via merge requests.
- To learn how to test and apply infrastructure via Terraform, visit the Terraform Guidelines.