News for hackers. Stuff that matters.
Re:The AWS S3 Denial of Wallet Amplification Attack by belter on Wednesday May 01, 2024 @04:13PM (#40228748)
Re:The AWS S3 Denial of Wallet Amplification Attack by paulddraper on Wednesday May 01, 2024 @04:18PM (#40228807)
tl;dr

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.

See also: https://news.ycombinator.com/item?id=40205213

Re:The AWS S3 Denial of Wallet Amplification Attack by fabian2k on Wednesday May 01, 2024 @04:28PM (#40228935)
There is probably a small area where it's difficult to measure, so I would not expect billing to be exact to the byte here. But billing for the requested range if not the entire range was actually transferred is just not correct and not acceptable.
Re:The AWS S3 Denial of Wallet Amplification Attack by paulddraper on Wednesday May 01, 2024 @05:15PM (#40229537)
Certainly if you are charging for internet egress.

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....

Re:The AWS S3 Denial of Wallet Amplification Attack by fabian2k on Wednesday May 01, 2024 @05:19PM (#40229608)
The part where I think there is some flexibility is about the difference between "bytes attempted to transfer" and "bytes actually transferred". I think it is pretty fair to bill for the former, as long as you abort requests in a reasonable way. So I don't expect it to be billed exactly by the transferred byte, but I do expect it to not go above that higher than whatever the chunk size for transferring is.
Re:The AWS S3 Denial of Wallet Amplification Attack by klabb3 on Wednesday May 01, 2024 @06:25PM (#40230362)
That’s an orthogonal issue. There’s no interpretation of “egress” that means “stuff we do internally before leaving aws data centers”. If the tcp conn is reset only a few MB would leave aws frontend servers. Instead, it appears they’ve been basing the number off the range in the request and/or whatever internal caching/loading they’re doing within S3, which again has nothing to do with egress.

I mean, we already know egress is short for egregious. It’s an incredibly bad look to be overestimating the “fuck you” part of the bill.

Re:The AWS S3 Denial of Wallet Amplification Attack by paulddraper on Wednesday May 01, 2024 @06:17PM (#40230283)
Sure. In this case specifically AWS is attempting to transfer 70Gbps through a 1Gbps pipe. Not a rounding error.
Re:The AWS S3 Denial of Wallet Amplification Attack by yonixwm on Wednesday May 01, 2024 @04:25PM (#40228889)
So I guess the attack of the OP is a case AWS calculate price based on the unbounded request header and not on the actual egress
Re:The AWS S3 Denial of Wallet Amplification Attack by scottlamb on Wednesday May 01, 2024 @04:35PM (#40229030)
More or less. The article quotes AWS as saying the following:

> 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.

[1] https://en.wikipedia.org/wiki/TCP_window_scale_option

Re:The AWS S3 Denial of Wallet Amplification Attack by easton on Wednesday May 01, 2024 @04:49PM (#40229223)
> this completely fails to explain the article's observed 3 TB sent vs 130 TB billed

I interpreted that to be that their code was doing this over and over again, so in total they retrieved 3TB over a set of requests. Still horrifying, but mildly more explainable.

Re:The AWS S3 Denial of Wallet Amplification Attack by scottlamb on Wednesday May 01, 2024 @09:54PM (#40231940)
Even so, TCP windows generally don't start at the maximum size, so I'm really not buying that ratio of bytes ACKed to sent.

One could disprove this explanation with a packet capture; just add the remaining window.

Re:The AWS S3 Denial of Wallet Amplification Attack by slt2021 on Wednesday May 01, 2024 @05:53PM (#40229995)
this can be explained that this may be not egress out of AWS, but egress out of S3 system itself.

S3 is a block storage, so retrieving an object for such a high availability and high perf service means it tries to pull some X block of data and cache it before sending through the socket.

That X block of data is out of internal S3 storage, just not sent through the bigger Internet egress subsystem.

So technically aws may argue this is egress for s3, just not for aws

Re:The AWS S3 Denial of Wallet Amplification Attack by jpambrun on Wednesday May 01, 2024 @08:04PM (#40231189)
The consequence of your interpretation is that surprise billing is not even bounded by the physical limitations. This is absolutely not reasonable. I am the user with in the zip case. I knew this testing would incur a cost, but I could imagine it could be 20x my network speed and I have absolutely no control over what AWS claims to meter.
Re:The AWS S3 Denial of Wallet Amplification Attack by vermilingua on Wednesday May 01, 2024 @05:58PM (#40230048)
Then subsequent requests that hit the cache shouldn’t be charged by that logic.
Re:The AWS S3 Denial of Wallet Amplification Attack by slt2021 on Wednesday May 01, 2024 @06:04PM (#40230114)
s3 is a complex system, you could be hitting a different node with subsequent requests where this cache entry does not exist yet.

if you think egress is expensive, well storing data in RAM for cache purposes is 1000000x more expensive

a lot of stuff could be happening. Main problem is AWS (i think) is charging for egress out of S3 system, but customers are looking at their ingress at client side and there is mismatch

Re:The AWS S3 Denial of Wallet Amplification Attack by jpambrun on Wednesday May 01, 2024 @08:07PM (#40231208)
But you are not charged if it's not Internet egress, which makes your argument about compute/ram cost moot.
Re:The AWS S3 Denial of Wallet Amplification Attack by yencabulator on Thursday May 02, 2024 @04:18PM (#40240942)
If they charged for the extents that are actually read from S3 (even if the network connection was just closed), that'd be fine. But charging for terabytes when the actual connection consumed a few kilobytes is still wrong; surely they didn't e.g. buffer those terabytes of data from S3 disk storage into memory.

Charge for the buffer you fill: sure.

Charge the theoretical maximum: silly.

Re:The AWS S3 Denial of Wallet Amplification Attack by paulddraper on Wednesday May 01, 2024 @06:20PM (#40230311)
> AWS customers are not billed for the data actually transferred to the Internet but instead for some amount of data that is cached internally.

But egress fees only apply to S3 transfers outside AWS?

So which is it? Data transferred to the Internet? Or data processed internally?

Re:The AWS S3 Denial of Wallet Amplification Attack by scottlamb on Wednesday May 01, 2024 @09:56PM (#40231954)
Obviously they break the problem down into questions like "what's the maximum that could be transferred between any two components? what's the most expensive components this transits?" and pick the most expensive answers without any attempt at coherence.

Right now some class action lawyer is drooling.