Development with AWS Services

A ZIP-based Lambda function references version 3 of a shared dependency layer. The team publishes version 4, but the function still uses the old dependency. What should the developer do?

Show the answer

Correct answerC. Replace the function's layer reference with the version 4 ARN.

AWhy not this: Reserved concurrency changes execution capacity, not the attached layer version.

BWhy not this: An event payload supplies invocation input and does not replace the function's configured layer.

CWhy this is right: Updating the layer configuration to the version 4 ARN selects the newly published dependency.

DWhy not this: Timeout controls invocation duration and does not change the attached dependency version.

A function references a specific, immutable layer version ARN. Publishing a newer layer version does not update existing references; the function's layer configuration must explicitly reference the new version.