nerdexam
Amazon

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.

Submitted by haru.x· Mar 5, 2026Troubleshooting and Optimization

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)
  • A
    6% (4)
  • B
    91% (59)
  • C
    2% (1)
  • D
    2% (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.

Full DVA-C02 Practice