Search code examples
pandasaws-lambda

Pandas & AWS Lambda


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 looking for and the documentation on this subject is non-existent.

I need access to the package in a lambda function however I have been unsuccessful at getting the package to compile properly for usage in a Lambda function.

In lieu of the compilation can anyone provide reproducible steps to create the binaries?

Unfortunately I have not been able to successfully reproduce any of the guides on the subjects as they mostly combine pandas with scipy which I don't need and adds an extra layer of burden.


Solution

  • After some tinkering around and lot's of googling I was able to make everything work and setup a repo that can just be cloned in the future.

    Key takeaways:

    1. All static packages have to be compiled on an ec2 amazon Linux instance
    2. The python code needs to load the libraries in the lib/ folder before executing.

    Github repo: https://github.com/moesy/AWS-Lambda-ML-Microservice-Skeleton