In the Build provider section, select AWS CodeBuild
For the Build stage part
Region, select Singapore
For Project name, select aws-fcj-management-build
Select Single build
Then select Next
For Deploy stage
Select Amazon ECS (Blue/Green)
Select Next
Configure Deploy
For Deploy provider, select Amazon ECS (Blue/Green).
Region, select Singapore.
Select AWS CodeDeploy application name.
Select AWS CodeDeploy deployment group.
Configure Amazon ECS task definition.
Configure AWS CodeDeploy AppSpec file.
For Dynamically Update task definition image, select BuildArtifact and enter Placeholder text in the task definition with the same image name of the taskdef.json file.
Select Next.
Check again and select Create pipeline
Wait about 5 minutes we will see 2 stages Source and Build completed.
About 5+ minutes Stage Deploy no problem. We will click on Details to see details of the Deploy process.
In About 5 more minutes we will see the traffic gradually shifting from Original to Replacement.
About the next 5 minutes we will see Deployment lifecycle events complete all the steps.
It takes more than 1 hour to complete the deployment and traffic shift successfully.
We will test Amazon ECS Cluster
Select Task
Select the task with the same group as the configuration file taskdef.json and appspec.yaml
View detailed information of Task, then copy Public IP of the task to try access to the application via port 5000