- ECS Fargate service + ALB
- RDS PostgreSQL
- Optional ElastiCache Redis
- SSM Parameter Store secrets
Prerequisites
- Terraform installed
- AWS credentials configured
- Google OAuth credentials
- LLM provider API key
Generate Terraform Files
inbox-zero setup-terraform. From a cloned repo, you can also use pnpm setup-terraform.
This creates a terraform/ directory with:
main.tf,variables.tf,outputs.tfterraform.tfvars(contains secrets).gitignore
Deploy
HTTPS and Custom Domains (Optional)
Set these interraform.tfvars:
domain_name(e.g.app.example.com)acm_certificate_arnroute53_zone_id(optional, to create DNS record)
base_url is not set.
Notes
terraform.tfvarscontains secrets and should not be committed.- Database migrations run automatically on container startup.
- Secrets are stored in SSM Parameter Store at
/${app_name}/${environment}/secrets. - If you want an API Gateway with JWT validation for Pub/Sub webhooks, add it
separately (see
copilot/templates/webhook-gateway.ymlfor the pattern). - If your app is on a private network, one option is to expose only a small AWS
Lambda webhook relay (or Lambda behind API Gateway) that forwards verified
Pub/Sub webhook requests to
/api/google/webhook.