We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 94e593a commit 013ab47Copy full SHA for 013ab47
ec2-instance-connect/aws-ssm-ec2-proxy-command.sh
@@ -38,7 +38,7 @@ ssh_user="$2"
38
ssh_port="$3"
39
ssh_public_key_path="$4"
40
41
-if echo "${ec2_instance_id}" | grep -qe "${REGION_SEPARATOR}"
+if [[ "${ec2_instance_id}" == *"${REGION_SEPARATOR}"* ]]
42
then
43
export AWS_DEFAULT_REGION="${ec2_instance_id##*${REGION_SEPARATOR}}"
44
ec2_instance_id="${ec2_instance_id%%${REGION_SEPARATOR}*}"
0 commit comments