Can I buy an iPhone 5 off Amazon?

I have an iPhone 4, but it's cracked and I want to buy an iPhone 5 or 5s, but I don't want to have to wait another year for my contract to expire, or pay 700 dollars for it. If I buy one off of Amazon or Ebay can I just replace the sim card into the new phone and have it work?
Or would I have to buy it and then take it down to AT&T to have them activate it?

I'm pretty sure you'd have to take it to AT&T and have them activate it. Hey I know how you feel, I have an iPhone 4 and there's still another year left on my contract.

The iPhones on Amazon are actually more expensive than the phones in, like, Best Buy or something.