Data transfer price between EC2 and NAT

1

Enter image description here Here is our architecture,

  1. Does NAT data process usage equal to EC2 to/from NAT usage?
  2. If I have a 1 GB request sent from EC2 to internet, then the response size is also 1 GB, I will be charged
    • EC2 inter AZ: 2 GB
    • NAT data processed: 2 GB
    • EC2 transfer out to internet: 1 GB Am I right?
3 Answers
1
Accepted Answer

Hi,

  1. The NAT Gateway data processing charges are based on the total amount of data processed by it. The data could come from many sources, with EC2 being one off.
  2. You're assumptions are all correct, given the fact that the NAT Gateway is in a different AZ than the EC2 instance. If you would provision a NAT Gateway in the same AZ as the instance in the private subnet, you would avoid the cross-AZ charges.
profile picture
EXPERT
answered 6 months ago
profile picture
EXPERT
reviewed 6 months ago
  • Thanks for your answer. I used Logs Insights to analyze the traffic between EC2s and NAT. That traffic usage is greater than NAT data process usage. In my understanding, That traffic should be less than total NAT data process usage. Are there any kinds of traffic go through NAT not being charged by NAT data process?

  • My Logs Insights syntax is """" filter (srcAddr like '10.193.133.' and dstAddr like '10.193.133.231') or (srcAddr like '10.193.133.231' and dstAddr like '10.193.133.') | stats sum(bytes) as bytesTransferred by srcAddr, dstAddr | limit 10000 """ , where NAT IP is 10.193.133.231 and all EC2 are hosted in 10.193.133..

  • Rounding might be an issue depending on the amount of traffic that was processed. Also keep in mind that the charges you see for example in the cost explorer are not in real time. So traffic that occurred today will not be reflected in today's charges

1

your assumption is correct, If you choose to create a NAT gateway in your VPC, you are charged for each “NAT Gateway-hour" that your gateway is provisioned and available. **Data processing charges apply for each gigabyte processed through the NAT gateway regardless of the traffic’s source or destination. for more details you can check below link

https://aws.amazon.com/vpc/pricing/

Sachin
answered 6 months ago
1

hello, good day.

  1. Does NAT data process usage equal to EC2 to/from NAT usage? Yes, Nat would process data sent to/from Ec2, Ec2 is just one of sources. Charges are Nat data processing charges, also bear in mind Nat has hourly charges . Nat Charges.

  2. Yes, based on this scenario. do factor in Nat hourly charges too, and to min inter-az charges provision ec2 and Natgw within same az (could be different subnets as per your arch diagrams).

AWS
EXPERT
Ben Lee
answered 6 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