Understanding AWS CodeDeploy Components

Discover the AWS CodeDeploy core components and its integration into a software delivery pipeline.

Setting up a deployment using AWS CodeDeploy is not a straightforward task. It's a relatively complex process, and we need to first understand the terminologies used by AWS CodeDeploy.

AWS CodeDeploy container configuration

Let’s understand the different types of containers that AWS CodeDeploy uses in deploying an application:

  • An application is an outermost container that contains our application code, the deployment configuration, and the target instances where the application is deployed.

  • The deployment group will contain the service role that grants AWS CodeDeploy access to the target instances, the deployment type, an instance, or a group of instances identified by a tag group. Each deployment group can contain many deployment configurations. A deployment configuration is a set of rules that determines the actions to perform when a deployment fails. Let’s unpack this further with an example. A default deployment configuration provided by AWS is “CodeDeployDefault.HalfAtATime,” which means if our application must be deployed to 10 instances, we will initially deploy to 5 instances. If there are any failures while deploying to those instances, the entire deployment is rolled back, and deployment will not be attempted in the remaining 5 instances. An application can include one or more deployment groups. Each deployment group uses the deployment type to determine how to install the application on target instances. Currently, it supports two deployment types:

    • In-place deployment: This deployment causes an outage to the customer because the running application is stopped, and the latest release is uploaded, started, and validated.

    • Blue-green deployment: By following this deployment type, we can release the latest revision without causing an outage to the customer. This deployment type may be expensive as we need to maintain two separate sets of infrastructure for blue and green.

Get hands-on with 1400+ tech skills courses.