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 Respuesta
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
respondido hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas