} catch (AmazonServiceException e) {
int statusCode = 400;
if (e instanceof InternalServerErrorException) {
statusCode = 500;
}
ResponseEntity responseEntity = new ResponseEntity<String>(new AmazonServiceExceptionMarshaller().marshall(e), new HttpHeaders(), HttpStatus.valueOf(statusCode));
return responseEntity;
}
}