Deployment groups identify the targets where application artifacts are placed. In our hands-on exercise, we will be working with EC2 instances hosted in an Auto Scaling group. This group of instances is clubbed together and called a deployment group. The actions that you define in the deployment configuration are performed on these servers.
Deployment configurations – fine-tune your deployment settings
You might want to shift all traffic to the new Lambda function in one go, or maybe you want to doit in increments. You may also want to wait for X minutes before shifting the traffic to new deployments. Fine-tuning such settings is a function of deployment configurations. With health checks, you can instruct the service to only proceed further when a minimum threshold of healthy instances is ensured. These settings make rolling out and rolling back the change very reliable.
Deployment type – a strategy for rolling out change
CodeDeploy primarily supports two different deployment types: in-place and blue-green. Thiscontrols the approach that is used to roll out application changes inside the deployment group. Depending on which approach you choose, CodeDeploy interacts with additional services on your behalf to achieve the desired deployment state.
Next, let’s walk through some features that make it a valuable choice for software deployments in the cloud.
Key features offered by CodeDeploy
In addition to regular code deployment capabilities, the service offers great flexibility around third-party integrations and adjusts quite well to your CI/CD pipeline needs. Just like CodeBuild, CodeDeploy can also operate in isolation by directly consuming build artifacts from supported sources – S3 and GitHub.
Integrations with EC2 Auto Scaling and Elastic Load Balancing
If you’re working with EC2 Auto Scaling or ELBs, CodeDeploy can natively integrate with those services to roll out applications in a controlled manner. In a blue-green deployment scenario, CodeDeploy ensures that your Auto Scaling configurations are copied over to a new group, provisions the instances, deploys code, and registers them with the load balancer to serve traffic, after your deployments pass the validation tests. It can retain your previous set of instances, gradually scale them down, or immediately delete them for additional cost savings. Imagine building all the orchestration around these services on your own. You could use other agent-based configuration systems to manage similar deployments, but the native integration is something that is a big gain that comes with a low effort.