I think the scaling problem MySpace faced (and social sites in general face) was somewhat different than the sites you mention. Every page is dynamic, and requires real time updates. You could probably cache an amazon product page for a week. Also, the information on a page in a social network in much less siloed than a product page on amazon, or an auction on ebay. You are pulling in user information from across your base. So it doesn't lend itself as easily to a basic shard and cache model.
In general they were solved similarly - build custom middleware and go as distributed as possible.
Now I realize that's a simplistic answer to a very complicated problem but really guys, this isn't unprecedented and the hardware is a lot more capable and cheaper than the 1997 equivalents.