0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

WindowsにAWS CLIをインストールして設定する手順

Last updated at Posted at 2025-07-14

⭐ AWS CLI のインストール

 https://docs.aws.amazon.com/ja_jp/cli/latest/userguide/install-cliv2-windows.html

  • ダウンロード
    msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi
  • インストールが完了したら、PowerShell または CMD を開いて以下を入力:
    aws --version

表示されれば成功です(例:aws-cli/2.15.0)。

⭐ AWS CLI の初期設定

プロジェクトや環境ごとにプロファイルを分けて設定できます:
aws configure --profile (特定のprofile名)

  • AWS Access Key ID
  • AWS Secret Access Key
  • Default region name
  • Default output format(json or なし)

もう一つのプロファイルも同様に設定します:
aws configure --profile (もう一つのprofile名)

⭐ 設定ファイルの確認

設定は以下の2つのファイルに保存されます:
| ファイル名 | 保存場所 | 内容 |
| credentials | %USERPROFILE%.aws\credentials | 認証情報(Access Key, Secret Key) |
| config | %USERPROFILE%.aws\config | リージョンや出力形式などの環境設定 |

  • 手動で編集する場合は、メモ帳やエディタで開いて調整できます。

⭐ 正しく設定されたかを確認

:ballot_box_with_check: プロファイル一覧を表示:
aws configure list-profiles

:ballot_box_with_check: 動作確認(例:S3バケット一覧表示):
aws s3 ls --profile (特定のprofile名)

🔐 補足:セキュリティの注意
設定された Access Key と Secret Key は「平文の認証情報」であり、以下の注意が必要です:

  • Gitなどのバージョン管理に含めない
  • パブリックな共有は厳禁
  • 定期的なキーのローテーションも推奨
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?