by fabian2k · 2y ago · 0 comments
- A client sends range requests and cancels them quickly.
- The full range request data will be billed (NOT the whole file), so I think this should read that the entire requested range gets billed, even if it never gets transferred (the explanation we received for this is that it's due to some internal buffering S3 is doing, and they do count this as egress).
In any case, if you send and cancel such requests quickly (which is easy enough, this was not even an adversarial situation, just a bug in some client API code) the egress cost is many times higher than your theoretical bandwidth (and about 80x higher than in the AWS documentation, hence the blogpost).
AWS user believes that testing on a 1Gbps connection for 45 min can't be more than $10 of egress.
Gets a $500 bill instead.
Note: This user specified a lower range but not an upper range on the request (and closed the connection prematurely). Essentially read() with an offset, for a ZIP tool.
Like, charging for requests or internal data processing, sure okay.
But this is a charge specifically for the data transferred from AWS to the internet. So if you're not transferring data to the internet....
> Amazon S3 attempts to stop the streaming of data, but it does not happen instantaneously.
...which doesn't really explain it. It shouldn't send more than a TCP window after the connection is closed, and TCP windows are at most 1 GiB [1], usually much less, so this completely fails to explain the article's observed 3 TB sent vs 130 TB billed.
The article goes on to say:
> Okay, this is half the explanation. AWS customers are not billed for the data actually transferred to the Internet but instead for some amount of data that is cached internally.
In other words, how much they bill really isn't bounded by how much is sent at all. This is unacceptable.