Skip to content

Instantly share code, notes, and snippets.

@Sleavely
Last active March 22, 2020 14:14
Show Gist options
  • Save Sleavely/d4e99dc362860f3c6e27f955e755f1e8 to your computer and use it in GitHub Desktop.
Save Sleavely/d4e99dc362860f3c6e27f955e755f1e8 to your computer and use it in GitHub Desktop.
AWS Lambda environment variables when running with a default configuration
// The original values have been redacted, but their general format remains for display purposes.
{
AWS_ACCESS_KEY_ID: 'ASIA5USITABHEEWHMCOL',
AWS_DEFAULT_REGION: 'eu-west-1',
AWS_EXECUTION_ENV: 'AWS_Lambda_nodejs12.x',
AWS_LAMBDA_FUNCTION_MEMORY_SIZE: '128',
AWS_LAMBDA_FUNCTION_NAME: 'tmp1337',
AWS_LAMBDA_FUNCTION_VERSION: '$LATEST',
AWS_LAMBDA_LOG_GROUP_NAME: '/aws/lambda/tmp1337',
AWS_LAMBDA_LOG_STREAM_NAME: '2020/01/14/[$LATEST]425d2a3419de4db38f86fc1896cc1cc1',
AWS_LAMBDA_RUNTIME_API: '127.0.0.1:9001',
AWS_REGION: 'eu-west-1',
AWS_SECRET_ACCESS_KEY: 'Bei2eH0+BgAJm/EGr4sE46luucAoiT5uqfTYaz2P',
AWS_SESSION_TOKEN: 'IQnJb4JpY7luX2DjENf//////////wEaCWV1LXdlcECL1qNw1VN+R3JiznmBdd8d9a6Cs+Syjb0a9jYiDMyDk+I+nnHzqh0zGrpk+WgpnHhG+H6kfpwUb/2uDgxYGM+/HcRGItF42Hcgg0tnOVdAaj/fGmLb7Rt0wo6/U64MZ8+ZJB7XM8Dg99Aa+VAJP1X2urCpHIK21IthWirYiaCQknz+saiPQ3LmJ/xoTiw5+RguihsA02A==',
AWS_XRAY_CONTEXT_MISSING: 'LOG_ERROR',
AWS_XRAY_DAEMON_ADDRESS: '169.254.79.2:2000',
LAMBDA_RUNTIME_DIR: '/var/runtime',
LAMBDA_TASK_ROOT: '/var/task',
LANG: 'en_US.UTF-8',
LD_LIBRARY_PATH: '/var/lang/lib:/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib',
NODE_PATH: '/opt/nodejs/node12/node_modules:/opt/nodejs/node_modules:/var/runtime/node_modules',
PATH: '/var/lang/bin:/usr/local/bin:/usr/bin/:/bin:/opt/bin',
PWD: '/var/task',
SHLVL: '0',
TZ: ':UTC',
_AWS_XRAY_DAEMON_ADDRESS: '169.254.79.2',
_AWS_XRAY_DAEMON_PORT: '2000',
_HANDLER: 'index.handler',
_X_AMZN_TRACE_ID: 'Root=1-7d1dd7a3-75ccb576b9e682ed7bd1c2c3;Parent=89cad59b2c1ed32d;Sampled=0'
}
@Sleavely
Copy link
Author

It's worth noting that the _X_AMZN_TRACE_ID variable is set regardless of whether you've enabled AWS X-Ray tracing or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment