Both Amazon and eBay has some plus and minus. It is up to you to trust a seller before making a deal with him/her. Some of the tips to buy a phone from Amazon or eBay is to check the seller's feedback. If he/she has a feedback of above 90% then it would be a chance for safe deal. Always try to buy a network locked mobile phone and unlock it yourself safer. Some people sell temporary unlocked phone or devices unlocked with unsafe unlocking methods. Such things would always be a hassle after purchase. So it is safe to buy a network locked mobile and unlock it safer and easier using unlock code. You can get the unlock code for a mobile phone from http://www.superunlockcodes.com/ at affordable cost with easy unlocking guide. Good luck.
I'd say Amazon. On eBay, you get a lot of sellers that sell rip-offs or phones with problems, sometimes the sellers don't really understand the hardware and will report things different. My boyfriend bought some iPods there but it turns out they had different problems then the one the seller reported. Amazon, is more trusted for electronics unless you are buying from the sellers on Amazon as opposed to the actual Amazon.
I recently got a phone from eBay and the seller's description said that it was in great condition and that they were only selling it because they got a new one. That was a total lie and a waste of money so I wouldn't go with that.
Amazon since it's more secure :D