Deploying Medplum on AWS with CDK: when this path fits your team
The AWS CDK install is the route Medplum's self-hosting documentation presents as the recommended option for running Medplum inside your own AWS account, using AWS CDK and CloudFormation to define the infrastructure as code. It fits a healthcare organization that wants Medplum's server, database, cache and storage in an account it controls, with its own IAM boundaries, networking and change records, rather than on Medplum Cloud. The same documentation states that the install requires high proficiency with AWS, Node.js and command line tools, so the decision starts with your team's skills, not with the tooling.
Before committing, confirm three things. First, that you can staff people who already know IAM policies, Amazon SES, Route 53 style domain configuration, and the CDK workflow of bootstrap, synth and deploy. Second, that someone on the team can debug a failed CloudFormation stack and read Node.js logs, because a first deployment rarely succeeds on the first run. Third, that you can own the ongoing work after go-live, including upgrades, which must pass through each minor version in sequence and can include long data migrations. If any of these skills is missing, plan for a partner or a shorter path such as the Ubuntu or Kubernetes installs described elsewhere on this page. Ask any implementation partner to show how they would hand these skills over to your team.
Choosing between the AWS CDK install and other Medplum deployment paths
This table compares the AWS CDK install with the other documented Medplum routes by team skill, cloud alignment, operational ownership and fit for production. Read each row as a question to answer for your own team, then follow the link to the sibling topic for the steps. The main takeaway is that the CDK path suits teams already running AWS, while other routes fit different infrastructure and skill profiles.
| Deployment path | Team skill and cloud fit | Operational ownership | Fit for production |
|---|---|---|---|
| AWS CDK and CloudFormation (this topic) | Requires high proficiency with AWS, Node.js and command line tools; best where the organization already runs on AWS | You own the AWS account, IAM, networking, RDS, ECS and the config repo, with CDK code under change control | Medplum's recommended self-hosting option on AWS, suited to teams that want infrastructure as code |
| Ubuntu via APT repository | Linux administration skills with PostgreSQL, Redis, Node.js and Nginx on one host; cloud-agnostic | You manage the single server, TLS renewal, database and systemd service | Suited to a single-server install; confirm capacity and recovery needs before choosing it |
| Docker | Container skills on a single host; useful for predictable local or small-scale layouts | You manage containers, storage volumes, upgrades and backups on the host | Confirm your own availability and recovery requirements before using it as a production layout |
| Kubernetes with Helm chart | Cluster operations skills; works on any conformant Kubernetes cluster you control | You run the cluster, external PostgreSQL, Redis, object storage and ingress | Suited to organizations with an existing platform team and cluster standards |
| Azure with Terraform and AKS (Beta) | Azure skills plus Terraform and Helm; fits organizations standardized on Azure | You own the Azure resources, Key Vault secrets and AKS operations | Marked Beta by Medplum; confirm current status before planning production use |
| Google Cloud with Terraform and GKE (Beta) | Google Cloud skills plus Terraform and Helm; fits organizations standardized on GCP | You own the GCP networking, GKE, Cloud SQL, Cloud Storage and Secret Manager | Marked Beta by Medplum; confirm current status before planning production use |
| Building from source | Strongest Node.js and TypeScript skills; highest effort to keep pace with releases | You own the build pipeline, packaging, hosting and every upgrade | Confirm release and patch handling for your team before committing to this path |
How to deploy Medplum on AWS with CDK, step by step
This sequence takes an AWS account from empty to a running self-hosted Medplum server and app, built from a config repo that defines the infrastructure as code. Each step closes with a check, so problems surface before the next step depends on them.
Confirm prerequisites and IAM permissions
Your AWS administrator or platform lead confirms the account, the IAM identity used for deployment, and the local tools the install expects, including Node.js and the AWS command line. The deploying engineer needs high proficiency with AWS, Node.js and command line tooling, so confirm that skill set before starting. Verify by signing in with the deployment identity and listing the account's identity and region, which should return the expected account ID. Confirm the exact permission set against the install documentation, since the required policies are the vendor's and can change between releases.
Set up the SES account and sending domain
Your team creates or confirms an Amazon SES account in the target region, verifies the sending domain, and publishes the DNS records SES asks for. Check that the account is out of the SES sandbox if you need to email arbitrary recipients, because invites, password resets and MFA codes depend on it. Verify by sending a test message from SES to a verified address and confirming it arrives. A wrong domain or an SES account still in sandbox state blocks the next steps, because the server configuration references these addresses and the first user invite will fail without them.
Configure the domain for the Medplum endpoints
Decide the hostnames for the API and the web app, then plan the DNS records and TLS certificates that the load balancer will serve. These values must match the base URL and app base URL the configuration will hold, so write them down before generating anything. Verify by resolving each hostname from outside your network and confirming it points at the intended target or a placeholder you will replace. Changing the domain after deployment means reissuing certificates and updating configuration, so a wrong domain at this stage is the most expensive mistake to fix later.
Create the config repository and install CDK tooling
Create a dedicated version-controlled repository that will hold the CDK application and the Medplum configuration, and install the AWS CDK toolchain on the deployment machine. Keep this repository under change control, because the infrastructure definitions and settings live here after the install. Verify by running the CDK version command and confirming the repository has a clean initial commit. Pin tool versions so that a later install produces the same infrastructure.
Run the medplum aws init tool
Run the Medplum init tool from the config repository and answer its prompts for region, domain, and the SES and email settings gathered in earlier steps. The tool generates the CDK project and configuration files that the later steps read. Verify by reviewing the generated files and confirming the domain, region and email sender match your plan. Correct any mismatch now, since the generated files feed the bootstrap, synth and deploy steps directly.
Bootstrap the CDK environment in the account
Run the CDK bootstrap command for the target account and region so AWS creates the staging resources CDK needs to deploy stacks. This is a one-time step per account and region, though it must be repeated if you add a new region. Verify by checking that the bootstrap stack reports a completed state in CloudFormation. If bootstrap fails, check the deployment identity's permissions first, since missing rights are the most common cause.
Synthesize and review the CloudFormation templates
Run CDK synth to produce the CloudFormation templates without deploying anything. Review the output for the expected ECS services, load balancers, RDS database and networking resources, and confirm that the configured domain and SES values appear where intended. Verify that synthesis completes with no errors and that the templates match what your team has agreed to run. Reviewing here is the cheapest point to catch a wrong domain or an SES state that will block deployment.
Deploy the stacks and build the Medplum app
Run CDK deploy to create the stacks, then build and deploy the Medplum app to the environment that the stacks provide. Deployment creates billable resources in your account, so confirm cost expectations with your finance and platform owners beforehand. Verify by checking that each stack reports a completed state, that the API health endpoint responds on the configured hostname, and that you can sign in to the app with the first administrator account. Record the stack outputs and the configuration version in your change record before handing the environment to operations.
What the CDK stack provisions: ECS, load balancers and RDS
The CDK stack maps Medplum's three runtime dependencies onto separate AWS services: the Medplum server runs as a Node.js and TypeScript application, its clinical data sits in PostgreSQL, and its cache runs on Redis. In the AWS install, the server containers run on Amazon ECS, traffic reaches them through a load balancer, and the database is provisioned as a managed Amazon RDS PostgreSQL instance. Redis is the third stateful piece to confirm in the generated template, since it serves the server's cache role and has its own networking and availability needs. Treat this mapping as the starting model, not the final inventory.
The exact resources, counts, instance classes, storage sizes and network placement are generated from your config repository, so they are not fixed by this page. Before running the deploy step, read the synth output in full and check each resource against your plan: how many ECS tasks and what CPU and memory each gets, which load balancer is internet-facing and which is internal, whether the RDS instance is in private subnets with no public access, how backups and deletion protection are set, and where Redis lives. Confirm with the Medplum install documentation at Medplum install on AWS which settings the init tool derives from your answers and which ones you must change by hand.
Ask one question before anything is deployed: who owns the sizing decision. The defaults are a starting point for a test environment, and production load depends on your data volume, query patterns and concurrency, none of which this page can estimate. Plan a load test and a restore test against the stack, and record the resulting instance sizes and retention settings in your change control. Because the template creates real billable resources, keep the synth diff in version control so every later change to the database or compute layer is reviewed as code.
How the AWS CDK deployment fits together
The operator starts on a workstation, where the medplum aws init tool writes the configuration repository and CDK code that drive a CloudFormation stack. That stack creates a VPC with public subnets for the load balancer and private subnets for the Medplum ECS services, RDS PostgreSQL and Redis. Email goes out through SES, and Route 53 records point your domain at the load balancer. Check that each arrow crossing into a private subnet is intentional, and that only the load balancer faces the internet.
Trust boundary between public load balancer and private Medplum components on AWS.
The AWS and tooling skills your team needs before starting
The AWS install is a chain of dependent steps: an identity with the right permissions, a verified sending domain, a CDK project, then a deploy that creates the network, compute and database. Medplum's install guide describes the work as requiring high proficiency with AWS, Node.js and the command line, so each area below should be covered by someone on your team before the first deploy starts.
IAM policy design for the deploying identity
Your team must be able to create a deployment role or user with only the permissions CDK needs to create the stack's resources, and to explain what each permission grants. The identity that runs the deploy also creates roles, security groups and databases, so an overly broad policy is the most common security gap in this kind of install. Check who holds the credentials, where they are stored, and how access is reviewed after go-live. A partner would typically draft the policy from the planned resources, test it in a sandbox account, and document the reasoning for your security team.
Install on AWS docsCDK and CloudFormation
Your team must be able to read a CDK app, run synth to produce CloudFormation templates, and interpret the diff before any change is applied. The stack defines the compute, database and load balancer, so a bad change can replace a resource that holds patient data. Know how bootstrap creates the staging resources CDK uses, and who approves a deploy. A partner would typically set up the project, pin versions, write the change review steps, and train your engineers to read the output.
Networking and DNS
Your team must understand VPCs, public and private subnets, security groups, and how traffic reaches the load balancer and then the containers and database. Domain records must point the Medplum base URL and app URL at the load balancer, and certificates must match those names. Confirm that the database and cache sit in private subnets and that only the required ports are open between tiers. A partner would typically design the address plan, set up the hosted zone and certificate validation, and verify each hostname resolves and serves over TLS.
Node.js and TypeScript
Your team must be able to install the Node.js version the Medplum tooling requires, build the Medplum app, and fix a failed build without guessing. The CDK project is written in TypeScript, and the app is built and deployed as a separate step after the infrastructure exists. Confirm which Node.js version your release expects and keep it pinned in your config repository. A partner would typically script the build, handle dependency locks, and document how to rebuild the same artifact for a later upgrade.
Command line administration
Your team must be comfortable running the Medplum init tool, the CDK commands and AWS CLI calls from a terminal, reading their output, and recording the values they produce. Each step writes configuration that later steps depend on, so a wrong profile or region can point a deploy at the wrong account. Keep a runbook with the exact commands and the account and region for each environment. A partner would typically provide the runbook, a dry run in a non-production account, and shell scripts that check the active account before running.
SES sending and domain verification
Your team must be able to request SES production access, verify a sending domain with DKIM records, and confirm that invites, password resets and MFA codes are delivered. New SES accounts start in a sandbox, so delivery to unverified recipients fails until access is granted. Check bounce and complaint handling, and who owns the sending domain's DNS. A partner would typically prepare the SES request, configure the domain records, and test each Medplum email type end to end.
Keeping the AWS deployment current after go-live
Plan upgrades as a standing workload, not a one-time event. Medplum ships patch versions weekly, minor versions two to three times a year, and major versions annually in Q4. Each major version gets one year of Active support and one year of Maintenance, with an Enterprise extension for 36 months in total. Security fixes follow a stated target: within 7 days for critical vulnerabilities (CVSS 9.0 or higher) and within 14 days for high ones (CVSS 7.0 to 8.9). For the CDK install, that means someone must own a recurring check of the Medplum release feed, a decision on which patches to apply, and a repeatable path through the same medplum aws and CDK commands used at first deploy. Confirm with Medplum which support tier your organization is entitled to, because the Enterprise extension changes how long you can stay on a major version.
Do not skip minor versions. A self-hosted Medplum must move through each minor version in sequence. Skipping one, for example jumping from v3.1.2 straight to v4.3.4, causes startup failures. In a CDK-managed stack, this means your change process should record which minor version is currently running in each environment and step forward one minor at a time in staging before production. Keep the config repository and the CDK app pinned to the version you deploy so that a rebuild reproduces the same state. Treat any gap of more than one minor as a planning problem, not a shortcut.
Budget time for data migrations. Some upgrades run post-deploy data migrations against the database in Amazon RDS. On large datasets these can run for hours or days, which affects your maintenance window, your rollback plan and the load on the database during the run. Before scheduling, check the migration notes for each version on your path and size the window from a staging run against a copy of production data. The full sequence, rollback windows and verification steps are covered in the Medplum upgrades guide, and your own upgrade runbook should be built from it.
Questions buyers ask before deploying Medplum on AWS
How much effort does a self-hosted Medplum install on AWS take?
The install is a multi-stage engineering task, not a single command. The Medplum install guide covers prerequisites, IAM permissions, an SES account, domain configuration, a config repository, CDK setup, the Medplum init tool, CDK bootstrap, synth and deploy, and then building and deploying the Medplum app. Medplum describes the work as requiring high proficiency with AWS, Node.js and command line tools. The effort is driven by how many of those areas your team already knows, how many AWS accounts and environments you need (for example, separate staging and production), how much of the configuration you must decide up front, and how many approvals your security and change processes require before anything reaches production.
Can our own team deploy Medplum on AWS without outside help?
A team can do it without outside help if it already has deep AWS, CDK, Node.js and PostgreSQL experience and someone who owns the infrastructure as code. The gaps usually appear in IAM policy design, SES production access and sender verification, DNS and certificate setup, and the decisions about networking, secrets and backups that the deployment forces early. Ask yourselves whether you have engineers who can debug a failed CloudFormation stack at the stage where it fails, and whether they can keep the config repository and the deployed stack in sync over time. If those answers are uncertain, a fixed-scope engagement with DeployOpen can cover planning, implementation, documentation and handover, which you can weigh against training or hiring.
What do we need to provide before the AWS install starts?
Before work starts, you need an AWS account dedicated to Medplum, IAM permissions broad enough to create the stacks, an SES account with verified sending identities, and a domain you control for the API and app endpoints. You also need a git repository for the configuration, a named owner for DNS changes, and access to the people who approve IAM roles and email sending. Confirm the exact IAM permissions, SES production access requirements and any region constraints against the current Medplum install documentation and your own AWS environment, since these steps can change between releases.
How long does it take to reach a working Medplum environment on AWS?
No timeline is fixed by the install documentation, so duration depends on your environment. The main drivers are how quickly SES and domain approvals clear, how many environments you stand up, whether your network and security teams need to review the design, and how much time the team spends learning the CDK and AWS pieces. A working environment means the stack deploys, the app and API respond on your domain, and you can sign in and create test resources. Ask any provider for a schedule with milestones tied to those checkpoints, and treat provider-quoted durations as estimates until the written scope is agreed.
What recurring work follows a Medplum deployment on AWS?
Once the environment is live, the recurring work is operational. Medplum ships patch versions weekly and minor versions two to three times a year, and each major version receives one year of Active support, one year of Maintenance, and an Enterprise extension of twelve more months of security patches for thirty-six months in total. Medplum targets security patches within seven days for critical vulnerabilities and fourteen days for high ones. Self-hosted upgrades must step through each minor version in sequence, and post-deploy data migrations can run for hours or days on large datasets, so plan maintenance windows, test upgrades in staging, and budget engineering time for these cycles. AWS costs for compute, database, storage and networking also recur and should be modeled from your own sizing.
What should a quote for a Medplum AWS deployment include?
A useful quote names each deliverable and who performs it. Ask for the written scope covering the prerequisites check, IAM and SES setup, domain and config repository work, the CDK bootstrap, synth and deploy steps, the app build and deployment, verification, and documentation for handover. It should state assumptions about your accounts and environments, the responsibilities split between your team and the provider, what happens if approvals or DNS changes are delayed, and what is one-time versus recurring, such as a retainer for upgrades and monitoring. Separate AWS resource charges, which you pay your cloud provider directly, from professional services. DeployOpen works from a written scope, so a quote follows from that document rather than from a published price list.
Does the AWS deployment need compliance or security review before go-live?
Yes, in most regulated organizations the deployment needs a security and compliance review before handling live health data. Medplum's compliance documentation covers frameworks such as HIPAA and SOC 2 Type II, and states that compliance is a shared responsibility between Medplum and its customers, so the AWS account, network, IAM, secrets, backups and logging become your evidence. DeployOpen prepares systems, controls and evidence for assessments but does not issue audit reports or certifications. Confirm which controls your auditors expect and which ones your team or provider must produce before the go-live date is set.
How DeployOpen scopes and delivers a Medplum AWS deployment
A Medplum AWS deployment touches accounts, networking, data stores, email and identity, so the work is planned as one written scope before any infrastructure is created. The cards below show what DeployOpen covers, what the client keeps control of, and how cost and support follow from that scope.
Infrastructure in your own AWS accounts
DeployOpen builds the Medplum stack inside the AWS accounts your organization owns, so the CDK code, the resulting resources and the data stay under your control. Agree up front which account, region and organizational guardrails apply, and who holds the root and administrator access once the work is handed over. Ask for the list of AWS services that will be created so your security team can review them before deployment.
Medplum AWS install docsFixed scope agreed in writing
Most engagements are fixed-scope, so the deliverables, environments, integrations and timelines are settled in a written statement of work before work starts. For a Medplum deployment, that document should name the environments (for example, staging and production), the identity provider and email setup, and the acceptance tests. Changes after kickoff go through a documented change request, which keeps the scope and cost traceable.
Quote follows the written scope
DeployOpen does not publish a price list. A quote is prepared from the written scope, so the cost reflects the decisions in it: number of environments, configuration of identity and email, binary storage, and how much hardening and documentation is included. Ask for the quote to show one-time build work separately from any recurring support, and to list which items the client must provide, such as the domain, the SES account and the AWS account itself.
Hardening and backups in the build
The build includes the hardening and backup settings agreed in scope, such as private networking for the database and cache, secrets handling, least-privilege IAM and backup configuration for PostgreSQL. Medplum's own self-hosting guidance recommends a dedicated cloud account, infrastructure as code and private networking, so these points are reviewed as part of acceptance. Confirm the recovery targets you need, since they determine how the database and backups are configured.
Documentation the team can operate from
Handover documentation covers the CDK project layout, the config repository, how to run synth and deploy, and the runbook for routine tasks such as rotating secrets and reading logs. This matters because each Medplum upgrade must move through every minor version in sequence, so your team needs a record of how the stack was built. Ask for the documentation format and whether it lives in your own repository.
Ongoing support and upgrades as retainers
Support, upgrades and continuous testing after handover are available as retainers, so your team does not have to carry every Medplum minor release alone. A retainer can cover patch review against Medplum's security response targets, staged upgrades in a non-production environment, and checks after each database migration. Define in the agreement who is on call, which response windows apply and how upgrades are scheduled around your change freezes.

