LoginSignup
3
3

More than 3 years have passed since last update.

[Python] pip3のパッケージを AWS Lambda 上でimportできるようにする

Posted at

AWS Lambda レイヤーにパッケージ用のレイヤーを追加する。

  1. パッケージを配置したフォルダを作成

    pip3 install -t python/lib/python3.7/site-packages <パッケージ名>
    
    • python3.7 の箇所は適宜置き換える
  2. python フォルダをzipに固める

  3. レイヤーにアップロード

  4. パッケージを利用したい関数にレイヤーを追加する

  5. import <パッケージ名> で使えるようになる

参考

環境

macOS 10.15.4
Python 3.7.7

3
3
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
3
3