A little bit of cleanup

* Use code attribute on AWSError object
* Use format for strings
* Misc cleanup