Menu

AWS FinOps Field Notes: Eliminating Idle NAT Gateways and Cross-AZ Traffic Traps
📰

AWS FinOps Field Notes: Eliminating Idle NAT Gateways and Cross-AZ Traffic Traps

DEV Community: python·Ace7-coder·3 days ago
#az2rV5pP
#devtopython#devto#dev#region#account
Reading 0:00
15s threshold

While auditing cloud infrastructure costs this week, recurring configuration gaps continue to quietly inflate monthly bills.

Field Insight: The Hidden Cost Trap

Each NAT Gateway bills a fixed $0.045/hour ($32.85/month base) before moving a single packet, plus $0.045/GB data processing and a $0.01/GB cross-AZ inter-subnet penalty when traffic routes to a NAT Gateway in another Availability Zone. Orphaned NAT Gateways in forgotten VPCs burn about $395/year each in baseline fees, and for high-throughput services hitting S3 or DynamoDB through NAT, replacing NAT processing with free Gateway VPC Endpoints saves $45 per terabyte processed.

Automated Detection: Auditing Idle NAT Gateways with Boto3

import boto3 from datetime import datetime , timedelta , timezone

def audit_idle_nat_gateways ( region = 'us-east-1' ) : ec2 = boto3 . client ( 'ec2' , region_name = region ) cw = boto3 . client ( 'cloudwatch' , region_name = region ) now = datetime . now ( timezone .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.