Links

AWS Terraform deployment

Information specific to Civiform Terraform deploy scripts for AWS.
For general information see Terraform deploy system.

Infrastructure

AWS System Diagram
Created for Civiform app:
  • VPC
  • Load balancer
  • Internet Gateway
  • NAT Gateway
  • Fargate ECS cluster
  • RDS with Postgres
  • S3 bucket
Connected services
  • SES
  • Secrets Manager
Supporting Infrastructure:
  • S3 bucket for terraform backend state
  • Cloudwatch export for logs

Code and examples (AWS)

Code can be found here.
Our staging enviroment is at staging-aws.civiform.dev.
Config for staging environment is here.

Troubleshooting

After running setup or deploy script you can login to AWS ECS console to check status of Civiform. Make sure to select correct region in the top right corner.
You should see Cluster with app_preffix-civiform name. Click on it and go to Tasks tab. If everything is going well you should see task in the Running state.
Screen Shot 2022-08-15 at 5 18 55 PM

Inspecting task config

You can see task configuration by clicking on Task definition tab, finding latest revision, and opening JSON tab.
Screen Shot 2022-08-15 at 5 21 53 PM

Inspecting logs

You can see logs on the task page by clicking into specific task and selecting tab Logs.
Screen Shot 2022-08-15 at 5 23 27 PM
Logs are also available in Cloudwatch. Search for app_prefix-civiformlogs group.
Screen Shot 2022-08-15 at 5 26 42 PM