Is there a way to run lambda with lambda.updateFunctionConfiguration concurrently?

0

Hi I have a lambda function that I am running with updateFunctionConfiguration. The function runs great except when there is concurrency I get the error from the screenshot shown below. Is there a way to avoid getting this error while still using updateFunctionConfiguration and supporting concurrency?

await lambda .updateFunctionConfiguration({ FunctionName: "puppeteer'', Environment: { Variables: {}, }, }) .promise() Enter image description here

  • Why are you trying to update the function configuration from within the functionm? Is there inly a single instance of the function that is trying to modify the configuration?

質問済み 1年前190ビュー
1回答
0

No, you cannot update the configuration of an AWS Lambda function concurrently. During the update process, the function configuration is locked, and no changes can be made until the update is complete.

Instead, you can wait for the current configuration to complete by adding a random wait time and retrying again, but if you're intended to do a concurrent configuration update, that's impossible, and also it's not a best practice.

References:

回答済み 1年前

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

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

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

関連するコンテンツ