Closed dkoutsou closed 7 years ago
If your chalice directory looks like this:
.
├── app.py
├── before
├── chalicelib
│ └── customcode
│ └── __init__.py
├── requirements.txt
└── vendor
├── fake.so
└── vendored_lib
└── __init__.py
Then your deployment package will look like this:
.
├── app.py
├── chalice
│ ├── __init__.py
│ └── app.py
├── chalicelib
│ └── customcode
│ └── __init__.py
├── fake.so
├── vendored_lib
│ └── __init__.py
The top app.py
is your code.
@stealthycoin How should .so
files be placed within vendor/
in order for them to get loaded properly on the deployed application when using automatic lambda layers?
I have written an API using chalice that does some processing of audio files. For the processing I am using ffmpeg. I have a pre-built version of ffmpeg included in the /vendor folder and I want to call this executable (using subprocess) from a function that is located in the /chalicelib folder. Is this possible? If so, what is the structure of the application inside the lambda in order to include the absolute path in the subprocess call?