I believe Grid5000 did it before Amazon [1].
It opened in 2005 and allowed users to automatically book hardware (with OAR [2]) and install their own images (with Kadeploy) on dedicated hardware.
[1]: https://www.grid5000.fr/w/History [2]: https://www.grid5000.fr/w/Getting_Started#Reserving_resource...