AWS CodeDeploy
User Guide (API Version 2014-10-06)

The procedures in this guide support the new console design. If you choose to use the older version of the console, you will find many of the concepts and basic procedures in this guide still apply. To access help in the new console, choose the information icon.

Create an Application for an In-Place Deployment (Console)

To use the AWS CodeDeploy console to create an application for an in-place deployment:

Warning

Do not follow these steps if:

  • You have not prepared your instances to be used in AWS CodeDeploy deployments. To set up your instances, follow the instructions in Working with Instances for AWS CodeDeploy, and then follow the steps in this topic.

  • You want to create an application that uses a custom deployment configuration, but you have not yet created the deployment configuration. Follow the instructions in Create a Deployment Configuration, and then follow the steps in this topic.

  • You do not have a service role that trusts AWS CodeDeploy with the minimum required trust and permissions. To create and configure a service role with the required permissions, follow the instructions in Step 3: Create a Service Role for AWS CodeDeploy, and then return to the steps in this topic.

  • You want to select a Classic Load Balancer, Application Load Balancer, or Network Load Balancer in Elastic Load Balancing for the in-place deployment, but have not yet created it.

To create an application for an in-place deployment using the AWS CodeDeploy console:

  1. Sign in to the AWS Management Console and open the AWS CodeDeploy console at https://console.aws.amazon.com/codedeploy.

    Note

    Sign in with the same account or IAM user information that you used in Getting Started with AWS CodeDeploy.

  2. In the navigation pane, expand Deploy, and then choose Getting started.

  3. Choose Create application.

  4. In Application name, enter the name of your application .

  5. From Compute Platform, choose EC2/On-premises.

  6. Choose Create application.

  7. On your application page, from the Deployment groups tab, choose Create deployment group.

  8. In Deployment group name, enter a name that describes the deployment group.

    Note

    If you want to use the same settings used in another deployment group (including the deployment group name; tags, Amazon EC2 Auto Scaling group names, or both; and the deployment configuration), specify those settings on this page. Although this new deployment group and the existing deployment group have the same name, AWS CodeDeploy treats them as separate deployment groups, because they are each associated with separate applications.

  9. In Service role, choose a service role that grants AWS CodeDeploy access to your target instance.

  10. In Deployment type, choose In-place.

  11. In Environment configuration, select any of the following:

    1. Amazon EC2 Auto Scaling groups: Enter or choose the name of an Amazon EC2 Auto Scaling group to deploy your application revision to. When new Amazon EC2 instances are launched as part of an Amazon EC2 Auto Scaling group, AWS CodeDeploy can deploy your revisions to the new instances automatically. You can add up to 10 Amazon EC2 Auto Scaling groups to a deployment group.

    2. Amazon EC2 instances or On-premises instances: In the Key and Value fields, enter the values of the key-value pair you used to tag the instances. You can tag up to 10 key-value pairs in a single tag group.

      1. You can use wildcards in the Value field to identify all instances tagged in certain patterns, such as similar Amazon EC2 instance, cost center, and group names, and so on. For example, if you choose Name in the Key field and enter GRP-*a in the Value field, AWS CodeDeploy identifies all instances that fit that pattern, such as GRP-1a, GRP-2a, and GRP-XYZ-a.

      2. The Value field is case sensitive.

      3. To remove a key-value pair from the list, choose Remove tag.

      As AWS CodeDeploy finds instances that match each specified key-value pair or Amazon EC2 Auto Scaling group name, it displays the number of matching instances. Choose the number to see more information about the instances.

      If you want to refine the criteria for the deployed-to instances, choose Add tag group to create an tag group. You can create up to three tag groups with up to ten key-value pairs each. When you use multiple tag groups in a deployment group, only instances that are identified by all the tag groups are included in the deployment group. That means an instance must match at least one of the tags in each of the groups to be included in the deployment group.

      For information about using tag groups to refine your deployment group, see Tagging Instances for AWS CodeDeploy Deployments.

  12. In Deployment settings, choose a deployment configuration to control the rate your application is deployed to instances, such as one at a time or all at once. For more information about deployment configurations, see Working with Deployment Configurations in AWS CodeDeploy.

  13. (Optional) In Load balancer, select Enable load balancing, and then choose an existing Classic Load Balancer, Application Load Balancer, or Network Load Balancer to manage traffic to the instances during the deployment processes.

    Each instance is deregistered from the load balancer (Classic Load Balancers) or target group (Application Load Balancers and Network Load Balancers) to prevent traffic from being routed to it during the deployment. It is re-registered when the deployment is complete.

    For more information about load balancers for AWS CodeDeploy deployments, see Integrating AWS CodeDeploy with Elastic Load Balancing.

  14. (Optional) Expand Advanced, and configure any options you want to include in the deployment, such as Amazon SNS notification triggers, Amazon CloudWatch alarms, or automatic rollbacks.

    For more information, see Configure Advanced Options for a Deployment Group.

  15. Choose Create deployment group.

The next step is to prepare a revision to deploy to the application and deployment group. For instructions, see Working with Application Revisions for AWS CodeDeploy.