[AWS] NAT Gateway How-To & Setup Guide — Private Subnet Internet & Cost Optimization
A NAT Gateway gives Private Subnet EC2s secure outbound internet — step-by-step creation, EIP attach, routing, plus cost analysis and the NAT-instance option.
5 posts
![[AWS] NAT Gateway How-To & Setup Guide — Private Subnet Internet & Cost Optimization](assets/posts/aws-nat-gateway-guide/cover.webp)
A NAT Gateway gives Private Subnet EC2s secure outbound internet — step-by-step creation, EIP attach, routing, plus cost analysis and the NAT-instance option.
![[AWS Cost] A Guide to Cutting AWS Infrastructure Costs by 55% (Graviton Migration & Fixed-Cost Optimization Strategy)](assets/posts/aws-cost-optimization/cover.webp)
Cut AWS costs up to 55% (about ₩2M/month): x86→ARM/Graviton migration and swapping ALB, NAT, and RDS for Nginx, a NAT instance, and an EC2 DB — real quotes.
![[AWS] EC2 SSH Connection Error: How to Fix the UNPROTECTED PRIVATE KEY FILE Error (ssh pem key permission setup)](assets/posts/ec2-ssh-unprotected-private-key/cover.webp)
When SSH-ing into EC2 you get 'WARNING: UNPROTECTED PRIVATE KEY FILE' — the .pem key's permissions are too open. Fix it instantly with chmod 400.
![[AWS Infra] Building & Configuring a NAT Instance to Cut NAT Gateway Costs (Part 2)](assets/posts/nat-instance-build-2/cover.webp)
Part 1's community AMI runs an end-of-support OS. Part 2 builds a NAT instance on modern Ubuntu with iptables (forwarding + MASQUERADE), persisted on reboots.
![[AWS Infra] Building & Configuring a NAT Instance from an AMI to Cut NAT Gateway Costs (Part 1)](assets/posts/nat-instance-build-1/cover.webp)
A NAT Gateway costs $32+ a month, so I connected a private subnet to the internet with an EC2 NAT instance instead — Part 1 uses the AWS community NAT AMI.