Medplum AWS Dev Environment — Deployment Guide¶
Step 1 — Confirm decisions¶
Before any AWS commands run, confirm:
- AWS account
- AWS region
- Dev environment name
- Domain/subdomains
- SES sender identity
- Access model
- Security owner
- Engineering owner
Step 2 — Prepare local tooling¶
Required:
- AWS CLI v2
- AWS credentials/SSO profile for the target account
- Node/npm
- Git
Already prepared locally by Robbie:
- Local infra repo:
/Users/robbie/vim-projects/medplum-aws-dev-cdk/ - Medplum/CDK npm dependencies
cdk.json
Step 3 — Run Medplum init¶
From the infra repo, run:
npx medplum aws init
This generates the environment config file and may request certificates, generate signing keys, and write settings to AWS Parameter Store.
Step 4 — Validate before deploy¶
Run:
npx cdk bootstrap -c config=medplum.<env>.config.json
npx cdk synth -c config=medplum.<env>.config.json
npx cdk diff -c config=medplum.<env>.config.json
The team should review the diff before deployment because it may create networking, database, storage, IAM, and security resources.
Step 5 — Deploy infrastructure¶
After approval:
npx cdk deploy --all -c config=medplum.<env>.config.json
Step 6 — Deploy the app¶
npx medplum aws deploy-app <env>
For regions outside us-east-1, bucket policies may need an extra Medplum CLI command.
Step 7 — Verify¶
- App URL loads.
- API responds.
- Email flow works.
- ECS services are healthy.
- Database/cache are healthy.
- Logs show no repeating startup failures.
- Only synthetic data is present.