Environment Variables Available to Lambda Functions

The following is a list of environment variables that are part of the AWS Lambda execution
environment and made available to Lambda functions.
The table below indicates which ones are reserved by AWS Lambda and cannot be changed
as well as which ones you can set when creating your Lambda function.
For more information on using environment variables with your Lambda function, see
Environment Variables.

Lambda Environment Variables

Key

Reserved

Value

LAMBDA_TASK_ROOT

Yes

Contains the path to your Lambda function code.

AWS_EXECUTION_ENV

Yes

The environment variable is set to one of the following options, depending on the
runtime
of the Lambda function:

AWS_Lambda_java8

AWS_Lambda_nodejs4.3

AWS_Lambda_nodejs6.10

AWS_Lambda_nodejs8.10

AWS_Lambda_python2.7

AWS_Lambda_python3.6

AWS_Lambda_dotnetcore1.0

AWS_Lambda_dotnetcore2.0

LAMBDA_RUNTIME_DIR

Yes

Restricted to Lambda runtime-related artifacts. For example the aws-sdk for Node.js
and boto3 for Python can be found under this path.

AWS_REGION

Yes

The AWS region where the Lambda function is executed.

AWS_DEFAULT_REGION

Yes

The AWS region where the Lambda function is executed.

AWS_LAMBDA_LOG_GROUP_NAME

Yes

The name of Amazon CloudWatch Logs group where log streams containing your Lambda
function logs are created.

The security credentials required to execute the Lambda function, depending on which
runtime is used. Different runtimes
use a subset of these keys. They are generated via an IAM execution role specified
for the function.