Guest User

Untitled

a guest
Aug 20th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. # create project from template
  2. sls create -n proto-matrix -t aws-python3
  3.  
  4. # deploy the service to the cloud
  5. sls deploy
  6.  
  7. # invoke the deployed function
  8. sls invoke -f hello
  9.  
  10. # plugin to manage code dependencies in python
  11. sls plugin install -n serverless-python-requirements
  12.  
  13. # file that contains the list of code dependencies
  14. requirements.txt
  15.  
  16. # Add to serverless.yml
  17. # What this does is tell the serverless-python-requirements plugin to compile the Python packages in a Docker container before bundling them in the zip archive to ensure they're compiled for 64-bit Linux. You'll also need to install Docker in order for this to work, but once done this plugin will handle the dependencies you define in your requirements.txt file automatically.
  18. custom:
  19. pythonRequirements:
  20. dockerizePip: true
Add Comment
Please, Sign In to add comment