Environment variables are special key value pairs that you can use to configure your function code or set some variable values dynamically. In simple terms, environment variables is an awesome mechanism to make your Lambda function reusable across different environments as now you don't have to make alterations to your application code each time a particular variable has to be changed.
For example, by declaring your database string as an environment variable, you can now use the exact same Lambda function for development, QA, or production environments by simply making the necessary connection string changes in the environment variable itself.
And to make things more interesting, environment variables can be leveraged ...