AWS Lambdaの`process.env`を確認
以下のような#AWS Lambdaを実行しました。
export const handler = async (event) => {
console.log(JSON.stringify(process.env));
const response = {
statusCode: 200,
body: JSON.stringify('Hello from Lambda!'),
};
return response;
};
実行結果
{
"AWS_LAMBDA_FUNCTION_VERSION": "$LATEST",
"AWS_EXECUTION_ENV": "AWS_Lambda_nodejs20.x",
"AWS_DEFAULT_REGION": "us-east-1",
"AWS_LAMBDA_LOG_STREAM_NAME": "2024/04/03/[$LATEST]066a5738b9ba4cc09d6e0c0a70f7e466",
"AWS_REGION": "us-east-1",
"PWD": "/var/task",
"_HANDLER": "index.handler",
"TZ": ":UTC",
"LAMBDA_TASK_ROOT": "/var/task",
"LANG": "en_US.UTF-8",
"AWS_SECRET_ACCESS_KEY": "DZQ9rrfVi0oz9Nn4/iyZr81r4P3U9jH6K9bVt75q",
"AWS_LAMBDA_LOG_GROUP_NAME": "/aws/lambda/tmp-20240403_143239",
"AWS_LAMBDA_RUNTIME_API": "127.0.0.1:9001",
"AWS_LAMBDA_FUNCTION_MEMORY_SIZE": "128",
"LAMBDA_RUNTIME_DIR": "/var/runtime",
"_AWS_XRAY_DAEMON_ADDRESS": "169.254.79.129",
"AWS_XRAY_DAEMON_ADDRESS": "169.254.79.129:2000",
"SHLVL": "0",
"AWS_ACCESS_KEY_ID": "ASIAQGIBVCFD7EZXTHMZ",
"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/node20/node_modules:/opt/nodejs/node_modules:/var/runtime/node_modules:/var/runtime:/var/task",
"AWS_LAMBDA_FUNCTION_NAME": "tmp-20240403_143239",
"PATH": "/var/lang/bin:/usr/local/bin:/usr/bin/:/bin:/opt/bin",
"AWS_LAMBDA_INITIALIZATION_TYPE": "on-demand",
"AWS_SESSION_TOKEN": "IQoJb3JpZ2luX2VjEEYaCXVzLWVhc3QtMSJHMEUCIHaOAVEBa8742bDc8NqIX1ecHNJi3rTajSttzvVk4XvaAiEAvFoY1nR+GX3DuMgtRYEZ0QRyLbgG8lRCo/pvMbz2WMYq+gIIbxADGgwwMTM0MjUyNTA2MzEiDFYK7zAtz02PVUTQ5yrXAjp2DzTSnmE7mljD2vvM92SKKAVkGz4UtWfCsCbLaGIwPGsf/WHPTcMV/vJRF1VbOiMlEtbYOh4FVfn7Vhr/+GoiV9lIsOf7aILN7R/bvHVSTjZ0TdoraYLr6b5unKImPWMwwvTnbxQ4HyNitcc/DzfyGxbbtRsyAru8OUZJAc4knxhX7+M7yOe4Ula8678RoOD6RTQ4yyeH6zA6E/OrgReMJBG+hfthSRWeP1UACesfjiUOZMwvvSLUZHwuESgpbsvq8sBsv+UQ+Lc0tc8l9g6+bOijtQgDwITEerHmxQCf5qRTEirQbitkFxmMlOjyKGtZ8THbztV4/gc9XOyhXOrw0LpX6MywCr+xHhC3PD7ValT882pNRQ8I+5twQpfjVzVZybHlvU7VlL9B96DsmQfbzxEKz883MNb9yjqrNX9tJ5k0ofCfKfVPQ1QAR47phy5wAvDXqMYw3NSzsAY6ngGoft73ap2zAoTMCEvIxGP6eLyZQdcBhzKrSzFURSU9o3oZ5qTrP6huGuNKC+2P49rvsqp1Djqu3WtniNSXpBOFPWz4FnleByQOz6+x64SuXqKKtqTG2n1KIBZ9Yu5uUHSC8eaK4YyGY00AqRex/kpA5yN7wSGghvAOyPXlUo7pyZQ7uWNHiybypN9+zpnjY2Gl+aSCLPwEZThzUV4n9g==",
"AWS_XRAY_CONTEXT_MISSING": "LOG_ERROR",
"_AWS_XRAY_DAEMON_PORT": "2000",
"_X_AMZN_TRACE_ID": "Root=1-660cea5c-31b5dc97257d60084e97c6d4;Parent=1dd3fa1526589d56;Sampled=0;Lineage=bf0b63a4:0"
}
自分用のメモでした。