When doing local development with AWS SAM, I follow these steps:
However, when running the above, the following error sometimes occurred:
Running the following command resolved the error. The region may need to be adjusted for your environment:
I hope this serves as a useful reference for anyone experiencing the same error.