「[[.NET 開発基盤部会 Wiki>http://dotnetdevelopmentinfrastructure.osscons.jp]]」は、「[[Open棟梁Project>https://github.com/OpenTouryoProject/]]」,「[[OSSコンソーシアム .NET開発基盤部会>https://www.osscons.jp/dotNetDevelopmentInfrastructure/]]」によって運営されています。 -[[戻る>Amazon Web Services]] *目次 [#pc039e2a] #contents *概要 [#nb8ebdd6] -AWS Command Line Interface -[[Azure CLI>https://techinfoofmicrosofttech.osscons.jp/index.php?Azure%20CLI]]みたいな。 *詳細 [#g315b788] **インストール [#m5967ad4] ***Windows [#da2801e3] 64 ビットの Windows インストーラをダウンロードし、実行。 ***MacOS [#w0cac5e8] MacOS PKG インストーラをダウンロードし、実行。 ***Linux [#b2f3bb64] -Linux インストーラをダウンロード、解凍し、実行。 -Pythonのpipを使ってインストールもできるらしい。 -Amazon Linux AMI、Amazon Linux 2には、プレ・インストールされている。 ***WSL [#qfa05b12] (多分)[[Linux>#b2f3bb64]]と同じ方法で行ける。 **確認 [#i18bfb8c] >aws --v aws-cli/2.0.57 Python/3.7.7 Windows/10 exe/AMD64 **初期設定(ログイン) [#idca17ac] -ログインではなく、初期設定。 -[[OAuth2/OIDC>https://techinfoofmicrosofttech.osscons.jp/index.php?OpenID%20%2F%20OAuth%20%2F%20OpenID%20Connect]]ではなく、クレデンシャルを使用する方式。 ***[[IAMユーザを作成>AWSのIAMユーザの作成]] [#mee40dca] ***aws configure [#n6b78cfa] -設定 --クレデンシャル等の設定 >aws configure AWS Access Key ID [None]: ... AWS Secret Access Key [None]: ... Default region name [None]: us-east-2 Default output format [None]: table ※ --profileオプションを指定できる。 --ページングをカット >aws configure set cli_pager "" -初回アクセス --regionsの確認 >aws ec2 describe-regions --instancesの確認 >aws ec2 describe-instances -追加のプロファイルを設定 --プロファイルのconfigure >aws configure --profile user1 ... --プロファイルの利用 >aws ec2 describe-instances --profile user1 ... --複数コマンドに渡るプロファイルの利用 >setx AWS_PROFILE user1 >aws ec2 describe-regions ... >aws ec2 describe-instances ... --プロファイルの削除~ 以下で、config-fileの場所を見つけてエントリを削除する。 >aws configure list --profile user1 ***Windows端末 / Linux (SSH)端末 [#b06c738a] [[OAuth2/OIDC>https://techinfoofmicrosofttech.osscons.jp/index.php?OpenID%20%2F%20OAuth%20%2F%20OpenID%20Connect]]ではなく、クレデンシャルを使用する方式なので、差異は無さそう。 [[OAuth2/OIDC>https://techinfoofmicrosofttech.osscons.jp/index.php?OpenID%20%2F%20OAuth%20%2F%20OpenID%20Connect]]ではなく、~ クレデンシャルを使用する方式なので、~ ウィンドウが在っても・無くても、差異は無さそう。 *参考 [#ued76654] -第1回 AWS CLIをインストール:~ インフラ屋のAWSはじめた日記─GUIを捨てよ|gihyo.jp … 技術評論社~ https://gihyo.jp/admin/serial/01/awscli_diary/0001 **AWS [#i60df265] -AWS コマンドラインインターフェイス~ (CLI: AWSサービスを管理する統合ツール)~ https://aws.amazon.com/jp/cli/ ***AWS Command Line Interface [#u7c68525] -AWS Command Line Interface とは~ https://docs.aws.amazon.com/ja_jp/cli/latest/userguide/cli-chap-welcome.html -名前付きプロファイル~ https://docs.aws.amazon.com/ja_jp/cli/latest/userguide/cli-configure-profiles.html