WindowsへのAWS SAM CLIのインストール

WindowsへのAWS SAM CLIのインストール

AWS SAM CLIインストール

MSIをダウンロードしてインストールします。

Release Release version: 1.132.0 · aws/aws-sam-cli
Changes:01e9489 - chore(deps): bump cfn-lint from 1.19.0 to 1.20.0 in /requirements (#7706)2f15278 - chore(deps): bump f...
C:\>sam --version
SAM CLI, version 1.52.0

Dockerインストール(オプション)

ローカル実行する場合は、Dockerをインストールしておきます。

Windows
Get started with Docker for Windows. This guide covers system requirements, where to download, and instructions on how t...
C:\>docker --version
Docker version 20.10.16, build aa7e414

gitインストール

gitからcloneするのでgitのインストールも必要です。

C:\> git --version
git version 2.36.1.windows.1

gitにパスが通っていないと、sam initで以下のようなエラーが出ます。

Project name [sam-app]:
WARN: Could not clone repo https://github.com/aws/aws-sam-cli-app-templates
Traceback (most recent call last):
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\lib\site-packages\samcli\lib\utils\git_repo.py", line 130, in clone
git_executable: str = GitRepo._git_executable()
File "C:\Program Files\Amazon\AWSSAMCLI\runtime\lib\site-packages\samcli\lib\utils\git_repo.py", line 88, in _git_executable
raise OSError("Cannot find git, was looking at executables: {}".format(executables))
OSError: Cannot find git, was looking at executables: ['git', 'git.cmd', 'git.exe', 'git.bat']
Redirecting…

AWS SAM CLIアップグレード

ERROR: The request could not be satisfied

こちらのサイトからmsiをダウンロードして再度インストールします。(アンインストール不要)

C:\>sam --version
SAM CLI, version 1.76.0

参考サイト

AWS SAM CLI のインストール - AWS Serverless Application Model
このセクションでは、macOS、Windows、および Linux に AWS SAM CLI をインストールする方法について説明します。
AWS SAM 前提条件 - AWS Serverless Application Model
をインストールする前に必要な前提条件 AWS SAM CLI.
ERROR: The request could not be satisfied

コメント

株式会社CONFRAGE ITソリューション事業部をもっと見る

今すぐ購読し、続きを読んで、すべてのアーカイブにアクセスしましょう。

続きを読む

タイトルとURLをコピーしました