Skip to content

Commit

Permalink
Update aws-ssm-ec2-proxy-command.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
qoomon authored Nov 30, 2022
1 parent 94e593a commit 013ab47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ec2-instance-connect/aws-ssm-ec2-proxy-command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ssh_user="$2"
ssh_port="$3"
ssh_public_key_path="$4"

if echo "${ec2_instance_id}" | grep -qe "${REGION_SEPARATOR}"
if [[ "${ec2_instance_id}" == *"${REGION_SEPARATOR}"* ]]
then
export AWS_DEFAULT_REGION="${ec2_instance_id##*${REGION_SEPARATOR}}"
ec2_instance_id="${ec2_instance_id%%${REGION_SEPARATOR}*}"
Expand Down

0 comments on commit 013ab47

Please sign in to comment.