
AWSCLIコマンドをインストールする環境
$ cat /etc/os-release NAME="Ubuntu" VERSION="20.04.5 LTS (Focal Fossa)"
バージョン確認コマンド
aws --version
結果
aws-cli/1.18.147 Python/2.7.18 Linux/4.14.246-187.474.amzn2.x86_64 botocore/1.18.6
AWS_CLIでグローバルIPを調べる
ユースケース:システム調査
#グローバルIPを表示
curl -s ifconfig.me
curl -s http://169.254.169.254/latest/meta-data/public-ipv4
AWS_CLIでVPCの一覧を確認する
aws ec2 describe-vpcs
どのリージョンにEC2が所属しているか