When OpenEMR on AWS ECS Fargate fits your hosting plan
Choose openemr-on-ecs when your team needs OpenEMR inside its own AWS account, with managed containers and a managed database, and has the cloud skills to run that stack. The openemr-on-ecs project, maintained under the openemr organization on GitHub, deploys OpenEMR on AWS Fargate with at least two containers spread across two Availability Zones. Around the containers it provisions Aurora MySQL Serverless v2 for the database, Amazon EFS for shared documents and configuration, and Valkey (ElastiCache Serverless) for sessions. An Application Load Balancer fronts the containers, with AWS WAF and an IP allowlist in front of it. Because the containers are stateless and the shared state sits in managed services, this design suits a team that wants more than one web node without operating servers itself.
Teams usually compare this project with two alternatives. The first is the Kubernetes route on EKS, which gives more control over scheduling, networking and add-ons but asks for Kubernetes operations skills your team may not have. The second is a single-server install, which is simpler to start but leaves you with one host to patch, back up and recover. Fargate sits between them: you do not manage cluster nodes, yet you still own the task definitions, networking, IAM roles, WAF rules and upgrade sequence. If your organization already runs an AWS landing zone and standard CI tooling, that fit is strongest. If it needs multisite, custom container images or cluster-wide policy, check the EKS option first.
OpenEMR is free and licensed under the GNU GPL v3.0, so the recurring spend is AWS infrastructure, support services and your internal or partner effort rather than a license fee. The project's own baseline of about $320 per month in us-west-2 covers default settings with light usage, and it notes that OpenEMR's AWS Marketplace offerings may be cheaper for small installations. Confirm the current figure in the repository and in the AWS Pricing Calculator against your expected storage, database capacity, traffic and backup retention before you budget, because Aurora and EFS costs move with use.
How the ECS Fargate parts of OpenEMR connect
The request starts with a client on an allowed IP address, which AWS WAF checks against the IP allowlist before the Application Load Balancer forwards it to OpenEMR tasks on Fargate. Those tasks read and write the Aurora MySQL Serverless v2 database, share documents and configuration through Amazon EFS, and keep user sessions in Valkey, so any task can serve any request. Check that the allowlist, the subnets and the security groups match your access model, and confirm which parts sit inside the AWS account boundary you control.
Request path and data stores for OpenEMR on ECS Fargate across two Availability Zones.
Configuration choices in the openemr-on-ecs stack and when each fits
This table compares the main configuration decisions in the openemr-on-ecs stack, with the trade-off and the situation where each choice fits. Read it as a checklist: confirm each default and value in the repository before you size the environment or request a quote, because the project may change them between releases.
| Decision | Trade-off | When it fits |
|---|---|---|
| Task count and two-container minimum | Two containers across two Availability Zones improve availability but add Fargate task cost and more shared-state coordination | Production use where a single container restart should not take the site offline; confirm the minimum and maximum task counts in the repository |
| Aurora Serverless v2 capacity range | A low minimum capacity lowers idle cost but can slow the first requests after quiet periods; a high maximum handles peak clinical hours at higher cost | Light, steady use can start near the minimum; confirm capacity limits and how they are set before estimating database spend |
| Aurora backup and retention | Automated backups and retention settings protect patient data but add storage cost and need restore testing to be meaningful | Any environment holding real ePHI; confirm retention periods and whether restores have been tested in your account |
| EFS for sites and documents | Shared storage lets all containers see uploaded documents and configuration, but throughput and per-GB cost grow with document volume | Deployments with scanned documents or many uploads; check throughput mode and encryption settings in the templates |
| Valkey session storage | Serverless Valkey keeps sessions out of container memory so tasks can be replaced, but adds a managed dependency and a network path to secure | Multi-container setups where users must stay signed in across task replacement; confirm session settings in OpenEMR match the stack |
| WAF IP allowlist scope | A narrow allowlist reduces exposure but blocks remote staff, patients and partner apps unless ranges are maintained | Clinic-only access from known networks; patient portal or FHIR consumers outside those ranges need a different exposure plan |
| This project, AWS Marketplace offerings or EKS | This project gives infrastructure as code on Fargate; Marketplace images may cost less for small installs; EKS adds cluster operations and flexibility | This project suits teams that want managed containers on Fargate; choose Marketplace for a small single instance and EKS when your team already runs Kubernetes |
How to deploy openemr-on-ecs and verify it
This sequence takes an OpenEMR-on-ECS deployment from account preparation to a running, configured instance with backups tested by restore. Each step produces a check you can record before moving on, so the team can show what was built and verified.
Confirm prerequisites in the AWS account
The platform or cloud team confirms the AWS account, IAM permissions for CDK deployment, and the tooling the project's documentation lists for its CDK setup. They also confirm that the account can host Fargate, Aurora Serverless v2, EFS, ElastiCache Serverless and AWS WAF in the chosen region, and that a signed AWS Business Associate Addendum is in place before any PHI enters the environment. Check: a written prerequisites list is signed off by the cloud owner and the privacy or compliance lead, with the BAA status recorded.
Review the CDK configuration and region
The engineer who will own the deployment reads the openemr-on-ecs repository configuration, including the default region, container counts, database sizing, WAF settings and the IP allowlist. The default baseline in the project is us-west-2, so any other region needs a deliberate decision and a re-check of service availability. Confirm the allowlist contains only the networks that must reach the application, and record every value that differs from the defaults. Check: a reviewed configuration diff that a second engineer has approved.
Deploy the CDK stack
The engineer runs the CDK deployment from the reviewed configuration into the target account. The project states the deployment takes roughly 40 minutes, but that figure assumes default settings and can vary with account state and region. Keep the deployment output, including the load balancer endpoint, so later steps can reference it. Check: the stack reports a successful status, the Application Load Balancer answers over HTTPS, and the output values are stored in the team's records.
Complete the first OpenEMR login and setup
The administrator opens the application through the load balancer, signs in with the initial credentials and completes the setup, creating the administrative account and changing any default passwords immediately. Set the password policy and multi-factor authentication under the administration settings before inviting users, since the OpenEMR Securing guide recommends both. Confirm that the site is served only over HTTPS. Check: a test user can log in with MFA enforced, a failed login is recorded, and default credentials no longer work.
Remove or block setup scripts
After installation, the administrator removes setup.php and other administrative scripts from the running application, as the Securing OpenEMR guide advises, and confirms that direct web access to the documents directory is blocked. Because the containers are rebuilt from images, check how the deployment reapplies this change so it does not return on the next release. Test each path from outside the allowlisted network and from inside it. Check: a direct request to each removed script and to the documents path returns a refusal, and the result is saved as evidence.
Enable AWS Backup schedules
The cloud engineer configures AWS Backup for the resources that hold OpenEMR state, including the Aurora database and the EFS file system, with daily, weekly and monthly schedules. The project confirms these three schedule types are available, so retention periods, backup vault encryption and cross-account copies need to be chosen by the client against its own record retention rules. Confirm which resources the backup plan covers and that the backup vault is encrypted. Check: the backup plan lists all three schedules and shows completed backup jobs for each stateful resource.
Test a restore before go-live
The team restores a recent backup of the database and the EFS file system into a separate, isolated environment and confirms that OpenEMR starts and that a known patient record and an uploaded document are readable. Time the restore and record the steps, since that record becomes the recovery procedure for an incident. Repeat the test whenever the backup configuration or OpenEMR version changes. Check: the restored instance passes the agreed record and document checks, and the signed restore report is filed with the deployment evidence.
What the project's monthly cost baseline of about $320 includes and leaves out
The openemr-on-ecs project estimates a baseline of about $320 per month for its default settings in us-west-2 under light usage. Treat this as the project's own figure, not a quote from DeployOpen or AWS. It describes one configuration at one load level, and your bill will move with the choices below. Before you use it in a budget, confirm the current AWS list prices for each service in your chosen region, and check the project repository for what the estimate assumes about task counts, storage and traffic. The project also notes that OpenEMR's AWS Marketplace offerings may be cheaper for small installations, so compare them before you commit to this architecture.
The bill grows with each component. Aurora Serverless v2 charges for capacity consumed and for database storage, so both peak load and a growing patient record set push the cost up. Amazon EFS charges for stored data and can add throughput costs, which matters because the shared documents and configuration live there. Fargate cost follows the number and size of running tasks, and the project starts with at least two containers across two Availability Zones. Valkey on ElastiCache Serverless charges for the memory and data it handles for sessions. The Application Load Balancer and AWS WAF add fixed and per-request charges, and the IP allowlist does not remove them. Backup retention across the daily, weekly and monthly AWS Backup schedules and data transfer out of AWS are the last two drivers to model.
The estimate also leaves out costs that belong to your organization. A signed AWS Business Associate Addendum does not carry a charge, but the people who write policies, run training, perform risk assessments and handle audit logging do, whether they are your staff or a partner's. Monitoring, log retention, OpenEMR upgrades, testing after security releases and the labor to restore from backup are also outside the figure. Ask any partner quote to list recurring AWS charges separately from one-time implementation work, and ask which of the drivers above it has sized, so you can compare it with the project baseline line by line.
Security controls the stack provides and what you still configure
The openemr-on-ecs stack covers the network edge and storage layers, but several OpenEMR hardening steps happen inside the application and the web root. Each card separates what the infrastructure already sets up from what your team must verify after the first login and after every upgrade.
Network exposure through the ALB and WAF
The Application Load Balancer sits behind AWS WAF with an IP allowlist, so only the source ranges you list can reach OpenEMR. Confirm that the allowlist matches your clinic, VPN and remote staff ranges, and that it is reviewed when staff or locations change. Check that the Fargate tasks are not reachable directly from the internet and that the ALB is the only public entry point. An allowlist you never review becomes an access grant nobody remembers.
openemr-on-ecs repoHTTPS-only access and closed port 80
OpenEMR's Securing OpenEMR guide says to allow only HTTPS and consider opening only port 443. The stack terminates TLS at the load balancer, so confirm that the HTTP listener redirects or is removed rather than forwarding patient sessions in plain text. Check the certificate on the load balancer, the security group rules and the cipher policy. Test from outside the allowlist as well as inside it.
Securing OpenEMR guideRemoving setup.php and admin scripts
Setup and administration scripts can change database and site configuration, so the guide says to remove setup.php and other admin scripts after installation. The container image is built from a fixed release, but the removal is an application step your team must confirm in the running task after every image update. Request a check of the served file list, and make it part of your upgrade runbook so a new image does not restore them unnoticed.
Blocking direct access to sites/*/documents
Uploaded patient documents are stored under sites/*/documents on the shared EFS volume. The web server must not serve that path directly, so a valid URL alone cannot expose a file. Verify with an unauthenticated request to a known document path that the server refuses it, and confirm the rule survives container restarts. Access to documents should go through OpenEMR's own permission checks.
MFA and password policy inside OpenEMR
Multi-factor authentication and password rules are application settings, not AWS controls. The Administration Globals settings include a strong password rule requiring all 4 character types, reuse prevention for up to 5 prior passwords, expiration settings and a choice of Bcrypt, Argon or SHA512 hashing. Confirm MFA is enabled for every clinical and administrative role, and decide whether directory login through LDAP or Active Directory will be the identity source.
Administration GlobalsEncryption settings for stored items
EFS encrypts the shared volume at rest and Aurora stores its data encrypted, but OpenEMR also offers an option to encrypt files it stores on drive. Enable that option in the application, and confirm that the key handling is documented, since the setting does not replace volume encryption. Record which items are encrypted at each layer so an auditor can trace documents, database rows and session data to a control.
Questions teams ask before deploying OpenEMR on ECS Fargate
What does it cost to run OpenEMR on ECS Fargate?
The openemr-on-ecs project estimates a baseline of about $320 per month for default settings in us-west-2 with light usage, according to its repository. That figure covers the AWS resources the project creates: Fargate containers, Aurora MySQL Serverless v2, EFS, Valkey, the load balancer and WAF. It does not include the one-time work of configuring, testing and documenting the environment, or the staff time to operate it. Costs rise with database capacity, storage growth, traffic, backup retention and the number of containers. Ask any partner for a quote built from a written scope, and confirm current AWS pricing for your region before budgeting.
How long does an OpenEMR ECS Fargate deployment take?
The project's own deployment step takes roughly 40 minutes, according to its repository. That is the time to run the CDK deployment, not the time to finish a production system. The longer work is everything around it: deciding the network and IP allowlist, setting OpenEMR configuration, loading or migrating data, validating clinical workflows, configuring SSO and MFA, testing backup restores and producing the documentation your compliance team needs. Those activities depend on your data volume, your identity provider and how many clinics or user groups must be validated. Get the timeline from the written scope rather than from the deployment step.
What must our team provide before the deployment starts?
Several inputs sit outside the AWS infrastructure and must be in place before work starts:
- An AWS account with permissions to create the Fargate, Aurora, EFS, Valkey, WAF and backup resources the project uses.
- A signed AWS Business Associate Addendum, since the project notes HIPAA still requires one.
- Named staff for clinical validation, workflow sign-off, identity decisions and access approvals.
- An agreed IP allowlist, a DNS plan and a certificate source.
- Your policies, training records and risk assessment inputs.
Clinical validation in particular is your responsibility, because only your clinicians can confirm that the workflows match how your practice operates. Confirm each item with your AWS account team and compliance lead early.
Can a practice run OpenEMR on ECS Fargate without a partner?
Yes, a team with strong AWS, container and MySQL-compatible database skills can run it alone, and the project is open source under the GNU GPL v3.0. The harder part is the surrounding work: designing the security configuration, verifying the WAF and allowlist rules, handling PHP and database upgrades, and keeping evidence for assessments. Those tasks need time from people who understand both healthcare workflows and cloud operations. A partner is useful when your internal team lacks capacity or experience in one of those areas. Compare the cost of a scoped engagement with the hours your own staff would spend, and decide based on which skills you already have.
What recurring work remains after the deployment goes live?
The recurring work is the larger share of total ownership. Plan for upgrades, since the project's OpenEMR releases require PHP 8.3 or later and a MySQL- or MariaDB-compatible database, and recent security releases such as 8.3.0 and 8.4.0 fixed vulnerabilities in FHIR APIs, the patient portal, billing and the fee sheet. Each security release needs a review, a test in a non-production environment and a planned rollout. Backup restore tests are also recurring. AWS Backup takes daily, weekly and monthly backups, but a backup has no value until a restore is proven. Monitoring, access reviews and Aurora and Fargate version changes also recur.
Does deploying OpenEMR on ECS Fargate make us HIPAA compliant?
No. The openemr-on-ecs project states that deployment does not make you HIPAA compliant. HIPAA applies to your organization and its business associates, not to a piece of software. You still need a signed AWS Business Associate Addendum, written policies, workforce training, access controls, audit practices and a documented risk assessment under the Security Rule. HHS also states there is no HIPAA certification. Infrastructure choices such as encryption, network restriction and multi-factor authentication support those controls, but your compliance program determines whether they meet your obligations. Confirm specific requirements with your compliance counsel.
Which parts of the ECS setup should our security team review first?
Start with the network boundary and identity. Confirm that the WAF IP allowlist matches the networks that should reach OpenEMR, and that the application load balancer accepts only HTTPS. The Securing OpenEMR guide recommends removing setup.php and other admin scripts after installation and blocking direct web access to sites/*/documents. Then review multi-factor authentication, password policy and the upload file allowlist. Check encryption settings for EFS and Aurora, and confirm who can access the AWS console and the CDK deployment role. Document each control so an assessor can trace it to a requirement.
How DeployOpen scopes and delivers an OpenEMR AWS deployment
DeployOpen scopes an OpenEMR AWS deployment in writing before any work starts. The written scope names the components to be built in your AWS account (the Fargate service, Aurora MySQL Serverless v2, the EFS volumes, Valkey, the Application Load Balancer, AWS WAF and the IP allowlist), the environments covered, the AWS Backup schedule, the hardening baseline and the deliverables you will receive. Most engagements are fixed-scope, so the scope, deliverables and timeline are agreed on paper and changes go through a written change request. Ask for the same detail in any partner quote: which account and region the stack lands in, who holds the root and administrator credentials at handover, and what happens to the openemr-on-ecs project configuration after DeployOpen leaves. Because the project itself notes that its cost baseline reflects default settings and light usage, the scope should also state which sizing assumptions the quote is based on.
Delivery happens inside your AWS account, so the resulting infrastructure, logs, backups and encryption keys remain yours. The hardening work covers the OpenEMR application as well as the infrastructure: HTTPS-only access, removing setup and admin scripts after installation, blocking direct web access to the documents path, enforcing multi-factor authentication and strong password policies, and checking the WAF allowlist against the users who actually need access. DeployOpen then tests the running setup, including the public listener, the authentication flow and the separation between the application, the database and the shared file storage. Findings come back as a report with fixes and a retest, so you can see what changed. Your own team should confirm the hardening baseline against the OpenEMR security guidance and the sizing against its own usage before go-live.
DeployOpen prepares systems, configuration records, test results and runbooks that your compliance and security teams can use in a HIPAA risk assessment or an external review. It does not issue audit reports, attestations or certifications, and the HHS states that no Security Rule standard requires a certification of compliance. The evidence is only as good as the operating process behind it, so the scope should also name the work your organization still owns: a signed AWS Business Associate Addendum, written policies, workforce training, access reviews and the risk analysis itself. After go-live, DeployOpen can support the system through retainers for OpenEMR upgrades, patching after security releases, backup restore tests and continuing security testing. Ask for the retainer terms in writing, including what is covered per period and how urgent security updates are handled.

