# 使用 Homebrew, Nix, scoop, winget 安装 aws-sam-cli

查看 aws-sam-cli 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:aws-sam-cli
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install aws-sam-cli
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#aws-sam-cli
```

  证据: nixpkgs package indexes: pkgs/by-name/aw/aws-sam-cli/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

### Windows

- Scoop (92%):

```sh
scoop install main/aws-sam-cli
```

  证据: Scoop official bucket manifest trees: bucket/aws-sam-cli.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id Amazon.SAM-CLI -e
```

  证据: Windows Package Manager source index: Amazon.SAM-CLI from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:aws-sam-cli
- **软件包管理器:** Homebrew
- **版本:** 1.165.0
- **来源摘要:** CLI tool to build, test, debug, and deploy Serverless applications using AWS SAM
- **主页:** <https://aws.amazon.com/serverless/sam/>
- **仓库:** <https://github.com/aws/aws-sam-cli>
- **最后更新:** 2026-08-01T20:52:54Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- sam (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.165.0
## 项目历史与用法

AWS SAM CLI is the command-line companion to the AWS Serverless Application Model, used to build, test, debug, package, and deploy serverless applications defined with SAM templates.

### 项目历史

The repository's public history begins in August 2017 as AWS SAM Local CLI, with early tags starting at v0.1.0. The README describes AWS SAM as an open-source framework with shorthand syntax for functions, APIs, databases, and event source mappings, and identifies this repository as the SAM CLI source code.

Over time the CLI became the everyday developer entry point for SAM: local Lambda-like execution, Docker-backed testing, packaging, deployment, guided configuration, and command references live in AWS's Serverless Application Model developer guide.

### 采用历史

SAM CLI adoption tracks the broader AWS serverless workflow. It gives local and CI users a packageable command named sam while the SAM template language remains CloudFormation-compatible infrastructure definition.

The supplied package facts list Homebrew, Nix, Scoop, and winget availability, which matches a cross-platform AWS developer tool: local laptops, CI runners, and onboarding scripts all need a stable installer story.

### 使用方式

Typical commands include sam init, sam build, sam local invoke, sam local start-api, sam deploy, and guided configuration flows. The official docs describe a project-level SAM CLI configuration file for command parameter values.

The default config name is samconfig at the project root next to template.yaml, with TOML as the default format and YAML/YML also supported. AWS credentials are inherited from the standard AWS SDK/CLI credential chain, including shared credentials files.

### 为什么软件包爱好者会关心

For package maintainers, SAM CLI is a heavyweight Python/AWS developer tool whose release cadence matters because AWS service behavior, Lambda runtimes, and local emulation expectations move quickly. The executable is small from the user's point of view but represents a large AWS workflow surface.

### 时间线

- 2017: Repository history begins as AWS SAM Local CLI and v0.1.0 is tagged.
- 2018: v0.x releases add and evolve SAM CLI functionality.
- 2020: README screenshots and docs show SAM CLI as the front door for local build/test/deploy workflows.
- 2026: v1.x development tags show continuing active release work.

### Related projects

- AWS Serverless Application Model is the template framework the CLI operates on.
- AWS CloudFormation is the deployment substrate SAM extends.
- Docker is used by SAM CLI for local Lambda-like execution workflows.

### 来源

- <https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-command-reference.html>
- <https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-config.html>
- <https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/using-sam-cli.html>
- <https://github.com/aws/aws-sam-cli#readme>
- official git history and tags from https://github.com/aws/aws-sam-cli


## 安全说明

没有找到 aws-sam-cli 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: samconfig.toml, samconfig.yaml, samconfig.yml

## Credential files

- Unix: ~/.aws/credentials
- Windows: C:\Users\USERNAME\.aws\credentials
## 其他软件包管理器记录

- Nix - aws-sam-cli: normalized package name match | nixpkgs package indexes: pkgs/by-name/aw/aws-sam-cli/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Scoop - main/aws-sam-cli: normalized package name match | Scoop official bucket manifest trees: bucket/aws-sam-cli.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - Amazon.SAM-CLI: normalized package name match | Windows Package Manager source index: Amazon.SAM-CLI from https://cdn.winget.microsoft.com/cache/source.msix
- Scoop - extras/sam: installed executable or alias match | Scoop official bucket manifest trees: bucket/sam.json from https://api.github.com/repos/ScoopInstaller/Extras/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/aws-sam-cli.yml](https://github.com/mxcl/pkgdb/blob/main/combined/aws-sam-cli.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
