-
Notifications
You must be signed in to change notification settings - Fork 0
Deployment
The system supports two environments:
- Development (acmdev) - 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 (
acmdev
oracmprod
)
Verify authentication:
aws sts get-caller-identity
Export the profile:
export AWS_PROFILE=ACM-DEV # or ACM-PROD for production
- 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 CloudFormation stack
- 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 AWS CloudFormation to manage infrastructure. The templates are in the cloudformation/
directory:
-
main.yml
- Main stack template -
iam.yml
- IAM roles and policies -
sqs.yml
- SQS queues -
logs.yml
- CloudWatch logs configuration
The deployment runs these steps:
- Package CloudFormation templates using AWS Serverless Application Model (SAM)
- Deploy/update CloudFormation stack
- Wait for stack update to complete
- Upload frontend assets to S3
- Invalidate CloudFront cache
After deployment, verify that:
- CloudFormation stack 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, the AWS CLI will automatically begin rollback. If an error occurs (mostly due to the Github Actions), a user with InfraSuperuserAccess
may need to log into AWS and manually roll back the resources.
If issues occur after deployment, the easiest way to fix them is to check out the old commit and deploy it manually (or rerun the Github Action) for the last known good commit.
Monitor the deployment through:
- CloudFormation console
- CloudWatch logs
- Infra Cloudwatch dashboard (PROD only).
For detailed execution logs, check CloudWatch logs for the Lambda functions.