Amazon is more than just amazon.com. AWS is a behemoth all on its own. While everything about AWS isn't amazing, it does a lot of things well, which is why they are one of the leaders in that space with a dominate market share of 33%. I don't know if Amazon breaks out profits from AWS in their financial reports or not, but I would venture AWS is probably their biggest cash cow. I bet Amazon.com could bleed money year-after-year and AWS alone would still make Amazon one of the most profitable companies.
Source on market share: https://www.parkmycloud.com/blog/aws-vs-azure-vs-google-clou...