Testing and Deployment
A test Lambda function uses an Amazon ECR image tagged test. After that tag is moved to a new image, invocations still run the previous code; what should the developer do?
Show the answer
Correct answerD. Update the function code using the image URI
AWhy not this: Publishing a version snapshots the current function rather than retrieving the newly tagged image.
BWhy not this: Environment-variable changes do not make Lambda resolve the image tag to a new digest.
CWhy not this: Lambda retains the resolved image digest; this is not a cache-expiration issue.
DWhy this is right: Updating function code makes Lambda resolve the image URI to the image currently associated with the tag.
Lambda resolves an image tag to a specific digest when function code is updated. Moving the ECR tag does not update the function automatically; publishing the unchanged function also preserves the existing image.