terraform-modules icon indicating copy to clipboard operation
terraform-modules copied to clipboard

Add alarms for NAT Gateway when BytesOutToDestination is large

Open maxneuvians opened this issue 1 year ago • 0 comments

A legitimate attack vector consists of causing our applications to produce large payload responses that generate egress charges. Currently NAT Gateways in ca-central charge $0.05 per GB egressed. 1TB costs $50. Constantly generating that much traffic would accumulate costs over time. A simple solution is to package the VPC module with an alarm that measures the total BytesOutToDestination for the NAT in a 24 hour period and alerts if it goes over a reasonable amount (ex. 1 TB).

maxneuvians avatar Dec 07 '23 20:12 maxneuvians