I don't think this is very true, they are just very good at turning around and selling the internal tech.
The underlying technology for AWS was developed internally and it was not customer facing at first.
Similarly if you look at their internal data platforms, they have invested heavily even though it's not customer facing (yet, because eventually they will start selling services inspired by the internal systems via AWS).
I remember watching a presentation on how they invested large amounts of money into prototyping FC robotics technologies.
If you look at AWS Kinesis or EventBridge, the technologies were developed for internal usage before they were sold. There is also considerable investment into distributed consensus technologies that hasn't been turned directly into products (yet).
You're kind of right in that Amazon doesn't spend much time working on greenfield projects that don't have any forseeable business value (in contrast to say Google), but that is in many way a product of their organizational structure where two-pizza teams are supposed to do 'research' as part of their product work rather than having a pure R&D division.