How to reduce the cost for public IP?

1

Hello team,

From this month, Amazon going to charge for all public IP and Elastic IP which are associated or not. I have checked with below URL.

https://aws.amazon.com/blogs/aws/new-aws-public-ipv4-address-charge-public-ip-insights/

We are running 1000+ ec2 instances with multiple VPC's across multiple regions in AWS account. All instances has public IP address. For example

  1. If EC2 Instances in public subnets with public IPs

1000 EC2 instances - 1000 x 0.005 = 5 USD p/hour (1month x 5 = 3720 USD)

  1. If EC2 instances in private sunbets with NAT gateway

1000 EC2 instances - 1000 x 0 = 0 USD p/hour (Because I dont need public ips) 50 VPC's - Each VPC has one NAT getway, then

730 hours in a month x 0.045 USD = 32.85 USD (Gateway usage hourly cost)

10 GB per month x 0.045 USD = 0.45 USD (NAT Gateway data processing cost)

32.85 USD + 0.45 USD = 33.30 USD (NAT Gateway processing and month hours)

50 NAT Gateways x 33.30 USD = 1,665.00 USD (Total NAT Gateway usage and data processing cost)

one Elastic IP for NAT gateway - 1 month x 0,005 = 3.72 USD

Total NAT Gateway usage and data processing cost (monthly): 1,665.00 USD

Seems, If I go with NAT with private subnets for all my workloads, then it is cheaper than public ip's for my case. Am I right?

If I share the NAT gateway with other VPC's in same the region across account, then it will reduce the cost more. Right?

Is there any way to reduce the public ip cost ? Please correct If I'm wrong!

2 Answers
2
Accepted Answer

You're right. And you can reduce the NAT GW costs by using a shared egress VPC architecture. It would reduce the number of NAT GWs you need (less cost) but also allow you to deploy centralized egress filtering if that is something you would value from security perspective. Thing to keep in mind is that NAT GWs don't have infinite bandwidth, so you should keep an eye on usage.

profile picture
EXPERT
Kallu
answered 3 months ago
profile picture
EXPERT
reviewed a month ago
  • what will happen If I share the NATGateway with the help of Resource Access Manager?

  • NAT GWs can not be shared with RAM. Actually RAM only work with very limited set of resources. Check the documentation for details.

  • Thanks much Kallu. Let me go through the document and finalize which one would be best for me!

1

Check out the blog post Identify and optimize public IPv4 address usage on AWS. It covers the use of NAT gateway and ALB, and provides cost comparison with all public IP, among other items

AWS
EXPERT
Mike_L
answered 3 months ago
profile picture
EXPERT
reviewed 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions