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?
"Takes advantage of runtime environment reuse" is the correct one because, if we write code outside the handler, it will be only executed the first time the function is called. Other times, the compiled code is avaiable at runtime
Initialize SDK clients and database connections outside of the function handler, and cache static assets locally in the /tmp directory. Subsequent invocations processed by the same instance of your function can reuse these resources. This saves cost by reducing function run time.
https://docs.aws.amazon.com/lambda/latest/dg/best-practices.html#function-code
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
SD_CS
1 year, 5 months agorcaliandro
2 years agosichilam
2 years, 5 months agocloud_collector
2 years, 8 months agoLEHUY
2 years, 10 months agoARHATRAJ
2 years, 10 months agoChhotu_DBA
2 years, 10 months ago