AWS was first to market for many years, and their margins were always higher than ecommerce retail (and that's easy to believe, since retail often runs on 1% margins)
AWS was basically built as an internal product to support the retail business, and then they realized that they can sell it.
There's been several articles posted here over the years from people that worked at Amazon at the time saying this is just a myth.
Yes, hence the "MAWS" (Move to AWS) initiative to actually make retail services run on AWS (took many years).