githubEdit

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)

The code that manages deployment can be found herearrow-up-right.

Our staging environment is at staging-aws.civiform.devarrow-up-right.

Config for the staging environment is herearrow-up-right.

Troubleshooting

After running the setup or deploy script, you can login to the AWS ECS consolearrow-up-right to check the 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 a task in the Running state.

Screen Shot 2022-08-15 at 5 18 55 PM

Inspecting task config

You can see the task configuration by clicking on the Task definition tab, finding the latest revision, and opening the JSON tab.

Screen Shot 2022-08-15 at 5 21 53 PM

Inspecting logs

You can see the logs on the task page by clicking into the specific task and selecting 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

Last updated

Was this helpful?