Difference between revisions of "AWS Lambda: Python Function"

From Glitchdata
Jump to navigation Jump to search
m
m
Line 2: Line 2:
  
 
==Develop==
 
==Develop==
* use virtual env to install libraries locally
+
* use [[Python: Virtual Environment]] to install libraries locally
 
+
* move lambda script to python lib.
==Test==
+
* Zip up libraries + Lambda files.
 +
** https://medium.com/@manivannan_data/import-custom-python-packages-on-aws-lambda-function-5fbac36b40f8
 +
* Deploy
  
  
Line 10: Line 12:
 
* Use aws cli to deploy lambda code.
 
* Use aws cli to deploy lambda code.
 
** $ aws lambda update-function-code --function-name PyMW1 --zip-file lambda_function.zip
 
** $ aws lambda update-function-code --function-name PyMW1 --zip-file lambda_function.zip
 +
 +
==Test==
 +
* Consider using AWS Test functions.
 +
  
 
==Environment==
 
==Environment==
Line 18: Line 24:
 
==Links==
 
==Links==
 
* https://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html
 
* https://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html
 
+
* https://medium.com/@manivannan_data/import-custom-python-packages-on-aws-lambda-function-5fbac36b40f8
  
  
 
[[Category: AWS Lambda Usage]]
 
[[Category: AWS Lambda Usage]]

Revision as of 17:11, 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