Correct answer - "Move the S3 client initialization out of your function handler" : Limit the
re-initialization of variables/objects on every invocation. Instead use static
initialization/constructor, global/static variables and singletons. Keep alive and reuse
connections (HTTP, database, etc.) that were established during a previous invocation.
Incorrect:
"Assign more RAM to the function" - Yes memory can be increased but its not fixing the real
issue. The real issue is that connections are not being re-used therefore causing performance
issues
"Change the IAM role" - IAM roles are design to help managing access and have no impact on
service performance issues
"Enable X-Ray integration" - X-Ray integration allows your Lambda to have tracing enabled, but
won't help with execution context reuse.