CodeDeploy
Icon
About
A deployment service that automates application deployment.
This service can automatically initiate rollback in case of failed deployments or trigger CloudWatch Alarm.
appsec.ymlfile defines how deployments happens.Provides gradual control on deployments.
CodeDeploy Agent
The agent is responsible to deploy artifacts onto servers like EC2 instances.
As a prerequisite this agent should be installed in EC2 instance.
The EC2 instance must have sufficient permissions to access
S3to get deployment bundles.
Deployment Group
Deployment Group allows to group deployments settings in one place.
It consists of multiple deployments.
Rollbacks and Redeploys
Rollback is a redeploy a previously deployed revision of your application.
This can be done automatically i.e., when a failure occurs based on some CloudWatch Alarm or Manually.
Disable rollbacks - Do not perform rollbacks for this deployment.
When rollback is performed,
CodeDeployperforms a new deployment with last known good revision i.e., its not a restored version.
appSec.yml
This YAML file consists of all the deployment instruction needed to deploy the application using
CodeDeploy.This file should be present in the root of project.
Life cycle hooks based on type of deployment can be configured in this file.
This life cycle hooks provides a way to verify deployment after each deployment phase.
Integrations
EC2/On-premises platform
CodeDeployallows to deploy to EC2 instances & on-premises servers.It allows to perform in-place deployments (for EC2 instances or ASG deployments) or blue-green deployments (for ASG deployments, must be using an ELB).
This requires CodeDeploy Agent to run on target instances.
Deployment speed could be defined.
Deployment StrategyDescriptionAllAtOnceWill have most downtime
HalfAtATimeReduces capacity by
50%and does in-place deploymentsOneAtATimeSlowest, lowest availability impact
Custom
Define your own rate of deployment
Lambda Platform
CodeDeployhelps to automate traffic shifts for Lambda aliases.Feature is integrated with SAM framework.
This traffic shift can be done using different strategies.
Strategy TypeStrategy NamesDescriptionLinearLambdaLinear10PercentEvery3MinutesLambdaLinear10PercentEvery10MinutesGrow traffic every N minutes untill 100%
CanaryLambdaCanary10Percent5MinutesLambdaCanary10Percent30MinutesTry
Xpercent for N minutes then 100%AllAtOnce-
No time to test the updated version, directly switch all traffic to specified version
ECS Platform
This platform helps to automate the deployment of new ECS task definition.
Supports only Blue/Green deployments.
Application load balancer is required to do the traffic shift.
The traffic shift strategy is same as strategies mentioned for Lambda Platform.
Last updated