IaaS vs. PaaS
AWS is more of an IaaS offering while Azure is a PaaS service. However, that doesn't mean they strictly operate as one or the other. For example, AWS' Elastic Beanstalk deploys your application to AWS quickly and easily by merely uploading it. AWS handles the rest, in true PaaS form. That's why it's hard to say they act as one or the other. Let's just say that AWS acts mostly as IaaS, while Azure is more like PaaS.
Consideration #1: A Future Switch Away From AWS
If you’re writing AWS-specific code, you may want to think twice. If you switch cloud-hosting providers down the road, AWS code won’t work. That means you will have to rewrite everything. You can’t avoid the code altogether either, since that wouldn’t be taking advantage of the services. In short: think long and hard, since you will be the one rewriting code if you make a switch.
Consideration #2: AWS Standardization
On the other hand, there is the possibility other cloud hosting services could begin adopting some of AWS' standards. An example: If you search through Google's cloud storage page, you see that the XML and call are shared by AWS. Google is actually working to implement AWS' API. Another example: Eucalyptus says its API is also compatible with AWS' API. A few companies are working to become compatible with Amazon's API, although some experts aren't sure how successful they'll be. After all, there are many cloud hosting providers out there, and many different “standards.” So although you might think you're out of the water in terms of re-coding if there was ever a provider switch down the road, you might still be stuck, although there will be a handful of vendors that allow you to use the code you already have.
Consideration #3: Just As Stuck With Azure
Yes, it's true: Azure relies on its own API too, one that is unique to its service. So even if you choose Azure, you're locked in or you're recoding. At least Azure's API is just as easy.
So if you're locked in to both or stuck recoding, is there one that's better than the other? In terms of future compatibility, AWS is the winner there, with other services compatible with their APIs. A Google search will also return a host of open-source APIs that are supposedly compatible with a wide range of cloud services. At the end of the day, the best thing that could happen is more of these open-source APIs are created that can work on multiple cloud platforms.
In terms of programmability, both Azure and AWS are comparable. They are both simple to use and work pretty much the same. If being locked in to one service or the other isn't an issue, then go ahead with whichever you feel most comfortable signing on with. But, I recommend choosing one over the other very carefully, so that you can be sure you go with the right provider.
Do you use either of these services? Have you had to rewrite code due to a switch?