Restrict SSH within EC2 Instance Connect and Your Region
How to restrict SSH connection within EC2 Instance Connect
Published in
Sep 27, 2023
We can restrict SSH connection within our region and EC2 instance connect using the IP Ranges of the EC2 instance connect.
Search for the IP range of your region and service from the following link:
In my case, my region code is ap-northeast-1
and service is EC2_INSTANCE_CONNECT
:
Now, configure the security group accordingly:
And then, attach the security group with the target instances.