Can I get an amazon iphone 3gs unlocked?

So, I'm looking to get an iphone 3gs to use on T-Mobile. Amazon has a wonderful selection. However, most of them are locked to AT&T. If I buy an Iphone 3GS off Amazon, would there be any trouble getting AT&T to unlock the phone for me?

ATT probably will not unlock it for you since you are not the original owner. Typical policy. They don't get into third party transactions that are sticky, Apple doesn't either. They don't care. You'll have to purchase a software Unlocker and attempt it that way. They vary in price and make sure you find a legit one that doesn't just rip you off. Good ones are out there. It needs to be able to unlock the iOS not necessarily the model. Best luck.