public boolean isAmazonS3ErrorCode(String errorCode) {
   if (getCause() instanceof AmazonS3Exception) {
     AmazonS3Exception s3Exception = (AmazonS3Exception) getCause();
     return errorCode.equalsIgnoreCase(s3Exception.getErrorCode());
   }
   return false;
 }