AWS Certified Developer – Associate — Question 301

A company has three AWS Lambda functions that are written in Node.js. The Lambda functions include a mix of custom code and open-source modules. When bugs are occasionally detected in the open-source modules, all three Lambda functions must be patched.

What is the MOST operationally efficient solution to deploy a patched open-source library for all three Lambda functions?

Answer options

Correct answer: D

Explanation

AWS Lambda layers are designed specifically to share common dependencies and libraries across multiple functions, reducing deployment package size and simplifying updates. By packaging the open-source modules into a layer, you can patch the library once and simply update the Lambda functions to reference the new layer version. Other options, such as hosting a private registry on Amazon EC2 or downloading modules during cold starts via Amazon CloudFront, introduce unnecessary operational complexity and performance overhead.