================================================================ 2.7. インスタンスの追加 ================================================================ .. |DAY_WORK| replace:: |today| .. |AWS_DEFAULT_PROFILE| replace:: .. |AWS_DEFAULT_REGION| replace:: ap-northeast-1 .. |ELBV2_TARGET_GROUP_NAME| replace:: handson-target-group-\ |DAY_WORK| .. |ELBV2_TARGET_GROUP_ID| replace:: xxxxxxxxxxxxxxxx .. |AWS_ID| replace:: .. include:: ../../../resource-catalog/cli-elbv2/describe-target-groups/usage-env-ELBV2_TARGET_GROUP_ARN.txt コマンド: .. code-block:: sh EC2_INSTANCE_ID=$( \ aws ec2 describe-instances \ --filter Name=tag:Name,Values=handson-2017-10-09 \ --query 'Reservations[].Instances[].InstanceId' --output text \ ) \ && echo ${EC2_INSTANCE_ID} コマンド: .. code-block:: sh aws elbv2 register-targets \ --target-group-arn ${ELBV2_TARGET_GROUP_ARN} \ --targets Id=${EC2_INSTANCE_ID}