Added
A company deploys a containerized service to Amazon ECS on Fargate. Its CodePipeline pipeline currently builds an image, pushes a mutable latest tag to Amazon ECR, and deploys that tag to production. A rollback sometimes starts new tasks with a different image because another build has overwritten the tag. The company needs deployments to identify an exact image and to support safe automated rollback, while keeping the existing ECS deployment model. What should the team change?
An image digest identifies the exact ECR image contents, so a later tag update cannot change what an earlier task definition references. The ECS deployment circuit breaker can fail a deployment and roll back to the last completed deployment when configured for rollback. Forcing a new deployment with a mutable tag can still resolve to different image content. ECS does not pull container images from S3 in place of a registry, and extra tasks do not make the reference immutable.