Zilong Li
Zilong Li

Reputation: 958

How can I use non-Python dependencies for my Django Zappa project?

I'm using a Python package called natto-py which requires a non-python Japanese tokeniser called MeCab.

Is it possible to use this for my Zappa project? How can MeCab be installed on Lambda (since pip does not work)?

Django 1.10 & Python 3.5

Upvotes: 2

Views: 563

Answers (1)

Edgar
Edgar

Reputation: 1239

Just drop the binary in the same directory as your zappa project and zappa will zip it up and ship it to Lambda.

Since you are compiling your own binary, I would strongly recommend using a local docker environment for zappa to more closely match the AWS Lambda environment.

Also if your binary is big and will make your Lambda package bigger than 50MB then be sure to use the slim_handler option.

Upvotes: 1

Related Questions