cloud:aws:awscli
差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
| cloud:aws:awscli [2017/12/01 08:12] – [S3] hayashi | cloud:aws:awscli [2024/01/12 07:58] (現在) – [インストール] hayashi | ||
|---|---|---|---|
| 行 3: | 行 3: | ||
| ===== インストール ===== | ===== インストール ===== | ||
| - | | + | <del>pip install awscli</ |
| + | pipでもインストールできるがAWSの推奨に従いダウンロードしてインストールする | ||
| + | |||
| + | |||
| + | <code bash> | ||
| + | curl " | ||
| + | unzip awscliv2.zip | ||
| + | sudo ./ | ||
| + | aws --version | ||
| + | </ | ||
| ===== AWS CLI の設定 ===== | ===== AWS CLI の設定 ===== | ||
| 行 21: | 行 30: | ||
| # aws help | # aws help | ||
| + | ===== EC2 ===== | ||
| + | [Name]tagの一覧 | ||
| + | |||
| + | $ aws ec2 describe-instances --query ' | ||
| + | instance IDを追加 | ||
| + | $ aws ec2 describe-instances --query ' | ||
| + | |||
| + | tag名と値でフィルタ | ||
| + | |||
| + | $ aws ec2 describe-instances --filters ' | ||
| + | OR | ||
| + | $ aws ec2 describe-instances --filters ' | ||
| ===== S3 ===== | ===== S3 ===== | ||
| 行 31: | 行 52: | ||
| aws s3 cp s3:// | aws s3 cp s3:// | ||
| + | ==== デフォルト暗号化 ==== | ||
| + | 状態の取得:設定されていない場合にはErrorになる | ||
| + | $aws s3api get-bucket-encryption --bucket < | ||
| + | |||
| + | 設定 | ||
| + | $aws s3api put-bucket-encryption --bucket < | ||
| + | |||
| + | <code json conf.json> | ||
| + | { | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | } | ||
| + | ] | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | **既存ファイルは暗号化されないので注意** | ||
| ===== Route53のAレコード更新 ===== | ===== Route53のAレコード更新 ===== | ||
cloud/aws/awscli.1512115950.txt.gz · 最終更新: by hayashi
