Five Lambda functions share the same heavy utility library, and updating it means redeploying all five packages. What Lambda feature centralizes shared code?
A.Lambda aliases
Aliases route traffic between versions — they don't share code.
B.Lambda layers
Correct. Shared dependencies live in a layer, updated once.
C.Lambda versions
Versions are per-function snapshots, not shared libraries.
D.Lambda environment variables
Env vars hold configuration, not code.
Why this answer
Layers package shared dependencies/runtimes once and attach to multiple functions — update the layer version instead of each deployment package. Aliases point at versions for traffic shifting; versions are immutable snapshots.
Correct answer: B · Last reviewed 2026-10-26
Official AWS references
Practice this interactively
Answer without seeing the solution first in the CI/CD & Observability practice session.
Practice CI/CD & Observability