Open RafalWilinski opened 4 years ago
That may have some issues when we start assuming different roles on every invocation
That may have some issues when we start assuming different roles on every invocation
You can still update the role after the client has been initialized. However, I don’t know if this would have any performance benefits. It would be good to have some data or a reference before implementing this as a rule.
Rule name
Use case description
Initializing AWS SDK client instances inside handler code slows down the execution and does not share them between executions. AWS SDK clients should be initialized outside of handler code to reduce costs and make handlers execution faster.
Examples
Incorrect
Correct