Create an application with CodeDeploy - Amazon CodeDeploy
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

Create an application with CodeDeploy

An application is simply a name or container used by CodeDeploy to ensure that the correct revision, deployment configuration, and deployment group are referenced during a deployment. You can use the CodeDeploy console, the Amazon CLI, the CodeDeploy APIs, or an Amazon CloudFormation template to create applications.

Your code, or application revision, is installed to instances through a process called a deployment. CodeDeploy supports two types of deployments:

  • In-place deployment: The application on each instance in the deployment group is stopped, the latest application revision is installed, and the new version of the application is started and validated. You can use a load balancer so that each instance is deregistered during its deployment and then restored to service after the deployment is complete. Only deployments that use the EC2/On-Premises compute platform can use in-place deployments. For more information about in-place deployments, see Overview of an in-place deployment.

  • Blue/green deployment: The behavior of your deployment depends on which compute platform you use:

    • Blue/green on an EC2/On-Premises compute platform: The instances in a deployment group (the original environment) are replaced by a different set of instances (the replacement environment) using these steps:

      • Instances are provisioned for the replacement environment.

      • The latest application revision is installed on the replacement instances.

      • An optional wait time occurs for activities such as application testing and system verification.

      • Instances in the replacement environment are registered with an Elastic Load Balancing load balancer, causing traffic to be rerouted to them. Instances in the original environment are deregistered and can be terminated or kept running for other uses.

      Note

      If you use an EC2/On-Premises compute platform, be aware that blue/green deployments work with Amazon EC2 instances only.

    • Blue/green on an Amazon Lambda or Amazon ECS compute platform: Traffic is shifted in increments accorinding to a canary, linear, or all-at-once deployment configuration. For more information, see Deployment configuration.

    • Blue/green deployments through Amazon CloudFormation: Traffic is shifted from your current resources to your updated resources as part of an Amazon CloudFormation stack update. Currently, only ECS blue/green deployments are supported.

    For more information about blue/green deployments, see Overview of a blue/green deployment.

When you use the CodeDeploy console to create an application, you configure its first deployment group at the same time. When you use the Amazon CLI to create an application, you create its first deployment group in a separate step.

To view a list of applications already registered to your Amazon account, see View application details with CodeDeploy. For information about using an Amazon CloudFormation template to create an application, see Amazon CloudFormation templates for CodeDeploy reference.

Both deployment types do not apply to all destinations. The following table lists which deployment types work with deployments to the three types of deployment destinations.

Deployment destination In-place Blue/green
Amazon EC2 Yes Yes
On-premises Yes No
Serverless Amazon Lambda functions No Yes
Amazon ECS applications No Yes