Gitlab CI is our pipeline of choice here. Inside of the .gitlab-ci.yml file we have a build, test, push and deploy stages. Take note of the below:
With CodeDeploy when deploying to ECS, the AWS CLI is used to invoke a deployment. With the aws ecs deploy command we pass in the `appspec.yml` and the expected `taskdef.json’. The AppSpec file is used to defines each deployment as a series of lifecycle event hooks, which are defined in the file and a task definition which describes the container and volume definitions of an Amazon Elastic Container Service task. You can specify which Docker images to use, the required resources, and other configurations related to launching the task definition through an Amazon ECS service or task.
Note example of command below: