Home » Amazon » AWS Certified Developer - Associate 2018 » When writing a Lambda function, what is the benefit of instantiating AWS clients outside the scope of the handler?
When writing a Lambda function, what is the benefit of instantiating AWS clients outside the scope of the handler?
A. Legibility and stylistic convention
B. Taking advantage of connection re-use
C. Better error handling
D. Creating a new instance per invocation
Correct Answer: B
Explanation/Reference:
Reference: https://www.jeremydaly.com/reuse-database-connections-aws-lambda/