Pandas & AWS Lambda

前端 未结 11 899
太阳男子
太阳男子 2020-12-03 04:52

Does anyone have a fully compiled version of pandas that is compatible with AWS Lambda?

After searching around for a few hours, I cannot seem to find what I\'m looki

11条回答
  •  鱼传尺愫
    2020-12-03 05:20

    Another option is to download the pre-compiled wheel files as discussed on this post: https://aws.amazon.com/premiumsupport/knowledge-center/lambda-python-package-compatible/

    Essentially, you need to go to the project page on https://pypi.org and download the files named like the following:

    • For Python 2.7: module-name-version-cp27-cp27mu-manylinux1_x86_64.whl
    • For Python 3.6: module-name-version-cp36-cp36m-manylinux1_x86_64.whl

    Then unzip the .whl files to your project directory and re-zip the contents together with your lambda code.

    NOTE: The main Python function file(s) must be in the root folder of the resulting deployment package .zip file. Other Python modules and dependencies can be in sub-folders. Something like:

    my_lambda_deployment_package.zip
    ├───lambda_function.py
    ├───numpy
    │   ├───[subfolders...]
    ├───pandas
    │   ├───[subfolders...]
    └───[additional package folders...]
    

提交回复
热议问题