- Newest
- Most votes
- Most comments
When you create an AWS NAT Gateway, an Elastic IP (EIP) is mandatory and is automatically associated with it. This Elastic IP provides a fixed public IPv4 address that allows resources in private subnets to access the internet.
In the AWS Pricing Calculator, the Elastic IP cost is not included in the NAT Gateway hourly charge. Under the current AWS pricing model, all public IPv4 addresses are billed, including Elastic IPs that are actively in use and attached to services such as NAT Gateways.
When using a NAT Gateway, you are charged for:
The hourly cost of the NAT Gateway
Data processing charges for traffic flowing through the NAT Gateway
A separate hourly charge for the associated Elastic IP (public IPv4 address)
Elastic IP charges apply whether the IP address is actively used or not. This means that an Elastic IP attached to a running NAT Gateway is still billable. Additionally, if a NAT Gateway is deleted and the Elastic IP is not released, the Elastic IP will continue to incur charges.
In high-availability setups where you deploy multiple NAT Gateways (for example, one per Availability Zone), each NAT Gateway requires its own Elastic IP, and each of those Elastic IPs is billed separately.
In summary, when estimating costs in the AWS Pricing Calculator, you should include:
NAT Gateway hourly charges
NAT Gateway data processing charges
Public IPv4 / Elastic IP charges
Not accounting for the Elastic IP cost can lead to underestimating the total cost of running a NAT Gateway.
When you create a NAT Gateway in AWS, an Elastic IP (EIP) is indeed automatically associated with it. This is necessary because the NAT Gateway needs a static public IP address to allow instances in private subnets to communicate with the internet.
Regarding the AWS Pricing Calculator and cost structure:
-
The hourly cost of a NAT Gateway does not include the cost of the associated Elastic IP. These are billed as separate line items.
-
However, there is no additional charge for the Elastic IP when it's associated with a running NAT Gateway. AWS only charges for Elastic IPs that are not associated with running instances or are associated with stopped instances.
-
The primary costs for NAT Gateways are:
- An hourly charge for each hour the NAT Gateway is provisioned and available
- Data processing charges for each gigabyte of data processed through the NAT Gateway
There are scenarios where additional EIP costs could apply when using NAT Gateways:
-
If you allocate an EIP but don't immediately associate it with a NAT Gateway, you'll be charged for the unassociated EIP.
-
If you delete a NAT Gateway but forget to release its associated EIP, you'll be charged for the now-unassociated EIP.
-
If you have multiple NAT Gateways (for example, one per Availability Zone for high availability), each will require its own EIP, but as long as they're associated with running NAT Gateways, there won't be additional EIP charges.
When using the AWS Pricing Calculator, you should focus on the NAT Gateway hourly and data processing charges, as the EIP cost is effectively included as long as the NAT Gateway is running.
Sources
Billing NAT Gateway | AWS re:Post
Is there no longer a remapping cost for Elastic IPs? | AWS re:Post
how to provide static ip address for external system to whitelist my ec2 in private subnet ip address in aws? | AWS re:Post
Amazon VPC Pricing
Bill on NAT gateways | AWS re:Post
answered 8 months ago
I believe the 2 answers are incorrect. That’s how it used to be before AWS started charging for a public IPs back in FEB last year. All public IPV4 addresses are now chargeable whether in use or not.
There is a charge for all Elastic IP addresses whether they are in use (allocated to a resource, like an EC2 instance) or idle (created in your account but unallocated).
AWS charges for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab on the Amazon VPC pricing page
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#eip-pricing
Relevant content
asked 2 years ago
asked 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 9 months ago
