Skip to main content

Use Case for AWS NAT Gateway Usage

  1. Configure AWS NAT Gateway Usage
  2. Use Case for AWS NAT Gateway Usage
  3. Triage Guides by Violation Type
    1. Triage AWS NAT Gateway Usage NATGATEWAY_NOT_AVAILABLE
    2. Triage AWS NAT Gateway Usage NATGATEWAY_UNUSED

AWS NAT Gateway Usage Policy

Introduction

This policy is designed to identify unused AWS NAT Gateways to help manage and reduce unnecessary costs. NAT Gateways incur costs on an hourly basis whether they are in use or not. By identifying and decommissioning unused NAT Gateways, organizations can minimize wastage and improve cost efficiency.

Why Use This Policy?

Pros

  • Cost Efficiency: Reduce charges by ensuring unused NAT Gateways are identified and can be decommissioned.
  • Resource Management: Helps in managing and maintaining active resources, keeping your AWS environment clean and efficient.
  • Automated Monitoring: Continuously monitors NAT Gateway usage to ensure resources are in active use.

Cons

  • False Positives: There can be instances where NAT Gateways may appear unused but are part of an intermittent or on-demand workflow.

How the Policy Works

The policy operates by checking two main aspects of each NAT Gateway:

  1. State of the NAT Gateway: Only gateways that are in the available state are considered for monitoring.

  2. Usage Metrics: The average data outbound (BytesOutToDestination) over the last hour is measured.

Vars and Default Values

  • monitoringPeriod: Defines the period over which the usage metrics are observed. The default is set to 1 hour represented as 3600 seconds.

Violation Types

  • NATGATEWAY_NOT_AVAILABLE: The gateway is not in the available state.
  • NATGATEWAY_UNUSED: The gateway is in the available state but has an average outbound data rate of zero.

Conclusion

Using this policy, administrators can effectively monitor and ensure that unused NAT Gateways are identified promptly, thus optimizing costs and maintaining an efficient AWS environment.