Skip to content

Commit 013ab47

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ec2-instance-connect/aws-ssm-ec2-proxy-command.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ ssh_user="$2"
3838
ssh_port="$3"
3939
ssh_public_key_path="$4"
4040

41-
if echo "${ec2_instance_id}" | grep -qe "${REGION_SEPARATOR}"
41+
if [[ "${ec2_instance_id}" == *"${REGION_SEPARATOR}"* ]]
4242
then
4343
export AWS_DEFAULT_REGION="${ec2_instance_id##*${REGION_SEPARATOR}}"
4444
ec2_instance_id="${ec2_instance_id%%${REGION_SEPARATOR}*}"

0 commit comments

Comments
 (0)