> ## Documentation Index
> Fetch the complete documentation index at: https://help.nops.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Idle NAT Gateway

> Delete NAT gateways that have processed no data for 90 days.

A NAT gateway is billed every hour it exists, plus a charge per GB it processes. When no instance sends traffic through it, only the hourly charge remains. nOps finds NAT gateways that have been billed for months without processing any data, and shows their hourly charge as the saving.

| | |
| - | - |
| **Cloud** | AWS |
| **Category** | Networking |
| **Service** | Amazon VPC |
| **Action** | Delete |
| **Effort** | Low |
| **Restart needed** | No |
| **Can be rolled back** | No |
| **Analysis window** | Last 30 days |
| **Source** | nOps |

## Why it matters

NAT gateways are among the more expensive networking resources to leave running, and one is often created per Availability Zone.

## How nOps finds it

nOps reads the last 90 days of billing for each NAT gateway. One is flagged when its hourly charge was billed on at least 85 of those days and in the last 2 days, and it processed zero bytes in the whole 90 days. The saving is the hourly charge billed in the last 30 days, and must be at least \$1.

## Before you start

Permission to delete NAT gateways and release addresses (`ec2:DeleteNatGateway`, `ec2:ReleaseAddress`).

## How to implement

1. Note the NAT gateway's Elastic IP: `aws ec2 describe-nat-gateways --nat-gateway-ids ID`.
2. Find route tables that still point at it (`aws ec2 describe-route-tables --filters Name=route.nat-gateway-id,Values=ID`) and remove or replace those routes.
3. Delete it: **VPC → NAT gateways → Actions → Delete NAT gateway**, or `aws ec2 delete-nat-gateway --nat-gateway-id ID`.
4. Release its Elastic IP afterwards, or it keeps billing as an idle public IPv4 address.
5. Remove it from Terraform or CloudFormation so it is not recreated.

## Risks and considerations

* Routes that still target the deleted NAT gateway become blackhole routes. Fix them first.
* Deletion cannot be undone; a new NAT gateway gets a new ID, and a new IP unless you reuse the Elastic IP.

## FAQs

> [accordion] Do I need to release the Elastic IP too?
>
> Yes. Deleting the NAT gateway does not release its Elastic IP, which then bills as an idle address.

## Related

* [Release Idle Public IPv4 Address](https://help.nops.io/inform/supported-recommendations/release-idle-public-ipv4-address)
* [Delete Idle VPC Endpoint](https://help.nops.io/inform/supported-recommendations/delete-idle-vpc-endpoint)
* [Supported recommendations](https://help.nops.io/inform/supported-recommendations.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.