AWS CDK Settings Reference | Medplum
On this page
When deploying Medplum on AWS using the provided CDK, you will need to create a configuration file to define your infrastructure settings. This is a JSON file that contains all of the custom infrastructure configuration settings for your environment.
Here is a full example for the Medplum staging environment. See the detailed information for each setting below.
{
"name": "staging",
"stackName": "MedplumStagingStack",
"accountNumber": "647991932601",
"region": "us-east-1",
"domainName": "medplum.com",
"apiDomainName": "api.staging.medplum.com",
"apiPort": 5000,
"apiSslCertArn": "arn:aws:acm:us-east-1:647991932601:certificate/159b257b-a180-49c6-b188-4dc962d8e708",
"appDomainName": "app.staging.medplum.com",
"appSslCertArn": "arn:aws:acm:us-east-1:647991932601:certificate/b0d65b27-2ea8-4377-82e1-c41aa067655b",
"storageBucketName": "medplum-staging-storage",
"storageDomainName": "storage.staging.medplum.com",
"storageSslCertArn": "arn:aws:acm:us-east-1:647991932601:certificate/2205bb8c-7da9-4992-b8ec-c2c79b43b586",
"storagePublicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA3cnmD3HQbJU7WTGT2ZSO\nLt71c+xQ91m5FAzdFagfkQAG0CeyzHq8VzjLPinLDlOWCwQXfunjoBMP7iyVt/pE\n46ngR55In3UlzsMySHpUAi740u6oh0VeJOZA1x/FrVRYsxFx4XFJ92gcs5VvdT66\nwWTX7KznaIrxIvTWz384ogqXfg41QeoIISM2YUjqSMkyx7wY3xGrFvG5UuAAivbr\ni/ZZkkM2q9frpidpJx4evIuaHZS8fstbHFDbbFFqDMyuk7eAJRea1KH5TsjCHvTK\n5ANRyzq+mty47TKrI+2AQsxjH4mel2lC/at3udgtmfz1MTT7daFWfDKsVn8h3DsA\nJwIDAQAB\n-----END PUBLIC KEY-----",
"maxAzs": 2,
"rdsInstances": 1,
"desiredServerCount": 1,
"serverImage": "medplum/medplum-server:4.0",
"serverMemory": 512,
"serverCpu": 256,
"loadBalancerLoggingEnabled": true,
"loadBalancerLoggingBucket": "medplum-logs-us-east-1",
"loadBalancerLoggingPrefix": "elb-staging",
"clamscanEnabled": true,
"clamscanLoggingBucket": "medplum-logs-us-east-1",
"clamscanLoggingPrefix": "clamscan"
}
name
The short name of your environment. This should be unique among your Medplum deployments. This will be used as part of Parameter Store path and CloudWatch Logs path. For example, prod or staging.
stackName
The long name of your environment. This will be included in many of the AWS resource names created by CDK. For example, MyMedplumStack or MedplumStagingStack.
accountNumber
Your AWS account number. A 12-digit number, such as 123456789012, that uniquely identifies an AWS account. Account IDs are not considered sensitive information.
region
The AWS region where you want to deploy.
domainName
The domain name that represents the common root for all subdomains. For example, medplum.com, staging.medplum.com, or my-med-app.io.
apiDomainName
The domain name of the API server. This should be a subdomain of domainName. For example, api.medplum.com or api.staging.medplum.com.
apiPort
The port number that the API server binds to inside the Docker image. By default, you should use 8103. In some cases, you may need to use 5000.
apiSslCertArn
The ARN of the ACM Certificate for the API server domain that you registered before.
appDomainName
The domain name of the app server. This should be a subdomain of domainName. For example, app.medplum.com or app.staging.medplum.com.
appSslCertArn
The ARN of the ACM Certificate for the app server domain that you registered before.
storageBucketName
The name of the S3 bucket for file storage that you created before.
storageDomainName
The domain name that will be used to access the file storage using presigned URLs. For example, storage.medplum.com.
storageSslCertArn
The ARN of the ACM Certificate for the storage server domain that you registered before.
storagePublicKey
The contents of the public key file that you created before. By default, the file name is public.pem. The contents should start with -----BEGIN PUBLIC KEY-----.
maxAzs
The maximum number of availability zones to use. If you want to use all availability zones, choose a large number such as 99. If you want to restrict the number, for example to manage EIP limits, then choose a small number such as 1 or 2.
rdsInstances
The number of running RDS instances. Use 1 for a single instance, or 2 for a hot failover on standby.
desiredServerCount
The number of running ECS/Fargate instances in steady state. Use 1 when getting started, and increase as necessary or for high availability and scale.
serverImage
The DockerHub server image to deploy. Use medplum/medplum-server:4.0 for the most recent version published by the Medplum team. Or use your own repository if you need to deploy a custom instance.
serverMemory
The amount (in MiB) of memory used by the ECS/Fargate instance. For example, 512, 1024, 2048, 4096, etc.
serverCpu
The number of cpu units used by the task. For example, 512, 1024, 2048, 4096, etc.
loadBalancerLoggingEnabled
Boolean flag to Enable Access Logs to ELB.