5.1.7 • Published 7 months ago

@iehr/cdk v5.1.7

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
7 months ago

iEHR Infra

CDK scripts to setup the full stack:

  • S3 + CloudFront for static site
  • VPC for private network
  • Fargate for backend server
  • Aurora RDS for database

diagram

Install

iEHR uses npm workspaces for a monorepo configuration.

See Developer Setup for cloning the repository and installing dependencies.

Deploy

First, create a configuration file.

Next, it is strongly recommended to diff changes before deploying.

npx cdk diff -c config=my-config.json
npx cdk deploy -c config=my-config.json

Destroy

npx cdk destroy

Front End

Based on: https://github.com/aws-samples/aws-cdk-examples/tree/master/typescript/static-site

Creates:

  • S3 Bucket
  • CloudFront distribution
  • SSL Certificate
  • Route 53 Entries

Back End

Based on: Based on: https://github.com/aws-samples/http-api-aws-fargate-cdk/blob/master/cdk/singleAccount/lib/fargate-vpclink-stack.ts

Creates:

  • VPC
  • Security Groups
  • Fargate Task and Service
  • CloudWatch Log Groups
  • Load Balancer
  • SSL Certificate
  • Route 53 Entries

Storage

Based on:

The CloudFront distribution requires a public key for signature verification.

Generate a 2048 bit RSA key:

openssl genrsa -des3 -out private.pem 2048

Export the public key to a file:

openssl rsa -in private.pem -outform PEM -pubout -out public.pem

Open the public.pem file and ensure that it starts with -----BEGIN PUBLIC KEY-----. This is how you know that this file is the public key of the pair and not a private key.

Add the public key to the CDK infrastructure configuration.

Add the private key to the server configuration settings (JSON, AWS Parameter Store, etc).

5.1.5

8 months ago

4.3.195

12 months ago

5.1.4

8 months ago

5.0.5

9 months ago

4.3.196

12 months ago

5.1.3

8 months ago

5.0.4

9 months ago

4.3.197

12 months ago

5.1.2

8 months ago

5.0.3

10 months ago

4.3.198

11 months ago

5.1.1

8 months ago

5.0.2

10 months ago

4.3.199

11 months ago

5.1.0

9 months ago

5.0.1

10 months ago

5.0.0

10 months ago

4.3.179

1 year ago

4.3.190

1 year ago

4.3.191

1 year ago

4.3.192

1 year ago

4.3.193

1 year ago

4.3.194

12 months ago

4.3.184

1 year ago

4.3.185

1 year ago

4.3.186

1 year ago

4.3.187

1 year ago

4.3.188

1 year ago

4.3.200

11 months ago

4.3.189

1 year ago

4.3.201

11 months ago

4.3.202

11 months ago

4.3.180

1 year ago

4.3.181

1 year ago

4.3.182

1 year ago

4.3.183

1 year ago

4.4.0

10 months ago

5.1.7

7 months ago

5.1.6

8 months ago

4.3.176

1 year ago

4.3.177

1 year ago

4.3.178

1 year ago

4.3.175

1 year ago

4.3.174

1 year ago

4.3.170

1 year ago

3.0.4

2 years ago