2

I'm having some trouble using the new aws toolkit for pycharm. When I try to run locally the lambda hello-world from the template I get the following error

Error running '[Local] app.lambda_handler': Failed to locate module for PyFile:app.py

any suggestion? Thanks

1
  • 1
    This problem can be solved marking the source code folder containing app.py defined in your template as a source code, making this pycharm will be able to find app.py. If you want more detail you can reference this article Commented Aug 29, 2019 at 8:49

2 Answers 2

1

I assume you tried to run the SAM hello world template with python 3.x. It should work with python 2.7. The issue might be related to: https://github.com/aws/aws-toolkit-jetbrains/issues/698

The hello world example works with python 2.7. Tried it today [16.01.2019].

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

Comments

0

Related to: https://github.com/aws/aws-toolkit-jetbrains/issues/372.

Somehow the local AWS does not read the CodeUri when its not set to the project's directory. Meaning that you will have to change the CodeUri setting in our properties to .

Note that when resetting your CodeUri to your main project folder you will also have to move the requirements.txt to ..

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.