完了確認
「VPC"handson-cloud9-vpc"にサブネット"handson-cloud9-subnet"が存在する。」ことを確認します。
コマンド:
aws ec2 describe-subnets \
  --filters Name=vpc-id,Values=${ec2_vpc_id} \
            Name=tag:Name,Values=${EC2_SUBNET_TAG_NAME}  \
  --query 'Subnets[].Tags[?Key == `Name`].Value' \
  --output text
結果(例):
「サブネット"handson-cloud9-subnet"のCIDRは"10.0.0.0/24"である。」ことを確認します。
コマンド:
aws ec2 describe-subnets \
  --filters Name=vpc-id,Values=${ec2_vpc_id} \
            Name=tag:Name,Values=${EC2_SUBNET_TAG_NAME}  \
  --query "Subnets[].CidrBlock" \
  --output text
結果(例):
「サブネット"handson-cloud9-subnet"のAZは"ap-northeast-1a"である。」ことを確認します。
コマンド:
aws ec2 describe-subnets \
  --filters Name=vpc-id,Values=${ec2_vpc_id} \
            Name=tag:Name,Values=${EC2_SUBNET_TAG_NAME}  \
  --query "Subnets[].AvailabilityZone" \
  --output text
結果(例):