-
Notifications
You must be signed in to change notification settings - Fork 0
Deployment
The system supports two environments:
- QA (acmqa) - For testing, development, and QA tasks.
- Production (acmprod) - For live usage
Before deploying, ensure:
- You have the AWS CLI installed, with a profile configured with appropriate permissions
- You're authenticated to the correct AWS account
- All changes are committed to Git
- Local tests pass
Before deployment, authenticate to AWS using SSO:
aws configure sso
When prompted:
- SSO URL:
https://acmillinois.awsapps.com/start/#
- SSO Region:
us-east-1
- Select appropriate account (
acmqa
oracmprod
)
Verify authentication:
aws sts get-caller-identity
Export the profile:
export AWS_PROFILE=<PROFILE RETURNED BY AWS CLI>
- Clean previous builds:
make clean
- Build the Lambda functions and frontend:
make build
This creates deployment packages in the dist/
and dist_ui/
directories.
Only those with InfraSuperuserAccess
can deploy to AWS. Infra developers must create a branch on GitHub and create a Pull Request.
To deploy to the development environment:
make deploy_dev
This will:
- Deploy the Terraform application
- Upload Lambda functions
- Upload frontend assets to S3
- Invalidate CloudFront cache
To deploy to the production environment:
make deploy_prod
Important: Production deployments should only be done after thorough testing in the development environment.
The deployment process uses Terraform to manage infrastructure. The templates are in the terraform/
directory and are separated by the uses of each piece of infrastructure.
The deployment runs these steps:
- Build and package the API code
- Update resource state using Terraform
- Wait for update to complete
- Upload frontend assets to S3
- Invalidate CloudFront cache
After deployment, verify that:
- Terraform updated successfully
- Lambda functions were deployed
- API endpoints respond correctly
- Frontend loads properly
We can run make dev_health_check
or make prod_health_check
for a basic health check.
If issues occur during deployment, you should manually re-deploy the last deployed application tag.
Monitor the deployment through:
- Terraform logs in Github Actions
- CloudWatch logs
- Infra Cloudwatch dashboard (PROD only).
For detailed execution logs, check CloudWatch logs for the Lambda functions.