Many AWS Lambda functions in an application share the same dependencies. The developer frequently updates those dependencies across each function, causing duplicated effort. What is the simplest way to keep shared dependencies up to date with minimal added complexity?
Choose an answer
Tap an option to check your answer.
Correct answer: Create a Lambda layer that contains the shared dependencies and reference that layer from each function..
Why this is the answer
Creating a Lambda layer for shared dependencies is the most efficient solution. Lambda layers allow you to package common libraries, custom runtimes, or other dependencies separately from your function code. Multiple Lambda functions can then reference this single layer. When dependencies need updating, you only update the layer, and all associated functions automatically use the new version without requiring individual code deployments. This significantly reduces duplicated effort and simplifies dependency management. Defining a maintenance window for functions doesn't automate dependency updates; it just schedules when you might manually do it. Upgrading runtime versions is important but doesn't address shared application-level dependencies. Storing dependencies in CodeCommit centralizes them but doesn't provide a mechanism for functions to automatically consume and update those dependencies without manual intervention or a custom build process.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed