Create CodeDeploy Application

Create CodeDeploy Application and Deployment Group (ECS Compute Platform)

Create a CodeDeploy application and deployment group for the Amazon ECS compute platform, the application is used during a deployment to reference the correct deployment group, target groups, listeners, and traffic rerouting behavior.

To create a CodeDeploy application

  1. Open the CodeDeploy console and choose Create application.

  2. In Application name, enter the name you want to use Deploy-Tripmgmt-Demo-App

  3. In Compute platform, choose Amazon ECS.

  4. Choose Create application.

    CodeDeploy Application create

To create a CodeDeploy deployment group

  1. On your application page’s Deployment groups tab, choose Create deployment group.
  2. In Deployment group name, enter a name that describes the deployment group deploygrp-tripmgmt-demo
  3. In Service role, choose a service role already created that grants CodeDeploy access to Amazon ECS.
  4. In Environment configuration, choose your Amazon ECS cluster name and service name.
  5. From Load balancers, choose the name of the load balancer that serves traffic to your Amazon ECS service.
  6. From Production listener port, choose the port and protocol for the listener that serves production traffic to your Amazon ECS service. (Production listener port : 80 and Test listener port : 8080)
  7. From Target group 1 name and Target group 2 name, choose the target groups used to route traffic during your deployment. Make sure that these are the target groups you created for your load balancer.
  8. Choose Reroute traffic immediately to determine how long after a successful deployment to reroute traffic to your updated Amazon ECS task.
  9. Under Original revision termination, make it 0 - 0 - 0 for Days, Hours and Minutes. As we are testing, we can terminate original tasks immediately after rerouting traffic.
  10. Choose Create deployment group.