Exporting a project for upload to AWS Lambda

What is the simplest way to export a py file and its non standard packages for upload to AWS Lambda? I have done this manually (without Pycharm) by:

  1. installing the packages in a folder
  2. creating my code in a py file in that folder
  3. zipping the contents of the folder
  4. uploading that to Lambda.

I am new to Pycharm (and so far really like it over Notepad++) but the file structure has a whole lot of other folders and files that I am not up to speed with.

Any help would be appreciated.

2 comments
Comment actions Permalink

I am looking for the same. I think you have to use the Sam cli but I would rather use the IDE. JetBrains? Any thought?

0
Comment actions Permalink

Have you considered PyCharm's SSH interpreter? https://www.jetbrains.com/help/pycharm/configuring-remote-interpreters-via-ssh.html#

I would say the proper way is to install the dependencies on the remote host (using requirements.txt for example), instead of copying them, but SSH deployment allows you to do that as well.

0

Please sign in to leave a comment.