A friend of mine was in management at a large company trying to build up infra to compete with AWS 10-15 years ago (they started this effort when AWS was only S3). This company was bringing in billions a year operating dedicated off-site data centers for other companies, and they saw that AWS was a major threat to their business model. They dumped many, many millions of dollars into building up their infra.
When they gave up, they concluded that AWS's core advantage was their optimization of the electricity needed for cooling. Given that my friend's company failed to design their systems to heavily optimize for this, the cost of electricity for cooling alone didn't let them get near AWS prices without incurring significant losses. He said that if they did it again, every part of the product would have a strict heat budget.