Description
Thanks for kindly providing the AWS fargate deployment approach to save developers cost. While this approach reduces compute costs compared to EC2 or EKS, it still requires an application load balancer (ALB), which adds a recurring monthly expense.
https://www.runatlantis.io/docs/deployment.html#aws-fargate
graph TD
A[Github PR is created] --> B[Webhook event sent to application load balancer]
B --> C[Trigger Atlantis run in AWS Fargate]
Proposal
I am wondering would it be possible to replace the load balancer with AWS API Gateway?
Since AWS Gateway provides 1 million free tier, making it an attractive alternative for low-traffic use cases.
graph TD
A[Github PR is created] --> B[Webhook event sent to AWS API Gateway]
B --> C[Trigger Atlantis run in AWS Fargate]
This approach could significantly reduce the cost of hosting Atlantis, which might encourage engineers from small team to adopt it without needing to persuade their employers. It may also attract more engineers to Atlantis over GitHub Actions.
AWS Organization Context
Many companies structure their AWS organizations with multiple accounts, typically including:
- A corporate AWS account
- A production AWS account
- A staging AWS account
- A development AWS account
- Additional accounts as needed
Atlantis is often used as a shared resource for managing infrastructure. In most cases, teams deploy the Atlantis instance in the corporate AWS account. Provisioning a dedicated application load balancer for this may not be the most efficient use of resources.
Cost of Atlantis
- Run Atlantis
- A Kubernetes cluster, costing at least $72 per month
- or an EC2 which takes 30-40 dollars
- or fargate which takes $10-20.
- A load balancer, costing around $20 per month
For small team, traffic to Atlantis tends to be low since infrastructure changes are infrequent. Replacing the load balancer with API Gateway could eliminate one of the key fixed costs in this setup.