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!

已提问 3 个月前589 查看次数
2 回答
2
已接受的回答

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
专家
Kallu
已回答 3 个月前
profile picture
专家
已审核 2 个月前
  • 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
专家
Mike_L
已回答 3 个月前
profile picture
专家
已审核 3 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则