1개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
0
Hi there,
The general advice for any SDK clients and database connections would be to initialize them 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.
This would also apply to third-party database tools such as Snowflake.
Should you wish to learn more about how Lambda may re-use it's containers, please see [1].
Thank you,
Ahmad
[1] https://aws.amazon.com/blogs/compute/container-reuse-in-lambda/
답변함 일 년 전
관련 콘텐츠
- AWS 공식업데이트됨 2년 전