6

Using pycharm on Windows.

I have created a zip file for upload to AWS Lambda the manual way: 1) Install the modules manually into a directory other than the default directory. 2) Create my .py code file 3) Zip the contents of the project folder 4) Upload that zip folder to Lambda

I am new to Pycharm and with a project I see that there are a whole bunch of files and folders that I do not understand.

I tried to zip the entire Pycharm project contents and upload - that did not work. It looks like I need to run some kind of setup that creates the proper folder structure and files that have the correct content.

Any help would be appreciated.

9
  • Well, it's better that you don't use PyCharm for that. Commented Dec 9, 2017 at 1:24
  • Follow the same manual way, but automate it using whatever language you know best. It can be a python script, a Windows powershell script, a Windows batch script, etc. Commented Dec 9, 2017 at 1:25
  • Is there a better IDE for python 3.6 that cooperates with Lambda? Commented Dec 9, 2017 at 17:13
  • 2
    There is Cloud9 (aws.amazon.com/de/cloud9) from AWS, which should be integrated pretty well with AWS Lambda and all the other services. Commented Dec 9, 2017 at 17:24
  • 2
    Pycharm works like a charm. I use it to develop lambdas. I suggest you look into the serverless framework. Combined with the serverless-python-requirements plugin it should do what you need. Commented Dec 14, 2017 at 8:57

2 Answers 2

1

For all those still stuck with this, I have a few suggestions which could possibly resolve the issue altogether:

  • Use pip's -t option to specify the Application Directory

    Using Pip's -t option, one can specify the Application directory. It's better than using the pycharm's package installer, as we can specify the installation directory with this.

  • Zip the complete Application directory (Answer's your question)

    Go inside your Pycharm project directory -> select all -> Right Click -> send to compressed (zip). This may result in the inclusion of some unneeded directories (__pycache__, .idea), but would not affect the program execution. If needed, you may skip those two directories while creating the zip.

I believe you were zipping the project directory, rather than compressing the contents of the Project directory.

Sign up to request clarification or add additional context in comments.

Comments

0

As I also answered here Jetbrains now offers the AWS Toolkit which allows local and remote development of Lambda functions.

Despite some lingering issues it works quite well. Still finding my way with it.

It includes packaging and deploying.

Toolkit page on Jetbrains website

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.