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.
Pandas is mainly used for data analysis and associated manipulation of tabular data in Dataframes. Pandas allows importing data from various file formats such as comma-separated values, JSON, Parquet, SQL database tables or queries, and Microsoft Excel.
Pandas stands for “Python Data Analysis Library ”. According to the Wikipedia page on Pandas, “the name is derived from the term “panel data”, an econometrics term for multidimensional structured data sets.” But I think it's just a cute name to a super-useful Python library!
Pandas is an open source Python package that is most widely used for data science/data analysis and machine learning tasks. It is built on top of another package named Numpy, which provides support for multi-dimensional arrays.
Panda belongs to "Media Transcoding" category of the tech stack, while Pandas can be primarily classified under "Data Science Tools". Some of the features offered by Panda are: Unlimited encoding- When we say unlimited we mean unlimited.
I believe you should be able to use the recent pandas version (or likely, the one on your machine). You can create a lambda package with pandas by yourself like this,
First find where the pandas package is installed on your machine i.e. Open a python terminal and type
import pandas pandas.__file__
That should print something like '/usr/local/lib/python3.4/site-packages/pandas/__init__.py'
'/usr/local/lib/python3.4/site-packages/pandas
) and place it in your repository.Package your Lambda code with pandas like this:
zip -r9 my_lambda.zip pandas/ zip -9 my_lambda.zip my_lambda_function.py
You can also deploy your code to S3 and make your Lambda use the code from S3.
aws s3 cp my_lambda.zip s3://dev-code//projectx/lambda_packages/
Here's the repo that will get you started
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:
Github repo: https://github.com/moesy/AWS-Lambda-ML-Microservice-Skeleton
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With