I think that this illustrates the challenge of this debate. I believe that your perspective is that Amazon are there to make money, provide a component and then the person using that is responsible for the outcomes. However I think that the person providing the service is responsible for who they sell it to and what for. The analogy that I would draw here is with guns; if you sell a gun to a child you should be accountable for that as a misdeed. Note - that's an analogy to try to convey the point I am making, I'm not comparing the misdeeds.
In your example though, is Smith and Wesson responsible for the store selling the gun to a child? (In this specific case yes, because they lobby against common sense gun control)
For law enforcement, I assume they wouldn't be hitting the Amazon API directly, but rather using software someone sold them which as part of its service uses Amazon's API.