Skip to content

Would it be possible to replace Application Load Balancer(ALB) with AWS api gateway for Atlantis on Fargate? #414

Closed as not planned
@xiaoronglv

Description

@xiaoronglv

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]
Loading

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]
Loading

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.

Reference

  1. Q&A: Using Atlantis with serverless deployment platforms, how?
  2. terraform-aws-modules/terraform-aws-atlantis

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions