Chalice: Add option to compile dependencies if no wheel is found

Created on 3 Dec 2018  路  3Comments  路  Source: aws/chalice

There are some popular libraries that require manual compiling/handling to get them to work with Lambda. It would be nice if Chalice automated the process of _reliably_ building and packaging dependencies within an Amazon Linux Docker container kind of like the Serverless framework does:

https://serverless.com/blog/serverless-python-packaging/

Two that have caused me problems:

feature-request

Most helpful comment

I think it would be useful to have an optional backend to the packager that could integrate with docker to build your dependencies for you. Maybe something like:

$ chalice package --backend docker ./out

That way if you want a guaranteed way of packaging and don't mind installing/configuring docker you can use that, and if your set of dependencies all have a manylinux1 wheel available, you don't need docker.

All 3 comments

Have you considered using the psycopg2-binrary package? It's a precompiled wheel bundled with all the relevant libraries.

@tedivm That would definitely help, but requires knowing it exists and isn't as user-friendly as if the solution handled reliably packaging itself.

I think it would be useful to have an optional backend to the packager that could integrate with docker to build your dependencies for you. Maybe something like:

$ chalice package --backend docker ./out

That way if you want a guaranteed way of packaging and don't mind installing/configuring docker you can use that, and if your set of dependencies all have a manylinux1 wheel available, you don't need docker.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nedlowe picture nedlowe  路  3Comments

davidolmo picture davidolmo  路  3Comments

carlkibler picture carlkibler  路  4Comments

montao picture montao  路  4Comments

michaeldimchuk picture michaeldimchuk  路  3Comments