ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 15 - DVA-C02 discussion

Report
Export

A developer is building a serverless application that is based on AWS Lambd a. The developer initializes the AWS software development kit (SDK) outside of the Lambda handcar function.

What is the PRIMARY benefit of this action?

A.
Improves legibility and systolic convention
Answers
A.
Improves legibility and systolic convention
B.
Takes advantage of runtime environment reuse
Answers
B.
Takes advantage of runtime environment reuse
C.
Provides better error handling
Answers
C.
Provides better error handling
D.
Creates a new SDK instance for each invocation
Answers
D.
Creates a new SDK instance for each invocation
Suggested answer: B

Explanation:

This benefit occurs when initializing the AWS SDK outside of the Lambda handler function because it allows the SDK instance to be reused across multiple invocations of the same function. This can improve performance and reduce latency by avoiding unnecessary initialization overhead. If the SDK is initialized inside the handler function, it will create a new SDK instance for each invocation, which can increase memory usage and execution time.

Reference: [AWS Lambda execution environment], [Best Practices for Working with AWS Lambda Functions]

asked 16/09/2024
Steve Nihan
39 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first