Image repositories - AWS Serverless Application Model

Image repositories

AWS SAM simplifies continuous integration and continuous deployment (CI/CD) tasks for serverless applications with the help of build container images. The images that AWS SAM provides include the AWS SAM command line interface (CLI) and build tools for a number of supported AWS Lambda runtimes. This make it easier to build and package serverless applications using the AWS SAM CLI. You can use these images with CI/CD systems to automate the building and deployment of AWS SAM applications. For examples, see Deploying using CI/CD systems.

AWS SAM build container image URIs are tagged with the version of the AWS SAM CLI included in that image. If you specify the untagged URI, then the latest version is used. For example, uses the latest image. However, uses the the image containing AWS SAM CLI version 1.24.1.

Starting with version 1.33.0 of the AWS SAM CLI, both x86_64 and arm64 container images are available for supported runtimes. For more information, see Lambda runtimes in the AWS Lambda Developer Guide.


Prior to version 1.22.0 of the AWS SAM CLI, DockerHub was the default repository that the AWS SAM CLI pulled the container image from. Starting with version 1.22.0, the default repository changed to Amazon Elastic Container Registry Public (Amazon ECR Public). To pull a container image from a repository other than the current default, you can use the sam build command with the --build-image option. The examples at the end of this topic show how to build applications using DockerHub repository images.

Image repository URIs

The following table lists the URIs of Amazon ECR Public build container images that you can use to build and package serverless applications with AWS SAM.


The following two example commands build applications using container images from the DockerHub repository:

# Build a Node.js 12 application using a container image pulled from DockerHub sam build --use-container --build-image amazon/aws-sam-cli-build-image-nodejs12.x # Build a function resource using the Python 3.8 container image pulled from DockerHub sam build --use-container --build-image Function1=amazon/aws-sam-cli-build-image-python3.8