2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AWS CodeStarのCodeBuild設定でどハマりした話

Posted at

Pythonでサクッとlambdaを作ろうとしてAWS CodeStarってものを見つけて使ってみたらハマったことのメモ。

色々コードを実装していざlambdaに配置したら謎のエラー。ローカルでは全く問題がない。

CodeBuildでもエラーは出ていない、のだが...

原因はlambdaのランタイムはpython3.xを指定していたのにCodeStarが設定したCodeBuildのイメージがなぜかpythonですらなくnodeのイメージだった。で、たまたま?そのイメージにもpythonが入ってたがバージョンが2.xだったのでpipでインストールしていたライブラリで、「python2系のリソースがあるけど、python3系で実行してるよ?」っていうエラーを出してlambdaの実行時に異常終了してた。。。

そりゃね、CodeStarでプロジェクト作るときにはpythonのバージョンまでは指定してなかったしねぇ...でもnodeのイメージってどうなのよ。

ということで、CodeStarを使って新しいプロジェクトを作ったらCodeBuildのコンソールに行って、buildに使われるイメージを確認しましょう。

以上です。

2
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?