Even if you buy it from Amazon, focus on the third party seller that shows there on the right side next to "sold by". There are multiple sellers in Amazon's "renewed" store which are scammers, others are good.
I prefer buying my refurb iPhones from backmarket.com. I've had a bit better luck there, but with refurbs it's always a coin flip.