Define S3 errors as exceptions

This is much more pythonic way to handle errors.

Change-Id: I336e129aad67e3c44b5d89e29debf28148a359e3