The cost per query difference of cloud versus bare metal, in the article is over ten times. That kind of margin gives a lot of room for error. You could literally over provision by an order of magnitude and come out on top.
There's plenty of hidden costs though of doing this yourself that need a certain level of scale to pay off. Like people to manage the hardware, that's a big one.
Still renting bare metal servers from e.g. Packet could make much more sense even for small companies than using AWS.