When creating creating a project with many lambda functions, or other compute resources, it is common that some environment variables are needed to be set for all or most of the lambdas.
Global environment variables let you set such variables for all the compute resources in the project.
Setting Global Environment Variables
To set global environment, click on Globals button in the designer's upper toolbar.
The Global Environment Variables form resembles the
Environment Variables sections of lambda functions
and other compute resources.
To add a variable, click on the plus sign in the upper right corner of the form.
To remove a variable, click on the trash icon next to it.
Overriding Global Environment Variables
Once a global environment variable is set, it is being set on all the lambda functions (as well as other compute resources) in the project. However, it can still be overridden on a per-lambda basis.
To override a global environment variable, click on the lambda icon of the lambda function
you want to override the variable for and expand the
Environment Variables section.
The global environment variable will appear with its value grayed out.
To override it, click on the
Override button next to it.
Now you can edit the environment variable value for that lambda.
Removing Global Environment Variable override
When a lambda function has an overridden environment variable, you can click on the
Reset to global button next to the variable (in place of the
Clicking on it will remove the locally set value, and revert the environment variable to its globally set value.