How to reduce your AWS NAT Gateway bill

Andrew Larsen
5 min readNov 22, 2023

At Compoze Labs we manage dozens of AWS accounts, both for our customers and our own. As part of our management services we are always looking for ways to optimize AWS costs.

One area that always bothered us was how much was spent on networking costs. Most accounts see the highest spend in RDS, EC2, ECS, etc but networking was commonly one of the top spends on our AWS bills. After some initial analysis we found that our NAT Gateways (both per hour & per GB processed) made up a significant portion of these networking costs.

What is a NAT Gateway

A NAT Gateway manages the flow of internet traffic to and from instances in a private subnet. When an instance in the private subnet sends a request to the internet, the NAT Gateway translates the private IP address of the instance into a public IP address, ensuring the instance can communicate with external services. This translation process is vital for maintaining the security and privacy of the instances, as it masks their internal IP addresses from the outside world.

image from

AWS charges their NAT gateway per hour ($0.045) and per GB data processed ($0.045/GB egress). Our default…