DVA-C02 · Question #183
A developer is building a serverless application that is based on AWS Lambda. The developer initializes the AWS software development kit (SDK) outside of the Lambda handler function. What is the…
The correct answer is B. Takes advantage of runtime environment reuse. Initializing the AWS SDK outside of the Lambda handler function takes advantage of runtime environment reuse. This means that the SDK only needs to be initialized once for all Lambda function invocations. This can improve application performance and efficiency.
Question
A developer is building a serverless application that is based on AWS Lambda. The developer initializes the AWS software development kit (SDK) outside of the Lambda handler function. What is the PRIMARY benefit of this action?
Options
- AImproves legibility and stylistic convention
- BTakes advantage of runtime environment reuse
- CProvides better error handling
- DCreates a new SDK instance for each invocation
How the community answered
(65 responses)- A6% (4)
- B91% (59)
- C2% (1)
- D2% (1)
Explanation
Initializing the AWS SDK outside of the Lambda handler function takes advantage of runtime environment reuse. This means that the SDK only needs to be initialized once for all Lambda function invocations. This can improve application performance and efficiency.
Community Discussion
No community discussion yet for this question.