AWS Lambda Sam can't find docker AWS Lambda Sam can't find docker docker docker

AWS Lambda Sam can't find docker


Follow these steps:

  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.

More info in the Docker postinstall instructions


I had an older version of docker installed. Although docker was working fine, sam could not detect it properly.

sam local start-api --debug

docker.errors.APIError: 400 Client Error: Bad Request ("client is newer than server (client API version: 1.35, server API version: 1.24)") Error: Running AWS SAM projects locally requires Docker. Have you got it installed?

I removed the old version and re-installed the docker.io package (under Ubuntu). Then I started the docker daemon and the issue was fixed.


When installing Docker in windows make sure to install the linux kernel update that you get from a prompt window after installation:

https://docs.microsoft.com/es-es/windows/wsl/install-win10#step-4---download-the-linux-kernel-update-package

After the update has been installed docker should restart (otherwise restart manually, or restart computer) and SAM should be able to find it ok.