# AWS SAM reference

{% hint style="info" %}
This page was generated from content adapted from the [AWS Developer Guide](https://github.com/awsdocs/aws-sam-developer-guide.git)
{% endhint %}

## Installing Docker

* **Note**\
  Docker is required only for testing your applications locally and for building deployment packages using the `--use-container` option.
* **Note**\
  On Linux, to build and run Lambda functions with a different instruction set architecture than your host machine, there are additional steps to configure Docker. For example, to run `arm64` functions on an `x86_64` machine, you can run the following command to configure the Docker daemon: `docker run --rm --privileged multiarch/qemu-user-static --reset -p yes`.
* **Note**\
  Docker Desktop is officially supported, but starting with AWS SAM CLI version 1.47.0, you can use alternatives as long as they use the Docker runtime.
* **Note**\
  AWS SAM officially supports Docker Desktop. However, starting with AWS SAM CLI version 1.47.0, you can use alternatives as long as they use the Docker runtime.

## Installing Homebrew

* **Note**\
  Installing Homebrew changes your environment's default Python version to the one that Homebrew installs.

## Image repositories

* **Note**\
  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](https://github.com/kevinslin/aws-reference-notes/blob/main/services/aws_serverless_application_model_aws_sam/sam-cli-command-reference-sam-build.md) command with the --build-image option. The examples at the end of this topic show how to build applications using DockerHub repository images.
* **Note**\
  Amazon ECR Public replaced DockerHub starting with the AWS SAM CLI version 1.22.0. If you are using an earlier version of the AWS SAM CLI, we recommend that you upgrade.

## Deploying gradually

* **Note**\
  If you enable gradual deployments through your AWS SAM template, a CodeDeploy resource is automatically created for you. You can view the CodeDeploy resource directly through the AWS Management Console.

## Important notes

* **Important**\
  Although the `pip install aws-sam-cli` command also works on 64-bit Windows, we recommend that you use the [64-bit MSI](https://github.com/aws/aws-sam-cli/releases/latest/download/AWS_SAM_CLI_64_PY3.msi) to install AWS SAM CLI on 64-bit systems.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://awsnotes.dendron.so/compute/aws-serverless-application-model-aws-sam/topics/aws-sam-reference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
