When calculating pricing for ECS on https://calculator.aws/#/createCalculator there is a distinction between the pricing of inbound and outbound traffic. I am confused about what the precise difference between those two is.

For instance, let's imagine two roughly identical ec2 instances. They are identical except that they both have a different cronjob on them.

Instance A makes a REST request to a public endpoint every hour and receives a 1 KB payload as a response every time.

Instance B makes a REST request to the same public endpoint every hour with a different parameter and receives a 1 GB download as a response.

The two things I can see happening based on the information provided by Amazon are:

  1. Both get basically the same quantity billed for Outbound Data Transfer but Instance B gets a significantly larger quantity under "Inbound".
  2. Instance B has a high quantity under Outbound Data Transfer because the responses are considered part of the outbound request.

An auxiliary question is this: if the above assumes TCP, will the answer be consistent over UDP?

New contributor
Lord Ratte is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

This is extremely simple. Inbound is traffic that arrives at AWS and outbound is traffic that leaves AWS. Thus the first scenario you pose is correct. There is no possibility that inbound traffic would be counted as outbound as in your second scenario. And the network protocol is irrelevant.

| improve this answer | |
  • Did Amazon share this somewhere? Where did you source the information? – Lord Ratte Nov 22 at 9:09
  • @LordRatte Huh? This doesn't really need sourcing. It's how every network works. – Michael Hampton Nov 22 at 9:10
  • Ok, but I'm not asking about networks in general. The question is about how Amazon treats specific elements of the network. For instance, if I have a security rule that only allows Outbound connections on an instance, it will obviously still allow responses to requests made from within the instance. In that situation, the response payload is treated as part of the outgoing request. – Lord Ratte Nov 22 at 9:15
  • @LordRatte You're asking about network billing, not network firewalling. Again, it's the same everywhere. Amazon's big difference is billing for actual data used rather than 95th percentile. – Michael Hampton Nov 22 at 14:37

What do you do with the 1GB datasets? If you store them somewhere outside the instance / outside of AWS you may be paying for it as outbound traffic.

Also note the traffic between availability zones AND between regions is measured and charged too. Not sure if it applies in your situation.

| improve this answer | |
  • For the purposes of the question, it could be deleted immediately. It's more just a hypothetical situation to explain what my question is exactly. – Lord Ratte Nov 22 at 9:10

Your Answer

Lord Ratte is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.