Armadilloフォーラム

AWS Greengrass1.10.0での動作不良

torumitsutake

2019年12月18日 10時44分

現在ArmadilloでAWS GreenGrassを使って開発しているのですが,greengrassがうまく動かない状況です。
具体的にはGreegrass のデーモンの起動は成功し,AWS コンソールからのデプロイも成功するのですが、実際には関数が動いておらず,/greegrass/var/log/内のuserディレクトリが存在せずうまくlambdaが起動していない気がします。

各モジュールのバージョンは以下のとおりです。
Lambda python 3.7
AWS Greengrass 1.10.0
Linux kernel 4.9.133-at8

またruntime.logにエラーらしきものがあったのでこちらも合わせて載せておきます。

[2019-12-18T10:18:00.447+09:00][ERROR]-runtime execution error: unable to start lambda container.    {"errorString": "failed to run container sandbox: container_linux.go:344: starting container process caused \\"exec: \\\\"python3.7\\\\": executable file not found in $PATH\\""}
[2019-12-18T10:18:00.449+09:00][ERROR]-Failed to start worker.    {"workerId": "fa796a5d-cf11-4455-7e65-a1fbc4efcbe3", "functionArn": "arn:aws:lambda:us-west-2:813592627692:function:DataSender:3", "errorString": "process start failed: failed to run container sandbox: container_linux.go:344: starting container process caused \\"exec: \\\\"python3.7\\\\": executable file not found in $PATH\\""}
[2019-12-18T10:18:00.847+09:00][ERROR]-runtime execution error: unable to start lambda container.    {"errorString": "failed to run container sandbox: container_linux.go:344: starting container process caused \\"exec: \\\\"python3.7\\\\": executable file not found in $PATH\\""}
[2019-12-18T10:18:00.848+09:00][ERROR]-Failed to start worker.    {"workerId": "fa796a5d-cf11-4455-7e65-a1fbc4efcbe3", "functionArn": "arn:aws:lambda:us-west-2:813592627692:function:DataSender:3", "errorString": "process start failed: failed to run container sandbox: container_linux.go:344: starting container process caused \\"exec: \\\\"python3.7\\\\": executable file not found in $PATH\\""}
[2019-12-18T10:18:01.366+09:00][ERROR]-runtime execution error: unable to start lambda container.    {"errorString": "failed to run container sandbox: container_linux.go:344: starting container process caused \\"exec: \\\\"python3.7\\\\": executable file not found in $PATH\\""}
[2019-12-18T10:18:01.368+09:00][ERROR]-Failed to start worker.    {"workerId": "fa796a5d-cf11-4455-7e65-a1fbc4efcbe3", "functionArn": "arn:aws:lambda:us-west-2:813592627692:function:DataSender:3", "errorString": "process start failed: failed to run container sandbox: container_linux.go:344: starting container process caused \\"exec: \\\\"python3.7\\\\": executable file not found in $PATH\\""}
コメント

at_ohsawa

2019年12月19日 13時12分

そのエラー通りだと思います。

G3L のユーザーランドの Debian(9 stretch)がサポートする python3 は
3.5 なので python3.7 の要求にこたえるためにバイナリをビルドして
インストールして試してみる。もしくは
Greemgrass1.10.0 は依然 python2.7 をサポートしているようなので、
lambda を python2.7で動かす、の2つの手段が思いつきます。

前者の Debian9 で python3.7 のビルドしてインストールする方法は
"debian9 python3.7 install"くらいで検索すると出てきます。

例えば、この記事は見た所真っ当な手順ですね。
https://linuxize.com/post/how-to-install-python-3-7-on-debian-9/