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 Risposta
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
con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande