Overview

When trying sam local invoke with AWS SAM, the following message was displayed.

Error:RunningAWSSAMprojectslocallyrequiresDocker.Haveyougotitinstalledandrunning?

The environment was Mac, and Docker was running.

Solution

Running the following command resolved the issue.

sudoln-s~/.docker/run/docker.sockvar/run/docker.sock

I referenced the following.

https://github.com/lando/lando/issues/3533

Summary

I hope this is helpful for anyone facing the same issue.