Catching exceptions from AWS