diff --git a/d3b_cli_igor/utils/scripts/dev-env-tunnel b/d3b_cli_igor/utils/scripts/dev-env-tunnel index b1e9c03..13fd04a 100755 --- a/d3b_cli_igor/utils/scripts/dev-env-tunnel +++ b/d3b_cli_igor/utils/scripts/dev-env-tunnel @@ -84,7 +84,7 @@ if [ ! -z $(ps -ef | grep "ssm start-session" | grep -v grep | awk '{ print $2 } fi echo "getting info" -info=$(aws ec2 describe-instances --region us-east-1 --query "Reservations[*].Instances[?Tags[?Key=='Name']|[?Value=='$ORG-infra-bastion-ssm-ec2-$syslevel-0']].[InstanceId,PrivateIpAddress]" --output text | tail -1) +info=$(aws ec2 describe-instances --region us-east-1 --query "Reservations[*].Instances[?Tags[?Key=='Name']|[?Value=='$ORG-infra-bastion-ssm-ec2-$syslevel-0']].[InstanceId,PrivateIpAddress]" --output text | grep -v None | tail -1) INSTANCE_ID=$(echo "$info" | awk '{ print $1 }') INSTANCE_IP=$(echo "$info" | awk '{ print $2 }') if [ -z "$INSTANCE_ID" ]; then