AWS CodeDeploy - Overview of Deployment Options on AWS

AWS CodeDeploy

AWS CodeDeploy is a fully managed deployment service that automates application deployments to compute services such as Amazon EC2, Amazon Elastic Container Service (Amazon ECS), AWS Lambda, or on-premises servers. Organizations can use CodeDeploy to automate deployments of an application and remove error prone manual operations from the deployment process. CodeDeploy can be used with a wide variety of application content including code, serverless functions, configuration files, and more.

CodeDeploy is intended to be used as a building block service that is focused on helping application developers deploy and update software that is running on existing infrastructure. It is not an end-to-end application management solution, and is intended to be used in conjunction with other AWS deployment services such as AWS CodeStar, AWS CodePipeline, other AWS Developer Tools, and third-party services (see AWS CodeDeploy Product Integrations for a complete list of product integrations) as part of a complete CI/CD pipeline. Additionally, CodeDeploy does not manage the creation of resources on behalf of the user.

Table 3: AWS CodeDeploy deployment features

Capability Description
Provision

CodeDeploy is intended for use with existing compute resources and does not create resources on your behalf. CodeDeploy requires compute resources to be organized into a construct called a deployment group in order to deploy application content.

Refer to Working with Deployment Groups in CodeDeploy for more details on linking CodeDeploy to compute resources.

Configure

CodeDeploy uses an application specification file to define customizations for compute resources.

Refer to CodeDeploy AppSpec File Reference for more details on the resource customizations with CodeDeploy.

Deploy

Depending on the type of compute resource that CodeDeploy is used with, CodeDeploy offers different strategies for deploying your application.

Refer to Working with Deployments in CodeDeploy for more details on the types of deployment processes that are supported.

Scale CodeDeploy does not support scaling of your underlying application infrastructure; however, depending on your deployment configurations, it might create additional resources to support blue/green deployments.
Monitor

CodeDeploy can monitor the success or failure of deployments and offers a history of all deployments, but does not provide performance or application-level metrics.

Refer to Monitoring Deployments in CodeDeploy for more details on the types of monitoring capabilities offered by CodeDeploy

The following diagram illustrates a general use case for CodeDeploy as part of a complete CI/CD solution. In this example, CodeDeploy is used in conjunction with additional AWS Developer Tools, namely AWS CodePipeline (automate CI/CD pipelines), AWS CodeBuild (build and test application components), and AWS CodeCommit (source code repository) to deploy an application onto a group of Amazon EC2 instances. CodeDeploy is used with other tools as part of a complete CI/CD pipeline. CodeDeploy manages deployment of application components onto compute resources that are part of a deployment group. All infrastrtcure components are created outside of CodeDeploy.

AWS CodeDeploy use case

AWS CodeDeploy for AWS Lambda

AWS CodeDeploy for AWS Lambda enables you to automate your serverless deployments, giving you greater control and visibility over your application releases. You can use CodeDeploy to deploy a new version of your serverless function to a small percentage of users or traffic and gradually increase traffic as you gain confidence in the new version. With CodeDeploy, you can define deployment groups, which represent a set of Lambda functions that receive traffic from the same event source. For example, you can create a deployment group for a set of Lambda functions that are initiated by API Gateway or an Amazon EventBridge rule. You can then create a deployment using CodeDeploy, which deploys the new version of your erverless function to a specified deployment group.

CodeDeploy also enables you to define a deployment configuration, which specifies the settings for a deployment, such as the deployment type, deployment strategy, and traffic shifting rules. You can use the Canary deployment strategy to deploy the new version of your serverless function to a small percentage of traffic and monitor the health and performance of the new version before increasing traffic to it.

By using CodeDeploy for serverless, you can automate your deployment process, reduce the time and effort required to release new versions of your application, and increase the stability and reliability of your serverless functions.