A data engineer manages custom Python scripts used by multiple AWS Lambda functions to format data. Currently, when the scripts change, the engineer must update every Lambda function manually. Which approach reduces the manual effort to update the functions?
Choose an answer
Tap an option to check your answer.
Correct answer: Package the custom Python scripts into Lambda layers. Apply the Lambda layers to the Lambda functions..
Why this is the answer
Packaging custom Python scripts into Lambda layers is the most efficient solution for reducing manual effort. Lambda layers allow you to centralize common code and dependencies, which can then be shared across multiple Lambda functions. When the scripts are updated, you only need to update the layer, and all associated functions will automatically use the new version. Storing scripts in S3 with a pointer (either in the execution context or environment variables) would still require each Lambda function to be updated to pull the new script version, or at least to be redeployed to pick up a new pointer, which doesn't fully automate the process. Assigning aliases to functions does not address the underlying issue of code updates; aliases are for versioning and routing traffic, not for sharing code.
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