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
Open the CodeDeploy console and choose Create application.
In Application name, enter the name you want to use
In Compute platform, choose Amazon ECS.
Choose Create application.
To create a CodeDeploy deployment group
- On your application page’s Deployment groups tab, choose Create deployment group.
- In Deployment group name, enter a name that describes the deployment group
- In Service role, choose a service role already created that grants CodeDeploy access to Amazon ECS.
- In Environment configuration, choose your Amazon ECS cluster name and service name.
- From Load balancers, choose the name of the load balancer that serves traffic to your Amazon ECS service.
- From Production listener port, choose the port and protocol for the listener that serves production traﬃc to your Amazon ECS service. (Production listener port : 80 and Test listener port : 8080)
- 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.
- Choose Reroute traffic immediately to determine how long after a successful deployment to reroute traffic to your updated Amazon ECS task.
- 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.
- Choose Create deployment group.