Reuse Snowflake connections in AWS Lambda?

0

Jeremy Daly talks about reusing RDS connections in AWS Lambda. I assume this principle of establishing the connection outside of the Lambda handler's context would work for Snowflake connections too?

AWS
質問済み 1年前200ビュー
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/

profile pictureAWS
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ