LoginSignup
1
0

More than 3 years have passed since last update.

AWS LambdaでPillow-SIMDを使用した際に起きたエラーの解決方法

Last updated at Posted at 2021-04-17

はまったエラー

Lambda上でPillow-SIMDを使用した際に下記のエラーが発生した。
Unable to import module 'app': libjpeg.so.8: cannot open shared object file: No such file or directory
エラー内容はPillow-SIMDを使用する際に依存モジュールであるlibjpegが存在しないよというもの

解決方法

1.libjpeg.soなど必要な依存モジュールをまとめたzipを作成する

2.右上のレイヤーの作成をクリック

image.png

3.名前に任意の名称を入力し、1で作成したzipをアップロードし作成をクリック

image.png

4.レイヤーが作成されるのでarnをコピーしておく

タイトルなし.png

5.コピーしたarnを下記のページを参考にconfig.jsonに設定する。

config.json
      "automatic_layer": true,
      "layers": [
        "4でコピーしたarn"
      ]

参考URL

https://docs.aws.amazon.com/ja_jp/lambda/latest/dg/configuration-layers.html
https://qiita.com/t-kigi/items/0b4dd6bd15313faa3d73

1
0
0

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
1
0