When using a Python module with AWS Lambda, I think that Troublesome procedure is required to use a module that must be compiled with Amazon Linux. I used to, but there was an easier way. Use the serverless framework (https://serverless.com/) and plugins (https://github.com/UnitedIncome/serverless-python-requirements).
It's almost as Class Method's article, but some yaml is written. It was different.
If you are compiling a non-pure-Python module, add the following settings to serverless.yml.
serverless.yml
plugins:
- serverless-python-requirements
custom:
pythonRequirements:
dockerizePip: true
Only this is really easy.
Where is requirements.py? If you think that, please execute the following command.
% sls requirements install
Recommended Posts