Software⏱️ 2 min read📅 2026-05-29

How to Fix: Error: Container creation failed: No such image: public.ecr.aws/sam/build-p

Check the AWS SAM CLI version and update to the latest version if necessary. Also, ensure that you have the correct image tag for your container.

Quick Answer: Try updating the SAM CLI to the latest version or check the image tag in the 'public.ecr.aws/sam/build-python3.12:latest-x86_64' format.

The error you're encountering is due to the AWS SAM CLI attempting to use a non-existent image in your Docker container. The issue lies in the `public.ecr.aws/sam/build-python3.12:latest-x86_64` image, which doesn't exist.

🚀 How to Resolve This Issue

Method 1: Update the Image Name

  1. Step 1: Check the SAM CLI documentation for the correct image name. In this case, it should be `public.ecr.aws/sam/build-python:latest-x86_64.

Method 2: Use a Different Image

  1. Step 1: If the above method doesn't work, try using a different Python version image. You can do this by specifying the image name in the `container` section of your SAM template.

💡 Conclusion

By following these steps, you should be able to resolve the issue and successfully build your AWS SAM application using Docker.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions