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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠