This guide helps you deploy the Mental Health Companion prototype on AWS using CDK.
- AWS CLI configured with admin credentials
- Node.js >= 18
- AWS CDK v2 installed (
npm install -g aws-cdk) - Your domain registered in Route 53 (for SSL)
cd web
npm install
npm run buildcd ../infra
npm install
cdk bootstrapcdk deploy --all- This will deploy:
- NetworkStack (VPC, security groups)
- DataStack (Aurora, Redis, KMS, Secrets)
- ComputeStack (Lambda, API Gateway)
- FrontendHostingStack (S3, CloudFront, ACM)
- Update
web/.envwith your deployed API URL (see CloudFormation outputs) - Update domain in
frontend-hosting-stack.tsfor ACM/CloudFront
- The CDK deployment will automatically upload the built frontend to S3 and invalidate CloudFront cache.
- Use the CloudFront URL output to access your deployed frontend.
- For SSL, ACM certificate must be in us-east-1.
- For custom domain, update Route 53 DNS records to point to CloudFront.
- For Lex bot integration, configure via AWS Console and set Lambda permissions.
- Secure chat, message persistence, intent handling, scalable infra, secure storage, frontend hosting, SSL.
- Extend Lambda and frontend for more features as needed (profile, analytics, notifications, etc).
- Check CloudFormation/CDK outputs for resource URLs and errors.
- Use AWS Console for manual checks and Lex bot setup.