AWS LambdaのOSがAmazon Linux 2に変わっていたから中身を覗いてみた
ウィスキー、シガー、パイプをこよなく愛する大栗です。
本日AWS LambdaでNode.js v10が利用できるようになりました!!。Lambdaのドキュメントを見るとNode.js 10のOSがAmazon Linux 2になっていました!これはランタイムの中身の違いを確認せねばと思い、中身を覗いてみました。
Building Lambda Functions with Node.js
Lambda Node.js 10のランタイム
ドキュメントの英語版を見るとランタイムの説明として以下の記載があります。Node.js 10ではOSがAmazon Linux 2に変更されています!
Name | Identifier | Node.js Version | AWS SDK for JavaScript | Operating System |
---|---|---|---|---|
Node.js 10 | nodejs10.x | 10.15 | 2.437.0 | Amazon Linux 2 |
Node.js 8.10 | nodejs8.10 | 8.10 | 2.290.0 | Amazon Linux |
現在Lambdaのコードを変更できるNode.jsのランタイムは、以下になっています。
- nodejs4.3
- nodejs6.10
- nodejs8.10
- nodejs10.x
各々のランタイムについて以下の内容を確認してみます。
- 実行ユーザ
- Node.jsのバージョン
- デフォルトの環境変数
/
直下のディレクトリ一覧/bin
以下のファイル一覧- 起動しているプロセスの一覧
- ファイルシステム
以下の様なコードでコマンドを実行してログに出力します。
var execSync = require('child_process').execSync; exports.handler = (event, context, callback) => { var cmd = "whoami"; const result = execSync(cmd).toString(); console.log(result); callback(null, context.functionName); };
実行ユーザ
whoami
を実行して実行ユーザを確認します。全てsbx_user1051
ユーザでした。
2019-05-14T06:12:24.505Z 87e5badb-4deb-43f3-951d-04d3bcf0775d sbx_user1051
2019-05-14T06:13:01.906Z 6aaddc3d-9085-481b-aea0-dd0e03829b90 sbx_user1051
2019-05-14T06:13:28.582Z e36858e2-7e8f-42ea-8e87-4c5ffb63faf9 sbx_user1051
2019-05-14T06:14:04.542Z 355b2c13-091f-4fab-a65b-3842db245eef INFO sbx_user1051
Node.jsのバージョン
node -v
を実行してバージョンを確認します。
2019-05-14T06:22:58.003Z 389c74a0-d94e-498b-82fb-2b246604d672 v4.3.2
2019-05-14T06:23:09.240Z 3f6c1787-f95d-4f7e-9366-b57da0530f2e v6.10.3
2019-05-14T06:23:19.853Z e1707a92-4f1f-4372-ae8c-29122f219d0f v8.10.0
2019-05-14T06:23:28.503Z 2b89dc0d-1bd0-402b-9c04-ca32dde7dd90 INFO v10.15.3
デフォルトの環境変数
printenv
を実行して環境変数を確認します。Node.js 10でAWS_LAMBDA_RUNTIME_API
という環境変数が増えていました。
2019-05-14T06:17:27.942Z add88175-e7f8-478f-98d6-748a949dc2ce AWS_LAMBDA_FUNCTION_VERSION=$LATEST AWS_SESSION_TOKEN=AgoJb3JpZ2luX2VjENb//////////wEaDmFwLW5vcnRoZWFzdC0xIkcwRQIgcbpBdwdSBnqBQ0N6m6+5fODYjKVTcLNAWmfojwPZi1oCIQDpdyz9HJP6ZYNkVCVoUoy8dQweEuSc75J6nmv1STh7TiqMAgjP//////////8BEAAaDDI4OTIzNzI4NjE3MyIM2ZGlLPvhHACQ+/VyKuABbRidpXeVNTcq/gTnNGjSnxSjsSgo2W9qrHa3EPxK1NJV5lTWhUshKSWaugIsNxpn/V/20F88y0AYd1n+jZMqymGAoNUFyCjLAQAKJhM1ox6R64khT0pMM8l+UgDmiMJsKlUdhC1K/vOShFKuBZCD68A9uCdBlx35AukFl/a/NuqIY88HM2zNkc7UetGLxMG03mZx7Lev6NoDwDqhEWE9x38vEEbHuIrmaz6AYicJ6RHoBPK3Ha0FPKObMoem9UPB9a8+X/mN997TWtbQjfzrrCIE2ziJTJv8nDZ0SDFTZxkwoLDp5gU6tAFDydIG8rB0dd6lhZ/Om5Z2X3YSlj019ecxRi5AIAXpiP7dFP3xQ8mGF5d3svqxWXDIOjRv5EpOI+nf90+E86rSRbOZ/AJ+PzSEEIx0PoVozav54QNOT9SOn2p8NWHtnoOtE+1H9ojPYl/2z6uY+7tqkZENUOdbeJSJDt8hPaP/8SiWyb4iHzdsofBTAK5hVgPCnmkPa31+OLy5rUFETHl9+ii92HcvgLXTSTrbwhBhH2t9q74= AWS_LAMBDA_LOG_GROUP_NAME=/aws/lambda/test-v4 LAMBDA_TASK_ROOT=/var/task LD_LIBRARY_PATH=/var/lang/lib:/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib AWS_LAMBDA_LOG_STREAM_NAME=2019/05/14/[$LATEST]a23632feaf7b4ebd9747ecfb4fda1c45 AWS_EXECUTION_ENV=AWS_Lambda_nodejs4.3 AWS_XRAY_DAEMON_ADDRESS=169.254.79.2:2000 AWS_LAMBDA_FUNCTION_NAME=test-v4 PATH=/var/lang/bin:/usr/local/bin:/usr/bin/:/bin:/opt/bin AWS_DEFAULT_REGION=ap-northeast-1 PWD=/var/task AWS_SECRET_ACCESS_KEY=fAcr7bJ8guDI91fXLOx+y6CH2Lx+97ecq17voPIQ LAMBDA_RUNTIME_DIR=/var/runtime LANG=en_US.UTF-8 NODE_PATH=/var/runtime:/var/task:/var/runtime/node_modules AWS_REGION=ap-northeast-1 TZ=:UTC AWS_ACCESS_KEY_ID=ASIAUGV7CXUO5LXVQJHV SHLVL=1 _AWS_XRAY_DAEMON_ADDRESS=169.254.79.2 _AWS_XRAY_DAEMON_PORT=2000 _X_AMZN_TRACE_ID=Root=1-5cda5d77-88563350ff877a6071b1bd60;Parent=57a061736c80e71f;Sampled=0 AWS_XRAY_CONTEXT_MISSING=LOG_ERROR _HANDLER=index.handler AWS_LAMBDA_FUNCTION_MEMORY_SIZE=128 _=/usr/bin/printenv
2019-05-14T06:17:58.048Z 80519082-47b4-4f79-af85-739cfc9afcc8 AWS_LAMBDA_FUNCTION_VERSION=$LATEST AWS_SESSION_TOKEN=AgoJb3JpZ2luX2VjENb//////////wEaDmFwLW5vcnRoZWFzdC0xIkgwRgIhANZDRFhq3Q1BQLZ07R1I4kvyOzZtphnu2nGQM0T57lGbAiEAiUSZiIC3r8kZ59eF6Z+jCHe+Kkq+SsRZoEp+q+e6kxkqjAIIz///////////ARAAGgwyODkyMzcyODYxNzMiDP5+s90dPeEuIHn1ByrgATz5lx4mMzfdbmoddSTxP36hTiOPZj7gFw9OAK/eJ5cojGlV2eKAUxqLonHjvugjKaIAjknTC+aQkDfolUVQM8qiZfY08DXCocZEATW4hJvI6NiBMGZ+vvkyhKp5hz/TyQzoNCJvZkJENxUncAk8pLj4CbpEg9VKWTD62bHNIrxfotN2C/L5lcibxEKVf+MuRhOU5CMmQnc1JNomoFUh+nyTSEAcHXzE8jWCJUWczqCLrswOnyj0I+dQFPB00+nsbWchFXHj7VWopCRspz0BPI3FwFpo0bQpdzSBBoLWWaqCMO6v6eYFOrMBg4MEhI2VClq6TeelsBFH+MEBbIZKbTf4Af6uKAWM1dEnMqy4CDJk/fzBh02+3NP5a3hAGAgi6gVPFhB2QEiOCkzpqAhZvvCiw555HG2rPIpg4F8wMDo71G59Hjfuhyvn0bNj7ijh61AAh64SW4qRWV+IyCdz39au3+N5QjK+7SItEbWsnReoOK0XeUAB88tmAnQQT5aGYLhjCOWUDJxfaM/q3gWJX3zex2PDrJ3id+xrSe8= AWS_LAMBDA_LOG_GROUP_NAME=/aws/lambda/test-v6 LAMBDA_TASK_ROOT=/var/task LD_LIBRARY_PATH=/var/lang/lib:/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib AWS_LAMBDA_LOG_STREAM_NAME=2019/05/14/[$LATEST]f5935bff5f9540acab037b5ffe7dca8e AWS_EXECUTION_ENV=AWS_Lambda_nodejs6.10 AWS_XRAY_DAEMON_ADDRESS=169.254.79.2:2000 AWS_LAMBDA_FUNCTION_NAME=test-v6 PATH=/var/lang/bin:/usr/local/bin:/usr/bin/:/bin:/opt/bin AWS_DEFAULT_REGION=ap-northeast-1 PWD=/var/task AWS_SECRET_ACCESS_KEY=w06moYA7esKLH0J4tN0q3/duqRh7D7tcRoOdDypJ LAMBDA_RUNTIME_DIR=/var/runtime LANG=en_US.UTF-8 NODE_PATH=/opt/nodejs/node6/node_modules:/opt/nodejs/node_modules:/var/runtime/node_modules:/var/runtime:/var/task:/var/runtime/node_modules AWS_REGION=ap-northeast-1 TZ=:UTC AWS_ACCESS_KEY_ID=ASIAUGV7CXUOZUMMSYOJ SHLVL=1 _AWS_XRAY_DAEMON_ADDRESS=169.254.79.2 _AWS_XRAY_DAEMON_PORT=2000 _X_AMZN_TRACE_ID=Root=1-5cda5d95-70fde040834b826015c83840;Parent=07480bca5fa7e7d6;Sampled=0 AWS_XRAY_CONTEXT_MISSING=LOG_ERROR _HANDLER=index.handler AWS_LAMBDA_FUNCTION_MEMORY_SIZE=128 _=/usr/bin/printenv
2019-05-14T06:18:10.610Z ec264231-4782-49b9-9f74-3971b51f1338 AWS_LAMBDA_FUNCTION_VERSION=$LATEST AWS_SESSION_TOKEN=AgoJb3JpZ2luX2VjENb//////////wEaDmFwLW5vcnRoZWFzdC0xIkYwRAIgUvXEEA/o3JGHzjnD68/YWKyjpna6STgCW77JlUo2hUwCIGEK3vBBvTFkkl6Gk+07CVDLA8/PMNnqg1Sl+vHaULQvKowCCM///////////wEQABoMMjg5MjM3Mjg2MTczIgxy9a3RM26hJLMNPW4q4AFF3gFE8geNXpL95pvBYrr8pGzvxDRX8ozoRZNnf5CDASpYrEI7w8TnkeOVe7k3RGMaH5SErFQDHcgc7DqM+IjAI71vILabzlj65fWlfFKG9zFpJXAQDKFt4aSvr+MugvrfYYiGJlxzVi7V9FzwqoxVCwcsJjn9JsoGyj7CUkj3lFdwsSSA/gAaFnCSwjpymEGqS5OcbauVegSOMLw7Ja0wssYOg3XM9QhaGYjMj/fphxbUw1g+5n5EDQDbsWKhDRBFi28EUkVMECEogGpjMmgf7zbjJ8jnpqoqEl0cJTSSJTDhsenmBTq1AeSZe68GRiQrifMoCF6gnYYji5n03LCGzbYyu7d5EiClAOJ59+2+2nHZwXw8EYZfgGPVf/PZ+FVwwvxeFclVrXDx49LTdW8TWsDokCRXlEXkTFoscjVtHBBC4XGMEk4lMgYgQ5hN25VNMmAwNVdBBqEapqRgkDCeil3q4Qvht9jpQzlapcUpXy5yTto6E7Fo1b4lC7jmVPIH+Tw3rJwOVi1tANvtoySO4sbaXFk0sZwoEP6a8qQ= AWS_LAMBDA_LOG_GROUP_NAME=/aws/lambda/test-v8 LAMBDA_TASK_ROOT=/var/task LD_LIBRARY_PATH=/var/lang/lib:/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib AWS_LAMBDA_LOG_STREAM_NAME=2019/05/14/[$LATEST]e94a4787a01f4f929a5da1efccaf75ef AWS_EXECUTION_ENV=AWS_Lambda_nodejs8.10 AWS_XRAY_DAEMON_ADDRESS=169.254.79.2:2000 AWS_LAMBDA_FUNCTION_NAME=test-v8 PATH=/var/lang/bin:/usr/local/bin:/usr/bin/:/bin:/opt/bin AWS_DEFAULT_REGION=ap-northeast-1 PWD=/var/task AWS_SECRET_ACCESS_KEY=k8HfWB+5/jPp97WYvZFxRjsbkPbzbSUzFWnv3W0s LAMBDA_RUNTIME_DIR=/var/runtime LANG=en_US.UTF-8 NODE_PATH=/opt/nodejs/node8/node_modules:/opt/nodejs/node_modules:/var/runtime/node_modules:/var/runtime:/var/task:/var/runtime/node_modules AWS_REGION=ap-northeast-1 TZ=:UTC AWS_ACCESS_KEY_ID=ASIAUGV7CXUO5RLK4BFK SHLVL=1 _AWS_XRAY_DAEMON_ADDRESS=169.254.79.2 _AWS_XRAY_DAEMON_PORT=2000 _X_AMZN_TRACE_ID=Root=1-5cda5da2-82cb648085968980d7291090;Parent=60648537430ece5b;Sampled=0 AWS_XRAY_CONTEXT_MISSING=LOG_ERROR _HANDLER=index.handler AWS_LAMBDA_FUNCTION_MEMORY_SIZE=128 _=/usr/bin/printenv
2019-05-14T06:18:31.984Z 594c5385-eb46-4b98-a445-d1b13a546f80 INFO AWS_LAMBDA_FUNCTION_VERSION=$LATEST AWS_SESSION_TOKEN=AgoJb3JpZ2luX2VjENb//////////wEaDmFwLW5vcnRoZWFzdC0xIkcwRQIgfMNNutn/BjjIWHP7uI4y6Kgc2IBRu+3eH0x3CxijHWcCIQD26wOeWWsacN5w7fYCWEn/kOmAwyVORVEyK+/UEJREGSqNAgjP//////////8BEAAaDDI4OTIzNzI4NjE3MyIM27/sMqWcU7XxHKQLKuEBaLykDdKPVHhCCPzUSYDLxKzh4HrPbP8TtojjRlPjquD9KNtSBJYvOADBfJMJpR7XpCkSq7rqbQf3N3P6BBce6i+uD+zSri9DG0jrz9OGQC9XoYThAMIoB0/8zczcH2ZTs4PxBV1xKIWpXfxUKHidm9JQszPfCgCv9tAehQOjYV4cpH5i6C83VhQxLscjKxdCXoDmuvZSeHsy/ddhWjbanx4JOCgbCcwd+eHOjC88DDniIP+ErIezfigO7vwUTJO/y/ImKkcKgCdNdANIXX+6sWbEwt35mDYnuB+c6iU7tydRMLe76eYFOrQBf8ifixas+eZPIoDlqGKpqTQ/0MmZ2bLGhvNGr8hnMb0stmh8epHIsNTPtaq72mEn7huGbsqGmQSm9kzwm6joZDXMJZrADUORnmr3T27/q7+uh8M44Iv6uhPHz+MIFesNkmTuRz/8OfxHb5ul5FV56t5ftiNYPqvvqqvLDXzxyFWdDLNmfCA5rQi0u8qSt1oiGfOX7FfQECObgbbtKrlIZ3BJP3hUNKdbUVTrCzCKPSjntuZ3 LD_LIBRARY_PATH=/var/lang/lib:/lib64:/usr/lib64:/var/runtime:/var/runtime/lib:/var/task:/var/task/lib:/opt/lib LAMBDA_TASK_ROOT=/var/task AWS_LAMBDA_LOG_GROUP_NAME=/aws/lambda/test-v10 AWS_LAMBDA_LOG_STREAM_NAME=2019/05/14/[$LATEST]6cee39ef8dc945f082397b31adf55738 AWS_LAMBDA_RUNTIME_API=127.0.0.1:9001 AWS_EXECUTION_ENV=AWS_Lambda_nodejs10.x AWS_LAMBDA_FUNCTION_NAME=test-v10 AWS_XRAY_DAEMON_ADDRESS=169.254.79.2:2000 PATH=/var/lang/bin:/usr/local/bin:/usr/bin/:/bin:/opt/bin AWS_DEFAULT_REGION=ap-northeast-1 PWD=/var/task AWS_SECRET_ACCESS_KEY=Hvo/D5Q1ryvCB1f/IwgdJ4UGhbJK1kJMlOZjrxEd LANG=en_US.UTF-8 LAMBDA_RUNTIME_DIR=/var/runtime TZ=:UTC AWS_REGION=ap-northeast-1 NODE_PATH=/opt/nodejs/node10/node_modules:/opt/nodejs/node_modules:/var/runtime/node_modules AWS_ACCESS_KEY_ID=ASIAUGV7CXUO7RC24VVA SHLVL=1 _AWS_XRAY_DAEMON_ADDRESS=169.254.79.2 _AWS_XRAY_DAEMON_PORT=2000 _X_AMZN_TRACE_ID=Root=1-5cda5db7-2ac59580dbf4d0d05493e9c0;Parent=10803ba03168c61e;Sampled=0 AWS_XRAY_CONTEXT_MISSING=LOG_ERROR _HANDLER=index.handler AWS_LAMBDA_FUNCTION_MEMORY_SIZE=128 _=/usr/bin/printenv
/
直下のディレクトリ一覧
ls -al /
を実行してルートのディレクトリを確認します。Node.js 10ではbin
、lib
、lib64
、sbin
がusr
以下へのリンクに変わっています。またselinux
が無くなりrun
が増えています。
2019-05-14T06:25:34.043Z 66d63041-1775-4bf1-9967-9520ec1ba918 total 80 dr-xr-xr-x 21 root root 4096 Apr 17 09:07 . dr-xr-xr-x 21 root root 4096 Apr 17 09:07 .. dr-xr-xr-x 2 root root 4096 Apr 17 09:09 bin dr-xr-xr-x 2 root root 4096 Apr 17 09:09 boot drwxr-xr-x 2 root root 4096 May 14 06:10 dev drwxr-xr-x 60 root root 4096 Apr 17 09:09 etc drwxr-xr-x 2 root root 4096 Jan 6 2012 home dr-xr-xr-x 7 root root 4096 Apr 17 09:08 lib dr-xr-xr-x 6 root root 4096 Apr 17 09:09 lib64 drwxr-xr-x 2 root root 4096 Jan 6 2012 media drwxr-xr-x 2 root root 4096 Jan 6 2012 mnt drwxr-xr-x 2 root root 4096 Apr 17 09:09 opt dr-xr-xr-x 66 root root 0 May 14 06:25 proc dr-xr-x--- 2 root root 4096 Jan 6 2012 root dr-xr-xr-x 2 root root 4096 Apr 17 09:09 sbin drwxr-xr-x 2 root root 4096 Jan 6 2012 selinux drwxr-xr-x 2 root root 4096 Jan 6 2012 srv drwxr-xr-x 2 root root 4096 Jan 6 2012 sys drwx------ 2 sbx_user1051 495 4096 May 14 06:25 tmp drwxr-xr-x 13 root root 4096 Apr 17 09:07 usr drwxr-xr-x 23 root root 4096 Apr 17 09:09 var
2019-05-14T06:25:49.648Z 037cb31e-5a30-47f8-96e6-bf8410c3ca21 total 80 dr-xr-xr-x 21 root root 4096 Apr 17 09:07 . dr-xr-xr-x 21 root root 4096 Apr 17 09:07 .. dr-xr-xr-x 2 root root 4096 Apr 17 09:09 bin dr-xr-xr-x 2 root root 4096 Apr 17 09:09 boot drwxr-xr-x 2 root root 4096 May 14 06:10 dev drwxr-xr-x 60 root root 4096 Apr 17 09:09 etc drwxr-xr-x 2 root root 4096 Jan 6 2012 home dr-xr-xr-x 7 root root 4096 Apr 17 09:08 lib dr-xr-xr-x 6 root root 4096 Apr 17 09:09 lib64 drwxr-xr-x 2 root root 4096 Jan 6 2012 media drwxr-xr-x 2 root root 4096 Jan 6 2012 mnt drwxr-xr-x 2 root root 4096 Apr 17 09:09 opt dr-xr-xr-x 67 root root 0 May 14 06:25 proc dr-xr-x--- 2 root root 4096 Jan 6 2012 root dr-xr-xr-x 2 root root 4096 Apr 17 09:09 sbin drwxr-xr-x 2 root root 4096 Jan 6 2012 selinux drwxr-xr-x 2 root root 4096 Jan 6 2012 srv drwxr-xr-x 2 root root 4096 Jan 6 2012 sys drwx------ 2 sbx_user1051 495 4096 May 14 06:25 tmp drwxr-xr-x 13 root root 4096 Apr 17 09:07 usr drwxr-xr-x 23 root root 4096 Apr 17 09:09 var
2019-05-14T06:26:05.873Z 7223fbd8-5564-449c-b7ed-0bfb630b954c total 80 dr-xr-xr-x 21 root root 4096 Apr 17 09:07 . dr-xr-xr-x 21 root root 4096 Apr 17 09:07 .. dr-xr-xr-x 2 root root 4096 Apr 17 09:09 bin dr-xr-xr-x 2 root root 4096 Apr 17 09:09 boot drwxr-xr-x 2 root root 4096 May 14 06:10 dev drwxr-xr-x 60 root root 4096 Apr 17 09:09 etc drwxr-xr-x 2 root root 4096 Jan 6 2012 home dr-xr-xr-x 7 root root 4096 Apr 17 09:08 lib dr-xr-xr-x 6 root root 4096 Apr 17 09:09 lib64 drwxr-xr-x 2 root root 4096 Jan 6 2012 media drwxr-xr-x 2 root root 4096 Jan 6 2012 mnt drwxr-xr-x 2 root root 4096 Apr 17 09:09 opt dr-xr-xr-x 67 root root 0 May 14 06:26 proc dr-xr-x--- 2 root root 4096 Jan 6 2012 root dr-xr-xr-x 2 root root 4096 Apr 17 09:09 sbin drwxr-xr-x 2 root root 4096 Jan 6 2012 selinux drwxr-xr-x 2 root root 4096 Jan 6 2012 srv drwxr-xr-x 2 root root 4096 Jan 6 2012 sys drwx------ 2 sbx_user1051 495 4096 May 14 06:26 tmp drwxr-xr-x 13 root root 4096 Apr 17 09:07 usr drwxr-xr-x 23 root root 4096 Apr 17 09:09 var
2019-05-14T06:26:21.127Z d51000ff-0839-4b34-aeff-395b207c9e02 INFO total 64 dr-xr-xr-x 17 root root 4096 Apr 17 09:08 . dr-xr-xr-x 17 root root 4096 Apr 17 09:08 .. lrwxrwxrwx 1 root root 7 May 7 01:02 bin -> usr/bin dr-xr-xr-x 2 root root 4096 Apr 9 19:57 boot drwxr-xr-x 2 root root 4096 May 14 06:12 dev drwxr-xr-x 29 root root 4096 Apr 18 18:34 etc drwxr-xr-x 2 root root 4096 Apr 9 19:57 home lrwxrwxrwx 1 root root 7 May 7 01:02 lib -> usr/lib lrwxrwxrwx 1 root root 9 May 7 01:02 lib64 -> usr/lib64 drwxr-xr-x 2 root root 4096 Apr 9 19:57 media drwxr-xr-x 2 root root 4096 Apr 9 19:57 mnt drwxr-xr-x 2 root root 4096 Apr 9 19:57 opt dr-xr-xr-x 68 root root 0 May 14 06:26 proc dr-xr-x--- 2 root root 4096 Apr 9 19:57 root drwxr-xr-x 2 root root 4096 May 7 01:01 run lrwxrwxrwx 1 root root 8 May 7 01:02 sbin -> usr/sbin drwxr-xr-x 2 root root 4096 Apr 9 19:57 srv dr-xr-xr-x 2 root root 4096 Apr 9 19:57 sys drwx------ 2 sbx_user1051 495 4096 May 14 06:26 tmp drwxr-xr-x 13 root root 4096 Apr 17 09:08 usr drwxr-xr-x 23 root root 4096 Apr 18 18:34 var
/bin
以下のファイル一覧
ls -al /bin/
を実行して環境変数を確認します。Node.js 10では実態は/usr/bin
となります。コマンドが大幅に増加しています。
2019-05-14T06:41:00.039Z 7c69f095-446e-40d9-97ef-cbd58330dd5e total 5172 dr-xr-xr-x 2 root root 4096 Apr 17 09:09 . dr-xr-xr-x 21 root root 4096 Apr 17 09:07 .. -rwxr-xr-x 1 root root 28448 Feb 25 2016 arch lrwxrwxrwx 1 root root 4 May 7 01:02 awk -> gawk -rwxr-xr-x 1 root root 28128 Feb 25 2016 basename -rwxr-xr-x 1 root root 936000 Aug 30 2017 bash -rwxr-xr-x 1 root root 48000 Feb 25 2016 cat -rwxr-xr-x 1 root root 57216 Feb 25 2016 chgrp -rwxr-xr-x 1 root root 52992 Feb 25 2016 chmod -rwxr-xr-x 1 root root 58496 Feb 25 2016 chown -rwxr-xr-x 1 root root 145760 Feb 25 2016 cp -rwxr-xr-x 1 root root 129912 Oct 8 2014 cpio -rwxr-xr-x 1 root root 40672 Feb 25 2016 cut -rwxr-xr-x 1 root root 106360 Feb 28 2013 dash -rwxr-xr-x 1 root root 59584 Feb 25 2016 date -rwxr-xr-x 1 root root 69416 Feb 25 2016 dd -rwxr-xr-x 1 root root 95280 Feb 25 2016 df -rwxr-xr-x 1 root root 42224 Apr 26 2017 dmesg lrwxrwxrwx 1 root root 8 May 7 01:02 dnsdomainname -> hostname lrwxrwxrwx 1 root root 8 May 7 01:02 domainname -> hostname -rwxr-xr-x 1 root root 78504 Feb 19 2011 dumpkeys -rwxr-xr-x 1 root root 27904 Feb 25 2016 echo -rwxr-xr-x 1 root root 158 Aug 18 2016 egrep -rwxr-xr-x 1 root root 28128 Feb 25 2016 env -rwxr-xr-x 1 root root 24416 Feb 25 2016 false -rwxr-xr-x 1 root root 158 Aug 18 2016 fgrep -rwxr-xr-x 1 root root 234512 Jan 17 2011 find -rwxr-xr-x 1 root root 54224 Apr 26 2017 findmnt -rwxr-xr-x 1 root root 373632 Oct 14 2012 gawk -rwxr-xr-x 1 root root 149992 Aug 18 2016 grep lrwxrwxrwx 1 root root 3 May 7 01:02 gtar -> tar -rwxr-xr-x 1 root root 2253 Feb 24 2016 gunzip -rwxr-xr-x 1 root root 93544 Feb 24 2016 gzip -rwxr-xr-x 1 root root 13712 Jul 7 2012 hostname -rwxr-xr-x 1 root root 11128 Oct 12 2016 ipcalc lrwxrwxrwx 1 root root 19 May 7 01:02 iptables-xml -> /sbin/xtables-multi -rwxr-xr-x 1 root root 7920 Feb 19 2011 kbd_mode -rwxr-xr-x 1 root root 24672 Apr 26 2017 kill -rwxr-xr-x 1 root root 25472 Feb 25 2016 link -rwxr-xr-x 1 root root 53352 Feb 25 2016 ln -rwxr-xr-x 1 root root 108248 Feb 19 2011 loadkeys -rwxr-xr-x 1 root root 32344 Apr 26 2017 login -rwxr-xr-x 1 root root 113440 Feb 25 2016 ls -rwxr-xr-x 1 root root 69184 Apr 26 2017 lsblk -rwxr-xr-x 1 root root 77728 Feb 25 2016 mkdir -rwxr-xr-x 1 root root 61184 Feb 25 2016 mknod -rwxr-xr-x 1 root root 36512 Feb 25 2016 mktemp -rwxr-xr-x 1 root root 36952 Apr 26 2017 more -rwxr-xr-x 1 root root 6816 Feb 18 2016 mountpoint -rwxr-xr-x 1 root root 124168 Feb 25 2016 mv -rwxr-xr-x 1 root root 123360 Jul 7 2012 netstat -rwxr-xr-x 1 root root 28896 Feb 25 2016 nice lrwxrwxrwx 1 root root 8 May 7 01:02 nisdomainname -> hostname -rwxr-xr-x 1 root root 43576 May 17 2016 ping -rwxr-xr-x 1 root root 48088 May 17 2016 ping6 -rwxr-xr-x 1 root root 82584 Mar 17 2015 ps -rwxr-xr-x 1 root root 28672 Feb 25 2016 pwd -rwxr-xr-x 1 root root 10992 Apr 26 2017 raw -rwxr-xr-x 1 root root 37344 Feb 25 2016 readlink -rwxr-xr-x 1 root root 57216 Feb 25 2016 rm -rwxr-xr-x 1 root root 40480 Feb 25 2016 rmdir -rwxr-xr-x 1 root root 15936 Mar 20 2017 rpm -rwxr-xr-x 1 root root 66168 Jul 7 2012 sed -rwxr-xr-x 1 root root 37448 Feb 19 2011 setfont lrwxrwxrwx 1 root root 4 May 7 01:02 sh -> bash -rwxr-xr-x 1 root root 28032 Feb 25 2016 sleep -rwxr-xr-x 1 root root 109696 Feb 25 2016 sort -rwxr-xr-x 1 root root 65120 Feb 25 2016 stty -rwxr-xr-x 1 root root 25120 Feb 25 2016 sync -rwxr-xr-x 1 root root 344648 Oct 7 2014 tar -rwxr-xr-x 1 root root 24408 Apr 26 2017 taskset -rwxr-xr-x 1 root root 55872 Feb 25 2016 touch -rwxr-xr-x 1 root root 14416 May 17 2016 tracepath -rwxr-xr-x 1 root root 14416 May 17 2016 tracepath6 -rwxr-xr-x 1 root root 24416 Feb 25 2016 true -rwxr-xr-x 1 root root 28448 Feb 25 2016 uname -rwxr-xr-x 1 root root 2555 Feb 19 2011 unicode_start -rwxr-xr-x 1 root root 363 Feb 19 2011 unicode_stop -rwxr-xr-x 1 root root 25344 Feb 25 2016 unlink -rwxr-xr-x 1 root root 6800 Oct 12 2016 usleep lrwxrwxrwx 1 root root 8 May 7 01:02 ypdomainname -> hostname -rwxr-xr-x 1 root root 1941 Feb 24 2016 zcat
2019-05-14T06:41:43.567Z 2a9b779b-a035-41bb-9495-3eddc2b7cc56 total 5172 dr-xr-xr-x 2 root root 4096 Apr 17 09:09 . dr-xr-xr-x 21 root root 4096 Apr 17 09:07 .. -rwxr-xr-x 1 root root 28448 Feb 25 2016 arch lrwxrwxrwx 1 root root 4 May 7 01:02 awk -> gawk -rwxr-xr-x 1 root root 28128 Feb 25 2016 basename -rwxr-xr-x 1 root root 936000 Aug 30 2017 bash -rwxr-xr-x 1 root root 48000 Feb 25 2016 cat -rwxr-xr-x 1 root root 57216 Feb 25 2016 chgrp -rwxr-xr-x 1 root root 52992 Feb 25 2016 chmod -rwxr-xr-x 1 root root 58496 Feb 25 2016 chown -rwxr-xr-x 1 root root 145760 Feb 25 2016 cp -rwxr-xr-x 1 root root 129912 Oct 8 2014 cpio -rwxr-xr-x 1 root root 40672 Feb 25 2016 cut -rwxr-xr-x 1 root root 106360 Feb 28 2013 dash -rwxr-xr-x 1 root root 59584 Feb 25 2016 date -rwxr-xr-x 1 root root 69416 Feb 25 2016 dd -rwxr-xr-x 1 root root 95280 Feb 25 2016 df -rwxr-xr-x 1 root root 42224 Apr 26 2017 dmesg lrwxrwxrwx 1 root root 8 May 7 01:02 dnsdomainname -> hostname lrwxrwxrwx 1 root root 8 May 7 01:02 domainname -> hostname -rwxr-xr-x 1 root root 78504 Feb 19 2011 dumpkeys -rwxr-xr-x 1 root root 27904 Feb 25 2016 echo -rwxr-xr-x 1 root root 158 Aug 18 2016 egrep -rwxr-xr-x 1 root root 28128 Feb 25 2016 env -rwxr-xr-x 1 root root 24416 Feb 25 2016 false -rwxr-xr-x 1 root root 158 Aug 18 2016 fgrep -rwxr-xr-x 1 root root 234512 Jan 17 2011 find -rwxr-xr-x 1 root root 54224 Apr 26 2017 findmnt -rwxr-xr-x 1 root root 373632 Oct 14 2012 gawk -rwxr-xr-x 1 root root 149992 Aug 18 2016 grep lrwxrwxrwx 1 root root 3 May 7 01:02 gtar -> tar -rwxr-xr-x 1 root root 2253 Feb 24 2016 gunzip -rwxr-xr-x 1 root root 93544 Feb 24 2016 gzip -rwxr-xr-x 1 root root 13712 Jul 7 2012 hostname -rwxr-xr-x 1 root root 11128 Oct 12 2016 ipcalc lrwxrwxrwx 1 root root 19 May 7 01:02 iptables-xml -> /sbin/xtables-multi -rwxr-xr-x 1 root root 7920 Feb 19 2011 kbd_mode -rwxr-xr-x 1 root root 24672 Apr 26 2017 kill -rwxr-xr-x 1 root root 25472 Feb 25 2016 link -rwxr-xr-x 1 root root 53352 Feb 25 2016 ln -rwxr-xr-x 1 root root 108248 Feb 19 2011 loadkeys -rwxr-xr-x 1 root root 32344 Apr 26 2017 login -rwxr-xr-x 1 root root 113440 Feb 25 2016 ls -rwxr-xr-x 1 root root 69184 Apr 26 2017 lsblk -rwxr-xr-x 1 root root 77728 Feb 25 2016 mkdir -rwxr-xr-x 1 root root 61184 Feb 25 2016 mknod -rwxr-xr-x 1 root root 36512 Feb 25 2016 mktemp -rwxr-xr-x 1 root root 36952 Apr 26 2017 more -rwxr-xr-x 1 root root 6816 Feb 18 2016 mountpoint -rwxr-xr-x 1 root root 124168 Feb 25 2016 mv -rwxr-xr-x 1 root root 123360 Jul 7 2012 netstat -rwxr-xr-x 1 root root 28896 Feb 25 2016 nice lrwxrwxrwx 1 root root 8 May 7 01:02 nisdomainname -> hostname -rwxr-xr-x 1 root root 43576 May 17 2016 ping -rwxr-xr-x 1 root root 48088 May 17 2016 ping6 -rwxr-xr-x 1 root root 82584 Mar 17 2015 ps -rwxr-xr-x 1 root root 28672 Feb 25 2016 pwd -rwxr-xr-x 1 root root 10992 Apr 26 2017 raw -rwxr-xr-x 1 root root 37344 Feb 25 2016 readlink -rwxr-xr-x 1 root root 57216 Feb 25 2016 rm -rwxr-xr-x 1 root root 40480 Feb 25 2016 rmdir -rwxr-xr-x 1 root root 15936 Mar 20 2017 rpm -rwxr-xr-x 1 root root 66168 Jul 7 2012 sed -rwxr-xr-x 1 root root 37448 Feb 19 2011 setfont lrwxrwxrwx 1 root root 4 May 7 01:02 sh -> bash -rwxr-xr-x 1 root root 28032 Feb 25 2016 sleep -rwxr-xr-x 1 root root 109696 Feb 25 2016 sort -rwxr-xr-x 1 root root 65120 Feb 25 2016 stty -rwxr-xr-x 1 root root 25120 Feb 25 2016 sync -rwxr-xr-x 1 root root 344648 Oct 7 2014 tar -rwxr-xr-x 1 root root 24408 Apr 26 2017 taskset -rwxr-xr-x 1 root root 55872 Feb 25 2016 touch -rwxr-xr-x 1 root root 14416 May 17 2016 tracepath -rwxr-xr-x 1 root root 14416 May 17 2016 tracepath6 -rwxr-xr-x 1 root root 24416 Feb 25 2016 true -rwxr-xr-x 1 root root 28448 Feb 25 2016 uname -rwxr-xr-x 1 root root 2555 Feb 19 2011 unicode_start -rwxr-xr-x 1 root root 363 Feb 19 2011 unicode_stop -rwxr-xr-x 1 root root 25344 Feb 25 2016 unlink -rwxr-xr-x 1 root root 6800 Oct 12 2016 usleep lrwxrwxrwx 1 root root 8 May 7 01:02 ypdomainname -> hostname -rwxr-xr-x 1 root root 1941 Feb 24 2016 zcat
2019-05-14T06:42:18.306Z 4fd89e0b-8079-45ff-bff0-58b650c1eb84 total 5172 dr-xr-xr-x 2 root root 4096 Apr 17 09:09 . dr-xr-xr-x 21 root root 4096 Apr 17 09:07 .. -rwxr-xr-x 1 root root 28448 Feb 25 2016 arch lrwxrwxrwx 1 root root 4 May 7 01:02 awk -> gawk -rwxr-xr-x 1 root root 28128 Feb 25 2016 basename -rwxr-xr-x 1 root root 936000 Aug 30 2017 bash -rwxr-xr-x 1 root root 48000 Feb 25 2016 cat -rwxr-xr-x 1 root root 57216 Feb 25 2016 chgrp -rwxr-xr-x 1 root root 52992 Feb 25 2016 chmod -rwxr-xr-x 1 root root 58496 Feb 25 2016 chown -rwxr-xr-x 1 root root 145760 Feb 25 2016 cp -rwxr-xr-x 1 root root 129912 Oct 8 2014 cpio -rwxr-xr-x 1 root root 40672 Feb 25 2016 cut -rwxr-xr-x 1 root root 106360 Feb 28 2013 dash -rwxr-xr-x 1 root root 59584 Feb 25 2016 date -rwxr-xr-x 1 root root 69416 Feb 25 2016 dd -rwxr-xr-x 1 root root 95280 Feb 25 2016 df -rwxr-xr-x 1 root root 42224 Apr 26 2017 dmesg lrwxrwxrwx 1 root root 8 May 7 01:02 dnsdomainname -> hostname lrwxrwxrwx 1 root root 8 May 7 01:02 domainname -> hostname -rwxr-xr-x 1 root root 78504 Feb 19 2011 dumpkeys -rwxr-xr-x 1 root root 27904 Feb 25 2016 echo -rwxr-xr-x 1 root root 158 Aug 18 2016 egrep -rwxr-xr-x 1 root root 28128 Feb 25 2016 env -rwxr-xr-x 1 root root 24416 Feb 25 2016 false -rwxr-xr-x 1 root root 158 Aug 18 2016 fgrep -rwxr-xr-x 1 root root 234512 Jan 17 2011 find -rwxr-xr-x 1 root root 54224 Apr 26 2017 findmnt -rwxr-xr-x 1 root root 373632 Oct 14 2012 gawk -rwxr-xr-x 1 root root 149992 Aug 18 2016 grep lrwxrwxrwx 1 root root 3 May 7 01:02 gtar -> tar -rwxr-xr-x 1 root root 2253 Feb 24 2016 gunzip -rwxr-xr-x 1 root root 93544 Feb 24 2016 gzip -rwxr-xr-x 1 root root 13712 Jul 7 2012 hostname -rwxr-xr-x 1 root root 11128 Oct 12 2016 ipcalc lrwxrwxrwx 1 root root 19 May 7 01:02 iptables-xml -> /sbin/xtables-multi -rwxr-xr-x 1 root root 7920 Feb 19 2011 kbd_mode -rwxr-xr-x 1 root root 24672 Apr 26 2017 kill -rwxr-xr-x 1 root root 25472 Feb 25 2016 link -rwxr-xr-x 1 root root 53352 Feb 25 2016 ln -rwxr-xr-x 1 root root 108248 Feb 19 2011 loadkeys -rwxr-xr-x 1 root root 32344 Apr 26 2017 login -rwxr-xr-x 1 root root 113440 Feb 25 2016 ls -rwxr-xr-x 1 root root 69184 Apr 26 2017 lsblk -rwxr-xr-x 1 root root 77728 Feb 25 2016 mkdir -rwxr-xr-x 1 root root 61184 Feb 25 2016 mknod -rwxr-xr-x 1 root root 36512 Feb 25 2016 mktemp -rwxr-xr-x 1 root root 36952 Apr 26 2017 more -rwxr-xr-x 1 root root 6816 Feb 18 2016 mountpoint -rwxr-xr-x 1 root root 124168 Feb 25 2016 mv -rwxr-xr-x 1 root root 123360 Jul 7 2012 netstat -rwxr-xr-x 1 root root 28896 Feb 25 2016 nice lrwxrwxrwx 1 root root 8 May 7 01:02 nisdomainname -> hostname -rwxr-xr-x 1 root root 43576 May 17 2016 ping -rwxr-xr-x 1 root root 48088 May 17 2016 ping6 -rwxr-xr-x 1 root root 82584 Mar 17 2015 ps -rwxr-xr-x 1 root root 28672 Feb 25 2016 pwd -rwxr-xr-x 1 root root 10992 Apr 26 2017 raw -rwxr-xr-x 1 root root 37344 Feb 25 2016 readlink -rwxr-xr-x 1 root root 57216 Feb 25 2016 rm -rwxr-xr-x 1 root root 40480 Feb 25 2016 rmdir -rwxr-xr-x 1 root root 15936 Mar 20 2017 rpm -rwxr-xr-x 1 root root 66168 Jul 7 2012 sed -rwxr-xr-x 1 root root 37448 Feb 19 2011 setfont lrwxrwxrwx 1 root root 4 May 7 01:02 sh -> bash -rwxr-xr-x 1 root root 28032 Feb 25 2016 sleep -rwxr-xr-x 1 root root 109696 Feb 25 2016 sort -rwxr-xr-x 1 root root 65120 Feb 25 2016 stty -rwxr-xr-x 1 root root 25120 Feb 25 2016 sync -rwxr-xr-x 1 root root 344648 Oct 7 2014 tar -rwxr-xr-x 1 root root 24408 Apr 26 2017 taskset -rwxr-xr-x 1 root root 55872 Feb 25 2016 touch -rwxr-xr-x 1 root root 14416 May 17 2016 tracepath -rwxr-xr-x 1 root root 14416 May 17 2016 tracepath6 -rwxr-xr-x 1 root root 24416 Feb 25 2016 true -rwxr-xr-x 1 root root 28448 Feb 25 2016 uname -rwxr-xr-x 1 root root 2555 Feb 19 2011 unicode_start -rwxr-xr-x 1 root root 363 Feb 19 2011 unicode_stop -rwxr-xr-x 1 root root 25344 Feb 25 2016 unlink -rwxr-xr-x 1 root root 6800 Oct 12 2016 usleep lrwxrwxrwx 1 root root 8 May 7 01:02 ypdomainname -> hostname -rwxr-xr-x 1 root root 1941 Feb 24 2016 zcat
2019-05-14T06:42:54.625Z 8450ba54-4c48-4867-8898-b61a4296edfd INFO total 9336 dr-xr-xr-x 2 root root 4096 Apr 17 09:08 . drwxr-xr-x 13 root root 4096 Apr 17 09:08 .. -rwxr-xr-x 1 root root 41344 Jul 31 2018 [ -rwxr-xr-x 1 root root 29 Jul 27 2018 alias -rwxr-xr-x 1 root root 28872 Jul 31 2018 arch lrwxrwxrwx 1 root root 4 May 7 01:02 awk -> gawk -rwxr-xr-x 1 root root 37240 Jul 31 2018 base64 -rwxr-xr-x 1 root root 28904 Jul 31 2018 basename -rwxr-xr-x 1 root root 964728 Jul 27 2018 bash lrwxrwxrwx 1 root root 10 May 7 01:02 bashbug -> bashbug-64 -rwxr-xr-x 1 root root 6958 Jul 27 2018 bashbug-64 -rwxr-xr-x 1 root root 26 Jul 27 2018 bg -rwxr-xr-x 1 root root 1638 Jul 27 2018 ca-legacy lrwxrwxrwx 1 root root 3 May 7 01:02 captoinfo -> tic -rwxr-xr-x 1 root root 49888 Jul 31 2018 cat -rwxr-xr-x 1 root root 3283 Jan 4 18:10 catchsegv -rwxr-xr-x 1 root root 26 Jul 27 2018 cd -rwxr-xr-x 1 root root 62840 Jul 31 2018 chcon -rwxr-xr-x 1 root root 58600 Jul 31 2018 chgrp -rwxr-xr-x 1 root root 58472 Jul 31 2018 chmod -rwxr-xr-x 1 root root 62744 Jul 31 2018 chown -rwxr-xr-x 1 root root 33032 Jul 31 2018 cksum -rwxr-xr-x 1 root root 11360 Aug 31 2018 clear -rwxr-xr-x 1 root root 37296 Jul 31 2018 comm -rwxr-xr-x 1 root root 31 Jul 27 2018 command -rwxr-xr-x 1 root root 150968 Jul 31 2018 cp -rwxr-xr-x 1 root root 45744 Jul 31 2018 csplit -rwxr-xr-x 1 root root 41464 Jul 31 2018 cut -rwxr-xr-x 1 root root 62072 Jul 31 2018 date -rwxr-xr-x 1 root root 74792 Jul 31 2018 dd -rwxr-xr-x 1 root root 100800 Jul 31 2018 df -rwxr-xr-x 1 root root 513944 Jul 31 2018 dgawk -rwxr-xr-x 1 root root 113376 Jul 31 2018 dir -rwxr-xr-x 1 root root 41304 Jul 31 2018 dircolors -rwxr-xr-x 1 root root 28864 Jul 31 2018 dirname -rwxr-xr-x 1 root root 108752 Jul 31 2018 du -rwxr-xr-x 1 root root 28848 Jul 31 2018 echo -rwxr-xr-x 1 root root 290 Jul 31 2018 egrep -rwxr-xr-x 1 root root 28880 Jul 31 2018 env -rwxr-xr-x 1 root root 33152 Jul 31 2018 expand -rwxr-xr-x 1 root root 37272 Jul 31 2018 expr -rwxr-xr-x 1 root root 95424 Jul 31 2018 factor -rwxr-xr-x 1 root root 28808 Jul 31 2018 false -rwxr-xr-x 1 root root 26 Jul 27 2018 fc -rwxr-xr-x 1 root root 26 Jul 27 2018 fg -rwxr-xr-x 1 root root 290 Jul 31 2018 fgrep -rwxr-xr-x 1 root root 37264 Jul 31 2018 fmt -rwxr-xr-x 1 root root 33120 Jul 31 2018 fold -rwxr-xr-x 1 root root 432504 Jul 31 2018 gawk -rwxr-xr-x 1 root root 23072 Jan 4 18:16 gencat -rwxr-xr-x 1 root root 22792 Jan 4 18:16 getconf -rwxr-xr-x 1 root root 27904 Jan 4 18:16 getent -rwxr-xr-x 1 root root 31 Jul 27 2018 getopts -rwxr-xr-x 1 root root 158864 Jul 31 2018 grep -rwxr-xr-x 1 root root 33072 Jul 31 2018 groups -rwxr-xr-x 1 root root 37256 Jul 31 2018 head -rwxr-xr-x 1 root root 28864 Jul 31 2018 hostid -rwxr-xr-x 1 root root 56224 Jan 4 18:16 iconv -rwxr-xr-x 1 root root 37272 Jul 31 2018 id -rwxr-xr-x 1 root root 3188 Jul 31 2018 igawk -rwxr-xr-x 1 root root 271528 Jul 27 2018 info -rwxr-xr-x 1 root root 61360 Aug 31 2018 infocmp -rwxr-xr-x 1 root root 21880 Jul 27 2018 infokey lrwxrwxrwx 1 root root 3 May 7 01:02 infotocap -> tic -rwxr-xr-x 1 root root 142792 Jul 31 2018 install -rwxr-xr-x 1 root root 28 Jul 27 2018 jobs -rwxr-xr-x 1 root root 45728 Jul 31 2018 join -rwxr-xr-x 1 root root 5441 Jan 4 18:10 ldd -rwxr-xr-x 1 root root 28856 Jul 31 2018 link -rwxr-xr-x 1 root root 54360 Jul 31 2018 ln -rwxr-xr-x 1 root root 38720 Jan 4 18:16 locale -rwxr-xr-x 1 root root 306840 Jan 4 18:16 localedef -rwxr-xr-x 1 root root 28848 Jul 31 2018 logname -rwxr-xr-x 1 root root 113384 Jul 31 2018 ls -rwxr-xr-x 1 root root 19040 Jan 4 18:16 makedb -rwxr-xr-x 1 root root 41424 Jul 31 2018 md5sum -rwxr-xr-x 1 root root 79680 Jul 31 2018 mkdir -rwxr-xr-x 1 root root 62968 Jul 31 2018 mkfifo -rwxr-xr-x 1 root root 62968 Jul 31 2018 mknod -rwxr-xr-x 1 root root 37400 Jul 31 2018 mktemp -rwxr-xr-x 1 root root 130216 Jul 31 2018 mv -rwxr-xr-x 1 root root 32968 Jul 31 2018 nice -rwxr-xr-x 1 root root 41456 Jul 31 2018 nl -rwxr-xr-x 1 root root 33104 Jul 31 2018 nohup -rwxr-xr-x 1 root root 33032 Jul 31 2018 nproc -rwxr-xr-x 1 root root 66168 Jul 31 2018 numfmt -rwxr-xr-x 1 root root 66280 Jul 31 2018 od -rwxr-xr-x 1 root root 32848 Jul 31 2018 p11-kit -rwxr-xr-x 1 root root 33008 Jul 31 2018 paste -rwxr-xr-x 1 root root 28880 Jul 31 2018 pathchk -rwxr-xr-x 1 root root 432536 Jul 31 2018 pgawk -rwxr-xr-x 1 root root 37360 Jul 31 2018 pinky -rwxr-xr-x 1 root root 14816 Jan 4 18:16 pldd -rwxr-xr-x 1 root root 70672 Jul 31 2018 pr -rwxr-xr-x 1 root root 28848 Jul 31 2018 printenv -rwxr-xr-x 1 root root 49632 Jul 31 2018 printf -rwxr-xr-x 1 root root 66544 Jul 31 2018 ptx -rwxr-xr-x 1 root root 33112 Jul 31 2018 pwd -rwxr-xr-x 1 root root 28 Jul 27 2018 read -rwxr-xr-x 1 root root 41704 Jul 31 2018 readlink -rwxr-xr-x 1 root root 62608 Jul 31 2018 realpath lrwxrwxrwx 1 root root 4 May 7 01:02 reset -> tset -rwxr-xr-x 1 root root 62768 Jul 31 2018 rm -rwxr-xr-x 1 root root 41320 Jul 31 2018 rmdir -rwxr-xr-x 1 root root 84840 Jan 4 18:16 rpcgen -rwxr-xr-x 1 root root 33120 Jul 31 2018 runcon -rwxr-xr-x 1 root root 75960 Aug 1 2018 sed -rwxr-xr-x 1 root root 49552 Jul 31 2018 seq lrwxrwxrwx 1 root root 4 May 7 01:02 sh -> bash -rwxr-xr-x 1 root root 37368 Jul 31 2018 sha1sum -rwxr-xr-x 1 root root 37384 Jul 31 2018 sha224sum -rwxr-xr-x 1 root root 37384 Jul 31 2018 sha256sum -rwxr-xr-x 1 root root 37400 Jul 31 2018 sha384sum -rwxr-xr-x 1 root root 37400 Jul 31 2018 sha512sum -rwxr-xr-x 1 root root 54104 Jul 31 2018 shred -rwxr-xr-x 1 root root 50216 Jul 31 2018 shuf -rwxr-xr-x 1 root root 28952 Jul 31 2018 sleep -rwxr-xr-x 1 root root 117568 Jul 31 2018 sort -rwxr-xr-x 1 root root 4281 Jan 4 18:10 sotruss -rwxr-xr-x 1 root root 66968 Jul 31 2018 split -rwxr-xr-x 1 root root 23160 Jan 4 18:16 sprof -rwxr-xr-x 1 root root 74784 Jul 31 2018 stat -rwxr-xr-x 1 root root 66344 Jul 31 2018 stdbuf -rwxr-xr-x 1 root root 66080 Jul 31 2018 stty -rwxr-xr-x 1 root root 37320 Jul 31 2018 sum -rwxr-xr-x 1 root root 28856 Jul 31 2018 sync -rwxr-xr-x 1 root root 15632 Aug 31 2018 tabs -rwxr-xr-x 1 root root 33136 Jul 31 2018 tac -rwxr-xr-x 1 root root 62560 Jul 31 2018 tail -rwxr-xr-x 1 root root 33080 Jul 31 2018 tee -rwxr-xr-x 1 root root 37200 Jul 31 2018 test -rwxr-xr-x 1 root root 78200 Aug 31 2018 tic -rwxr-xr-x 1 root root 54504 Jul 31 2018 timeout -rwxr-xr-x 1 root root 15696 Aug 31 2018 toe -rwxr-xr-x 1 root root 58272 Jul 31 2018 touch -rwxr-xr-x 1 root root 20072 Aug 31 2018 tput -rwxr-xr-x 1 root root 45552 Jul 31 2018 tr -rwxr-xr-x 1 root root 28808 Jul 31 2018 true -rwxr-xr-x 1 root root 53848 Jul 31 2018 truncate -rwxr-xr-x 1 root root 179144 Jul 31 2018 trust -rwxr-xr-x 1 root root 24192 Aug 31 2018 tset -rwxr-xr-x 1 root root 33128 Jul 31 2018 tsort -rwxr-xr-x 1 root root 28872 Jul 31 2018 tty -rwxr-xr-x 1 root root 15370 Jan 4 18:09 tzselect -rwxr-xr-x 1 root root 29 Jul 27 2018 umask -rwxr-xr-x 1 root root 31 Jul 27 2018 unalias -rwxr-xr-x 1 root root 28864 Jul 31 2018 uname -rwxr-xr-x 1 root root 33128 Jul 31 2018 unexpand -rwxr-xr-x 1 root root 41552 Jul 31 2018 uniq -rwxr-xr-x 1 root root 28856 Jul 31 2018 unlink -rwxr-xr-x 1 root root 1054 Jul 27 2018 update-ca-trust -rwxr-xr-x 1 root root 28976 Jul 31 2018 users -rwxr-xr-x 1 root root 113384 Jul 31 2018 vdir -rwxr-xr-x 1 root root 28 Jul 27 2018 wait -rwxr-xr-x 1 root root 37424 Jul 31 2018 wc -rwxr-xr-x 1 root root 49760 Jul 31 2018 who -rwxr-xr-x 1 root root 28904 Jul 31 2018 whoami -rwxr-xr-x 1 root root 28856 Jul 31 2018 yes
起動しているプロセスの一覧
ps aux
を実行してプロセスを確認します。Node.js 10はps
コマンドがないためランタイムエラーが発生しています。
2019-05-14T06:50:41.877Z 4564291f-a24b-4d05-b033-dd132d50bfc2 USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND 496 1 10.0 11.5 794168 22460 ? Ssl 06:50 0:00 /var/lang/bin/node --expose-gc --max-executable-size=13 --max-semi-space-size=6 --max-old-space-size=102 /var/runtime/node_modules/awslambda/index.js 496 10 0.0 1.2 117268 2404 ? R 06:50 0:00 ps aux
2019-05-14T06:51:00.031Z 71fb536d-21a8-4e3d-889c-877da2f5f4cf USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND 496 1 6.5 13.7 723104 26768 ? Ssl 06:50 0:00 /var/lang/bin/node --expose-gc --max-executable-size=13 --max-semi-space-size=6 --max-old-space-size=102 /var/runtime/node_modules/awslambda/index.js 496 11 0.0 1.2 117268 2504 ? R 06:50 0:00 ps aux
2019-05-14T06:51:11.025Z cd9d0a5b-6877-4fd9-a169-319e352b94e7 USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND 496 1 8.0 15.8 984624 30832 ? Ssl 06:51 0:00 /var/lang/bin/node --expose-gc --max-semi-space-size=6 --max-old-space-size=115 /var/runtime/node_modules/awslambda/index.js 496 11 0.0 1.1 117264 2328 ? R 06:51 0:00 ps aux
{ "errorType": "Runtime.ExitError", "errorMessage": "RequestId: 768cf484-ae14-4acc-b494-b8c1b6c17aae Error: Couldn't find valid bootstrap(s): [/var/task/bootstrap /opt/bootstrap]" }
ファイルシステム
df
を実行してファイルシステムを確認します。Node.js 10はマウントしているファイルシステムがないためエラーが発生しています。。
2019-05-14T09:31:53.772Z da52aa23-ec4a-45c7-aeed-64c09e9e677a Filesystem 1K-blocks Used Available Use% Mounted on /dev/root 6127168 5010712 1100072 82% / /dev/vdb 1965904 45336 1904184 3% /dev /dev/loop0 538424 440 526148 1% /tmp
2019-05-14T09:32:08.434Z 7f8aa1f5-e4a0-4c06-8f3b-900c19b2e539 Filesystem 1K-blocks Used Available Use% Mounted on /dev/root 6127168 5010712 1100072 82% / /dev/vdb 1965904 45324 1904196 3% /dev /dev/loop0 538424 440 526148 1% /tmp /dev/loop1 128 128 0 100% /var/task
2019-05-14T09:36:47.079Z 22b044a5-9cba-4f32-8aa5-bc873f3381fe Filesystem 1K-blocks Used Available Use% Mounted on /dev/root 6127168 5010712 1100072 82% / /dev/vdb 1965904 45336 1904184 3% /dev /dev/loop0 538424 440 526148 1% /tmp
{ "errorType": "Error", "errorMessage": "Command failed: df\ndf: cannot read table of mounted file systems: No such file or directory\n", "trace": [ "Error: Command failed: df", "df: cannot read table of mounted file systems: No such file or directory", "", " at checkExecSyncError (child_process.js:616:11)", " at execSync (child_process.js:653:13)", " at Runtime.exports.handler (/var/task/index.js:5:21)", " at Runtime.handleOnce (/var/runtime/Runtime.js:65:25)", " at process._tickCallback (internal/process/next_tick.js:68:7)" ] }
さいごに
LambdaのNode.js 10はOSがAmazon Linux 2にアップデートされたためコマンドなど一部の動作が異なっています。Node.js 6.10のEOLが間近に迫っていて一気にNode.js 10に上げようと考えている方もいらっしゃると思いますが、ちゃんと動作を確認しないとハマる可能性があるので気をつけて下さい。