DOP-C02 Practice Question 62: ECR Tag Immutability Replication
AWS Certified DevOps Engineer – Professional (DOP-C02) · Test 7 · question 2 of 10
A company stores container images in an Amazon ECR private repository and wants to guarantee that a released image tag, such as v1.4.0, can never be overwritten by a later push, so that a running task definition always pulls the exact image it was tested against. The company also replicates the repository to a second AWS Region for disaster recovery. What should the company do?
Show answer and explanation
Answer:
Tag immutability is a per-repository setting, and when ECR creates a repository as the target of replication it does not carry over the source's tag immutability, image scanning, or KMS encryption settings, all of which are disabled by default on the replica. To get the same protection in both Regions, the company must enable it explicitly on each repository. Option B is wrong because replication does not inherit these settings from the source. Option C is wrong because a blanket deny on ecr:PutImage would also block pushing brand-new tags, not just overwrites of existing ones; tag immutability is the purpose-built control that allows new tags while blocking retagging. Option D is wrong because ECR repositories are tag-mutable by default; immutability must be turned on.
Reference: Private image replication in Amazon ECR