Skip to content

Add Terraform setup for full ECS Fargate deployment #67

Description

@Subhransu-De

What to build

Add a Terraform infrastructure setup under /infra that deploys this FastAPI template on Amazon ECS with AWS Fargate using explicit infrastructure resources. This is the more production-style ECS path compared with ECS Express Mode.

The setup should include the core AWS resources needed to run the containerized FastAPI app behind an Application Load Balancer, with secrets managed through AWS Secrets Manager or SSM Parameter Store.

Acceptance criteria

  • Terraform provisions or configures VPC networking, security groups, ECS cluster, ECS task definition, ECS service, ALB, target group, and listener.
  • The FastAPI container runs on Fargate and is reachable through the ALB.
  • Health checks target the app health endpoint.
  • App configuration supports environment variables and secrets from Secrets Manager or SSM Parameter Store.
  • CloudWatch log group and ECS task logging are configured.
  • IAM task execution role and task role follow least-privilege defaults.
  • Outputs include ALB DNS name, ECS cluster name, service name, and log group name.
  • Documentation explains how to build/push the app image, configure variables, deploy, verify, and destroy.

Blocked by

None - can start immediately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinfraInfrastructure and deployment work

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions