Skip to content

This project recasts into an AWS Cloud Development Kit (CDK) application the prescriptive guidance for using CloudFormation's inbuilt blue-green deployment strategy for Amazon Elastic Container Service (ECS).

License

Notifications You must be signed in to change notification settings

shankben/startup-snack-blue-green-ecs

Repository files navigation

Startup Snack | Blue-Green Deployments for Amazon Elastic Container Service

This project recasts into an AWS Cloud Development Kit (CDK) application the prescriptive guidance for using CloudFormation's inbuilt blue-green deployment strategy for Amazon Elastic Container Service (ECS).

As a simple example, this application uses one ECS Fargate service with the public nginxdemos/hello Docker image. To demonstrate the blue-green deployment strategy, specify as a CDK context variable the particular Docker image tag for nginxdemos/hello to deploy. If not specified at the command line, latest will be used for the default image tag.

Setup

  1. Install CDK globally: npm install -g aws-cdk
  2. Install local Node.js dependencies: npm install
  3. Build the project: npm run build
  4. Bootstrap the CDK Toolkit into your AWS account: cdk bootstrap
  5. Deploy the stack: cdk deploy -c image-tag=[latest|plain-text]

Useful Commands

  • npm run build compile project to dist
  • npm run clean delete everything in cdk.out and dist
  • npm run watch watch for changes and compile
  • cdk deploy deploy this stack to your default AWS account/region
  • cdk diff compare deployed stack with current state
  • cdk synth emits the synthesized CloudFormation template

About

This project recasts into an AWS Cloud Development Kit (CDK) application the prescriptive guidance for using CloudFormation's inbuilt blue-green deployment strategy for Amazon Elastic Container Service (ECS).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published