A deployment pipeline promotes container images to production by tag, such as v1.4.2, from a private Amazon ECR repository. An incident occurred after someone pushed different image content under an existing release tag. Which repository setting prevents this?
Show the answer
Correct answerD. Tag immutability enabled on the repository
AWhy not this: Lifecycle policies clean up old images; they do not stop a new push from taking over an existing tag.
BWhy not this: Scanning reports vulnerabilities in pushed images; it does not block a push that reuses a tag.
CWhy not this: Overwriting a tag happens through a push, not a delete, so denying BatchDeleteImage does not prevent it.
DWhy this is right: Immutable tags make ECR reject any push that would point an existing tag at different image content.
With tag immutability, ECR rejects a push that would move an existing tag to a different image, so a release tag always refers to the same image. Lifecycle policies, scanning, and delete permissions do not stop a push from reusing a tag.