No, long before AWS, Amazon intentionally re-invested all of the excess revenue that would be reported as profit back into the business instead (expanding capex and opex).
I thought aws sprung out of investment in their own infrastructure. A happy accident of sorts, not some preplanned mammoth investment in building AWS from the ground up
AWS, or rather S3 was a pet project of one of the very early Amazon employees who wanted to do something fun. It wasn't really taken seriously or had deep strategy at first. Once it's started to gain traction, Bezos realized the enormous potential and full-steamed-ahead AWS.
Then it took many years for Amazon retail to actually start using AWS products in any meaningful way.
> AWS revenue came accounted for 13% of Amazon’s total revenue. Of Amazon’s total $3.1 billion in operating income, 52% came from AWS. [0]
[0] https://www.cnbc.com/2019/07/25/aws-earnings-q2-2019.html