How to export environment variables from a Lambda function.

0

Hello, I have created a Lambda function that fetched the static/hash token from the environment variables in the Configuration section. When I try to export the Lambda function using the Action > Export function, a zip file is downloaded without any configuration-related data in it. Is there a way to export the environment variables from the Lambda functions?

1回答
2

As referred in this documentation, you can obtain all the configuration details for the function through the AWS CLI like this:

aws lambda get-function-configuration --function-name <value> --output json

You can use the output to update the new function using this command:

aws lambda update-function-configuration --function-name <value> --cli-input-json <output from previous command>

You may need to change the output as needed before using it for the update-function-configuration invocation.

AWS
回答済み 2年前

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

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

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

関連するコンテンツ