This is iA the most comprehensive resource for this question on the internet.
We present views from Al Qalam, Islamweb, then our resident expert Mufti Billal Omarjee presents his views, and finally IFG present a commercial perspective on the matter.
View One: Al Qalam
If your query refers to the Fulfilment by Amazon (FBA) arrangement, then Amazon is your agent which takes possession of your inventory on your behalf, stores it and picks, packs and ships it when a purchase is made. Thus, this does not fall under the prohibition of selling something that you do not own or possess.
View Two: Islamweb
If the seller owns the product that he lists on the website, then there is no harm in the mentioned transaction regardless of whether he ships it to the customer through the website or through any other shipping company. There is also no harm in the fees that the website charges for listing the product, or for acting as an agent for the seller in selling the product and receiving the price, or as an agent for the customer in receiving the product and sending it to him, or only to promote the product and list it on its pages while the contract is conducted directly between the customer and the seller. None of this affects the validity of this transaction. Hence, the important factor here is that the seller must own the product that he is listing on the website.
Mufti Billal Omarjee view:
All scholars agree that it is permissible to select an agent who will trade on your behalf. This sort of practise was present in the time of the prophet (pbuh). For example, the Prophet (pbuh) gave to Urwa (ra) a Dinar to buy him a sheep, and he bought two sheep for him, then he sold one of them for a Dinar, and bought a Dinar and a sheep to the Prophet (pbuh) The Messenger of Allah (pbuh) prayed for blessing for him. [Bukhari]
And Allah knows best!
The IFG view:
We agree with the above views. FBA businesses own their products and have to take on significant inventory risk by purchasing assets in bulk beforehand. They unambiguously own their assets and Amazon is merely their agent.
A side note - if you are looking to get into this business, listen to this podcast with a successful FBA Amazon business.