Skip to content

Add Terraform setup for Lambda using AWS Lambda Web Adapter #68

Description

@Subhransu-De

What to build

Add a Terraform infrastructure setup under /infra that deploys this FastAPI template to AWS Lambda using AWS Lambda Web Adapter. This setup should preserve the standard FastAPI HTTP runtime model as much as possible and make it practical to run the same app style on Lambda, ECS, EC2, or locally.

This setup should target low-traffic or prototype deployments where scale-to-zero and minimal operations are valuable.

Acceptance criteria

  • Terraform provisions Lambda, IAM role, logging, and either Lambda Function URL or API Gateway HTTP API.
  • The deployment supports a container-image based Lambda package or clearly documents the packaging approach.
  • Lambda Web Adapter is configured so FastAPI can run as a normal HTTP app.
  • App port, timeout, memory, architecture, and environment variables are configurable.
  • Secrets can be sourced from AWS Secrets Manager or SSM Parameter Store.
  • Documentation calls out Lambda limitations for this template, especially migrations during app startup, cold starts, and database connection behavior.
  • Outputs include the public endpoint URL, Lambda function name, and log group name.
  • A verification command is documented for checking the deployed health endpoint.

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