Running AWS SAM projects locally get error

Santosh Silwal picture Santosh Silwal · Jun 11, 2018 · Viewed 9.8k times · Source

I am trying to run an AWS Lambda project locally on Ubuntu. When I run the project with AWS SAM Local it shows me this error: Error: Running AWS SAM projects locally requires Docker. Have you got it installed?

Answer

Dystopic64 picture Dystopic64 · Jul 2, 2018

I had trouble installing it on Fedora.

When I followed the Docker postinstall instructions I managed to get past this issue.

https://docs.docker.com/install/linux/linux-postinstall/

I had to:

  1. Delete the ~/.docker directory;
  2. Create the "docker" group;
  3. Add my user to the "docker" group;
  4. Logout and back in again;
  5. Restart the "docker" daemon.

I was then able to run the command:

sam local start-api