DevOps Tools Review – AWS Code Deploy

Blog home

Service Description

AWS CodeDeploy was one of the first DevOps focussed tools released by AWS to enable developers to smoothly enable code deployments. It enables automated deployment to other AWS services like EC2, Lambda functions, ECS and even on-premise servers.

It can be used to deploy numerous types of application content that include and not limited to:

  • code
  • serverless AWS Lambda functions
  • web and configuration files
  • executables
  • packages
  • scripts
  • multimedia files

Some of the major advantages of CodeDeploy is that it makes it easier for a developer to:

  • Rapidly release new features.
  • Update AWS Lambda function versions.
  • Avoid downtime during application deployment.
  • Handle the complexity of updating your applications, without many of the risks associated with error-prone manual deployments.

Example Use Case Scenarios

Scenario 1 : Customer starting DevOps transformation – A Quick Win Scenario – Transforming deployment process

A customer has not yet fully implemented infrastructure as code. The customer has a requirement to quickly transform internal practises to align with DevOps principles. CodeDeploy can be leveraged in this scenario to achieve a quick win. Some of the steps / consulting will involveĀ 

  • making sure the code is stored in a GitHub / CodeCommit repository / revisions of code package is uploaded to an s3 bucket
  • choose a relevant deployment strategy in-place / blue-green deployment
  • Setup deployment groupsĀ 
  • Configure code deploy to deploy based on the chosen strategy

Scenario 2 : Customer leveraging a Hybrid Cloud environment – On premise Deployments

A customer has an architecture that spans on-premise and the AWS cloud. Instance groups are located both on-premises and in the AWS cloud. The customer needs to make the deployment process automated and smoother to both the instance groups. This can be achieved by actioning the following

  • making sure the code is stored in a GitHub / CodeCommit repository / revisions of code package is uploaded to an s3 bucket
  • Code deploy agent needs to be installed on the instances
  • On-premise instances need to be registered to code deploy
  • Deployment groups are created for the instance groups

Scenario 3 : Customer leveraging microservices environment leveraging lambda functions and ECS – Minimise downtime

A customer has an architecture that leverages ECS behind an API gateway and lambdas. Code deploy with blue green deployment strategy can be used to perform deployments in this scenario. The steps can be found in AWS documents to leverage this – https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-steps-ecs.html#deployment-steps-what-happens

Caveats

 

Limitations

  • If Database changes are involved as part of a deployment process as code deploy doesn’t support that. Its then better as part of a pipeline
  • If manual approval steps are required, a pipeline also needs to be leveraged along with code deploy