We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8688b1 commit 94e593aCopy full SHA for 94e593a
aws-ssm-ec2-proxy-command.sh
@@ -40,7 +40,7 @@ ssh_public_key_path="$4"
40
ssh_public_key="$(cat "${ssh_public_key_path}")"
41
ssh_public_key_timeout=60
42
43
-if echo "${ec2_instance_id}" | grep -qe "${REGION_SEPARATOR}"
+if [[ "${ec2_instance_id}" == *"${REGION_SEPARATOR}"* ]]
44
then
45
export AWS_DEFAULT_REGION="${ec2_instance_id##*${REGION_SEPARATOR}}"
46
ec2_instance_id="${ec2_instance_id%%${REGION_SEPARATOR}*}"
0 commit comments