📚
Aditya Kumar
  • About me
    • Resume
  • Automating Amazon EBS
  • ECS Bluegreen with Lambda SWAP
  • First drive of AWS Chatbot
  • Talking COVID-19 with Amazon Lex
  • Managed Jupyter on AWS SageMaker
  • Extending GitOps to reliability-as-code with GitHub and StackPulse
  • HashiCorp Packer for Machine Images
  • Deleted My Web App and App Service Plan, Whats Next ?
  • Using Terraform for zero downtime updates of an Auto Scaling group in AWS
  • Automating Instagram Posts with AI: A Step-by-Step Guide
  • Merge Commit Message Validator for Pull Requests
  • Automating Jenkins Data Backup with rsync and Slack Notifications
  • Creating a One-Time Setup for Kubernetes Cluster with Worker Nodes Using HAProxy
Powered by GitBook
On this page
  • Problem Statement !!
  • My approach to solve this problem

Was this helpful?

ECS Bluegreen with Lambda SWAP

PreviousAutomating Amazon EBSNextFirst drive of AWS Chatbot

Last updated 4 years ago

Was this helpful?

Problem Statement !!

The ask was to create a ECS multiAZ service mesh with load balancer and AutoScaling setup. The Service application should have zero downtime when a new update is rolled out to the service mesh.One click disaster recovery should auto trigger in case if the Unittest suit/UAT for the deployment is not passed in a single shot!!

My approach to solve this problem

Since the ask was mainly focused around Zero Downtime , I planned out to use following AWS services to overcome this problem.

  • ECR

  • ECS Cluster

  • Load Balancer (Network)

  • AutoScaling

  • EC2

  • CodeCommit,CodeBuild,CodeDeploy,CodePipeline

  • Lambda

  • CloudFormation

The entire infra provisioning is being monitored by CloudFormation nested stack for changes and according lambda is planned to update stack or rollback stack. As ECS ZeroDowntime was a requirement hence a Lambda SWAP application is also planned to switch load between diffrent AZ's and also to maintain Disaster Recovery a terraform stack is planned which remains Hot for onetime deployment and in the mean time the Lambda Application also heals the reported problems in ECS cluster!! AutoRemediation for certain ECS parameters are taken care of in the Lambda Application since it deals with LoadBalancer and EC2 AZ's.

I have used a sample PHP application from AWS for ECR and ECS. Link to

The entire ECS Application is available at my

Github Repo
Github
Kedarkantha,Uttarakhand,India