Skip to content

Commit 94e593a

Browse files
authored
Update aws-ssm-ec2-proxy-command.sh
1 parent c8688b1 commit 94e593a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aws-ssm-ec2-proxy-command.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ ssh_public_key_path="$4"
4040
ssh_public_key="$(cat "${ssh_public_key_path}")"
4141
ssh_public_key_timeout=60
4242

43-
if echo "${ec2_instance_id}" | grep -qe "${REGION_SEPARATOR}"
43+
if [[ "${ec2_instance_id}" == *"${REGION_SEPARATOR}"* ]]
4444
then
4545
export AWS_DEFAULT_REGION="${ec2_instance_id##*${REGION_SEPARATOR}}"
4646
ec2_instance_id="${ec2_instance_id%%${REGION_SEPARATOR}*}"

0 commit comments

Comments
 (0)