SAM CLI executable not found - Pycharm

Viewed 8545

I'm trying to configure PyCharm in order to run a Lambda Function.

First of all in AWS Toolkit I select the SAM CLI executable, and it goes well: enter image description here

Anyway, when I want to add a Lambda run configuration pycharm says: Invalid sam executable: "The system couldn't find the specific route." enter image description here

My system PATH variable: enter image description here

Someone could help me here please, I really don't know what else to do.

Many thanks! Xevi

3 Answers

Actually, I encountered same problem and solved as following;

I assume that you use mac and write in terminal this;

which sam

This gives you the path where sam installed.

Then copy this and paste into sam cli executable path like below;

enter image description here

This means that SAM is not installed on your system or path is not configured in pycharm. Kindly follow the instructions for installing SAM as per the AWS documentation.

To help people like me: which sam should give a path to the SAM executable, like: /opt/homebrew/bin/sam

Then in Pycharm, open preferences (⌘,) Tools -> AWS, the the first input field should be 'SAM CLI Executable'.Or Put 'SAM' (uppercase) in the settings search bar.

Related