Difference between revisions of "AWS Lambda: Python Function"

From Glitchdata
Jump to navigation Jump to search
m
m
 
Line 3: Line 3:
 
==Develop==
 
==Develop==
 
* use [[Python: Virtual Environment]] to install libraries locally
 
* use [[Python: Virtual Environment]] to install libraries locally
* move lambda script to python lib.
+
* move lambda script to (venv) /lib/site-packages/
 
* Zip up libraries + Lambda files.
 
* Zip up libraries + Lambda files.
 
** https://medium.com/@manivannan_data/import-custom-python-packages-on-aws-lambda-function-5fbac36b40f8
 
** https://medium.com/@manivannan_data/import-custom-python-packages-on-aws-lambda-function-5fbac36b40f8

Latest revision as of 17:14, 26 June 2019


Develop


Deploy

  • Use aws cli to deploy lambda code.
    • $ aws lambda update-function-code --function-name PyMW1 --zip-file lambda_function.zip

Test

  • Consider using AWS Test functions.


Environment

  • xxx


Links