Topic 1 Question 5
A data engineer maintains custom Python scripts that perform a data formatting process that many AWS Lambda functions use. When the data engineer needs to modify the Python scripts, the data engineer must manually update all the Lambda functions. The data engineer requires a less manual way to update the Lambda functions. Which solution will meet this requirement?
Store a pointer to the custom Python scripts in the execution context object in a shared Amazon S3 bucket.
Package the custom Python scripts into Lambda layers. Apply the Lambda layers to the Lambda functions.
Store a pointer to the custom Python scripts in environment variables in a shared Amazon S3 bucket.
Assign the same alias to each Lambda function. Call reach Lambda function by specifying the function's alias.
ユーザの投票
コメント(9)
B. Package the custom Python scripts into Lambda layers. Apply the Lambda layers to the Lambda functions. Explanation: Lambda layers allow you to centrally manage shared code and dependencies across multiple Lambda functions. By packaging the custom Python scripts into a Lambda layer, you can simply update the layer whenever changes are made to the scripts, and all the Lambda functions that use the layer will automatically inherit the updates. This approach reduces manual effort and ensures consistency across the functions.
👍 20TonyStark01222024/09/20- 正解だと思う選択肢: B
Centralized Code Management: Lambda layers allow you to store and manage the custom Python scripts in a central location outside the individual Lambda function code. This eliminates the need to update the script in each Lambda function manually. Reusable Code: Layers provide a way to share code across multiple Lambda functions. Any changes made to the layer code are automatically reflected in all the functions using that layer, streamlining updates. Reduced Deployment Size: By separating core functionality into layers, you can keep the individual Lambda function code focused and smaller. This reduces deployment package size and potentially improves Lambda execution times.
👍 4pypelyncar2024/09/23 Typical use case for Lambda Layers. Option B.
👍 2kj072024/03/14
シャッフルモード