Code Deploy
AWS CodeDeploy is a service that automates code deployments to any instance, including Amazon EC2 instances and instances running on-premises.
On-premise instances
Deploying a CodeDeploy application revision to an on-premises instance involves two major steps: 1. Configure each on-premises instance, register it with CodeDeploy, and then tag it. 2. Deploy application revisions to the on-premises instance.
Operating Systems
AWS CodeDeploy supports a wide variety of operating systems. AWS CodeDeploy provides agents that have been tested on Amazon Linux, Red Hat Enterprise Linux, Ubuntu Server, and Microsoft Windows Server.
CodeDeploy vs Beanstalk vs OpsWorks
AWS CodeDeploy is a building block service focused on helping developers deploy and update software on any instance, including Amazon EC2 instances and instances running on-premises. AWS Elastic Beanstalk and AWS OpsWorks are end-to-end application management solutions.
Unlike Elastic Beanstalk, CodeDeploy does not automatically handle capacity provisioning, scaling, and monitoring. Unlike CloudFormation and OpsWorks, CodeDeploy does not deal with infrastructure configuration and orchestration. CodeDeploy is a building block service focused on helping developers deploy and update software on any instance, including EC2 instances and instances running on-premises.
Deployment Configuration
- A deployment configuration specifies how the behavior for how deployment should proceed, including how to handle deployment failure, through for a deployment group.
- You can use a deployment configuration to perform zero-downtime deployments to multi-instance deployment groups.
- For example, if your application needs at least 50% of the instances in a deployment group to be up and serving traffic, you can specify that in your deployment configuration so that a deployment does not cause downtime.
- If no deployment configuration is associated with either the deployment or the deployment group, then by default AWS CodeDeploy will deploy to one instance at a time.
Multi-region deployments
- AWS CodeDeploy performs deployments with AWS resources located in the same region.
- To deploy an application to multiple regions, define the application in your target regions, copy the application bundle to an Amazon S3 bucket in each region, and then start the deployments using either a serial or parallel rollout across the regions.
Code Deploy options for ECS / Elastic Beanstalk
Lambda
Blue/Green does not apply to Lambda functions.
- Canary
- Linear
- All at Once
- Lambda aliases can be used for canary (without Code Deploy) - Use aws lambda update-alias along with routing-config.
EC2
Supports In-Place and Blue/Green
- All at Once
- Half at Once
- One at a Time