Take advantage of execution environment reuse to improve the performance of your function. 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.
Действительно, AWS даже упоминает про эту практику в своих гайдлайнах.
Действительно, AWS даже упоминает про эту практику в своих гайдлайнах.