Why use SSM Session Manager instead of a bastion host?
BeginnerScenarioVPC & Cloud Network Design
Answer
Situation read → Bastions are a long-lived internet-facing attack surface; SSM removes the open port.
What I'd do →
- Attach an instance profile with
AmazonSSMManagedInstanceCore - Ensure the instance can reach SSM through NAT or the interface endpoints
ssm,ssmmessages,ec2messages - Connect with
aws ssm start-session --target i-0abc - Enable session logging to S3 or CloudWatch for audit
- Port forward with
aws ssm start-session --document-name AWS-StartPortForwardingSession
Why → No inbound port 22, no key distribution, and every session is authenticated by IAM and logged.
Interview tip → Say you still keep a break-glass path documented for when SSM itself is down.
More on VPC & Cloud Network Design
What makes a subnet public versus private in AWS?BeginnerExplain internet gateway versus NAT gateway and when you use each.BeginnerPrivate instances need to pull packages from the internet but must not be reachable from it. What do you set up?BeginnerWhy shouldn't production run in the default VPC?BeginnerPublic IP, Elastic IP and private IP: how do they differ on EC2?BeginnerYour private subnet instances reach S3 through the NAT gateway and the bill is large. What do you do?Beginner