Leveraging your monopoly to compete in another area is illegal. Leveraging a strong position isn’t and Amazon is a long ways from a monopoly.
In the EU, it is "dominant market position" (and explicitly so) that's the threshold for the Commission to take competition action, for instance.
(not trying to argue they aren't dominant. just curious)
British Airways only had a 38% market share when they were sued for abusing their dominant market position in 1998 (which was upheld by the Court of Justice in 2007)
That really depends on interpretation, which has shifted over time and continues to shift. IIRC, recent interpretations of some types of anti-competitive behavior have been rather literal and required something very close to a literal monopoly, which has had the effect of neutering antitrust law in all but the most blatant of cases.
My understanding is that it's arguable that it's anti-competitive to leverage market share advantages more broadly (e.g. antitrust law could be used to constrain/break-up a duopoly).
And while there are probably some services on AWS you can’t find at a competitor - that’s mostly a choice (aka profit margin) made by the competitor.
Open source works fine, and does quite well as a business model (use it as free advertising).
What has happened here is a plain old case of monopoly.
Once markets are no longer efficient, the model breaks down. Amazon can use its resources to extinguish competition with their own product.
This is why we need antitrust law.
It's not a failure of capitalism, its not a failure of the businesses involved its just what happens when you run a freeish market. That is, things get out of whack to the point we the people feel it is unjust, it would eventually right itself but this would take a long time and likely do more interim damage than its work allowing, so we fiddle with it, hopefully not breaking anything in the process.
If we think of the system as a delicate natural balance that we should try our best not to disturb too much I think we've immediately taken a very specific stance which itself shouldn't be above critical examination. It is, after all, just a social system and all social systems involve some level of design whether we like that fact or not.
In theory, we could conceive of the possibility of an economic system that both preserves the autonomy and independence of its actors while also preventing monopolies from emerging in the first place. Its a hard problem to wrestle with but its preferable to acquiescing to the blind faith in the invisible hand. We should never give up on an effort to understand how we could evolve our current systems into ones that work better (imagine if we took the same stance with technology).
I'm not sure if it's actually a gray area, since I'm pretty sure leveraging your market dominance in one area to compete in another is illegal anti-competitive behavior. Isn't that what the whole Microsoft antitrust case was about? It's too bad the government pretty much gave up on enforcing antitrust law for 20 years, since it feels like similar practices became normalized due to lack of enforcement.