I'm using Gitlab and the AWS CLI to build code to an image, register a new task with the new image and -- hopefully -- updating the service with the new task definition
In my building script, registering the new task definition with the new image is working, using the command:
aws ecs register-task-definition --cli-input-json file://input.json --region $AWS_REGION
And then I'm trying to update my service with the new task definition using
aws ecs update-service --cluster $AWS_ECS_CLUSTER --service $AWS_ECS_SERVICE --force-new-deployment --region $AWS_REGION
When I go to the task definitions in ECS, I can see the new one, but the service alwasy creates new tasks using the old task definition, even though a new one is there.
I'm guessing that there's some delay between when the register-task-definition command returns and when the new definition is ready. Is there a way to check the status of the new task, or get an update so that I get new tasks with the new definition?