AWS ECS Service implementation guide Task Definition with New Container Image Tag
I'm testing a new approach and I'm working with an scenario where my AWS ECS service isn't picking up the new container image tag after an update... I have a CI/CD pipeline that builds and pushes a new image to ECR with a specific tag, and the ECS service is configured to use that tag. However, when I deploy using the AWS CLI with the following command: ```bash aws ecs update-service --cluster my-cluster --service my-service --force-new-deployment ``` The service continues to run the old image. I double-checked my task definition and it seems to be pointing to the correct image tag, which is `my-app:latest`. Here's the relevant snippet of the task definition: ```json { "containerDefinitions": [ { "name": "my-app", "image": "my-account.dkr.ecr.us-east-1.amazonaws.com/my-app:latest", "essential": true, "memory": 512, "cpu": 256 } ], "family": "my-app-task" } ``` I've tried updating the task definition manually via the AWS console, but even then, the old container still runs. The ECS service events indicate itβs recognizing the new deployment: ``` Service my-service is deploying a new task set for task definition my-app-task:1 ``` However, shortly after, it reverts back to the old task set without any apparent reason. I ensured that the new image is pushed successfully to ECR by checking the repository. Additionally, I verified that the IAM roles have the right permissions to pull the new image from ECR. Any insights on what might be going wrong or what additional steps I can take to ensure the new container image is deployed? This is for a REST API running on Ubuntu 22.04. Thanks for any help you can provide!