At the end of the day offering an OSS license becomes less viable when it seems like major players aren’t playing fairly.
It's quite possible that because both companies target developers, architects, etc who're more than able to distinguish between the two companies' offerings... that Elastic's lawsuits didn't go anywhere
Your allowed to sell Apple Macs and advertise them as "Bob's Apple Mac store" without paying any royalties to Apple.
Similarly, Amazon can deploy the open-source ElasticSearch product, and deploy it, unaltered using the trademark.
I don't think you can name your store "Bob Apple Mac Store". You can advertise that you can buy an Apple Mac at "Bob's Computer Store".
This situation is a very fine line between the technicalities that the trademark law was written for. Amazon knows this, and they have the money to set legal precedent in court to have it their way. And so stomping on Elastic's trademark is the route they chose to further benefit from that company's reputation.
Either Elastic's code used by Amazon is indeed stolen proprietary code and no licensing change is needed to obtain reparation, or Amazon is making lawful use of FOSS source code and the question boils down to "if I publish code under a FOSS license, can anybody use it?", to which the answer is obviously yes. And if you'd prefer it to be "no" then don't publish FOSS.
Regarding the trademark, this indeed seems (to my non-lawyer eyes) to be an infringement (or extremely borderline at the very least) but isn't related to licensing.