Yes, this is true. When I first heard about AWS I assumed Amazon was selling excess capacity (because why would an online retailer set out to build something like this?), but in fact, as you say, it was a completely separate project. I've heard from people who used to work at Amazon that they don't use AWS for much there.
I tend to think we use it quite a lot internally. For instance every amazon.com web server has been running on AWS for quite a while now. You'll find more info here.
It should have been obvious for everyone right away that either Amazon was not selling excess capacity or depending on AWS would have been a very bad idea.
If Amazon was selling excess capacity, care to guess what would have happened to peoples services come the christmas rush, or any other crunch time for Amazon?
AWS have always been expensive for capacity you need most of the time compared to renting dedicated capacity elsewhere, as you're not only paying for the capacity, but for enough excess capacity for Amazon not to run into the PR disaster of not being able to handle requests for new instances.
The numbers and plain logic just never matched the perception of Amazon selling excess capacity.
The most amazing thing about AWS was how Amazon managed to get people to see it as the most amazing thing to ever happen for hosting and create the perception that you somehow paid for less, when for most typical web hosting scenarios you pay more for a service that is pretty much promised to be less reliable.
(Note that I use EC2 for some things - it has it's uses, and is a good product, but it was way overhyped)