1Bastion vs SSM
While Bastion hosts are traditional, AWS Systems Manager (SSM) Session Manager is now the recommended approach as it requires no open inbound ports and no SSH keys.
2Step-by-Step Breakdown
NAT Gateway. A managed service allowing private instances to access the internet securely.
Elastic IPs. NAT Gateways require a static Elastic IP (EIP) to function.
Placement. NAT Gateways MUST be deployed in a PUBLIC subnet, not a private one.
Routing. Private subnets route 0.0.0.0/0 to the NAT Gateway.
Knowledge Check. Where must a NAT Gateway be deployed?
- →Private Subnet
- →Public Subnet
High Availability. NAT Gateways are AZ-resilient. Deploy one per AZ for true HA.
Bastion Hosts. A Bastion Host (Jump Box) is a securely hardened EC2 instance in a public subnet used to SSH into private instances.
SSH Agent Forwarding. Never store private keys on the Bastion. Use SSH agent forwarding.
Security Groups. The private instance SG should ONLY accept SSH traffic from the Bastion SG, not 0.0.0.0/0.
Summary. NAT Gateways handle outbound traffic, Bastions handle inbound admin access.
