diff --git a/check-ecs-exec.sh b/check-ecs-exec.sh index 2a692a7..b7d3738 100755 --- a/check-ecs-exec.sh +++ b/check-ecs-exec.sh @@ -635,7 +635,7 @@ if [[ "${taskNetworkingAttachment}" = "null" ]]; then subnetJson=$(${AWS_CLI_BIN} ec2 describe-subnets --subnet-ids "${taskSubnetId}") else ## awsvpc networking (for both EC2 and Fargate) - taskSubnetId=$(echo "${describedTaskJson}" | jq -r ".tasks[0].attachments[0].details[] | select(.name==\"subnetId\") | .value") + taskSubnetId=$(echo "${describedTaskJson}" | jq -r ".tasks[0].attachments[].details[] | select(.name==\"subnetId\") | .value") subnetJson=$(${AWS_CLI_BIN} ec2 describe-subnets --subnet-ids "${taskSubnetId}") taskVpcId=$(echo "${subnetJson}" | jq -r ".Subnets[0].VpcId") fi