Index: S3Backend.java =================================================================== --- S3Backend.java (revision 1671041) +++ S3Backend.java (working copy) @@ -236,7 +236,7 @@ } return false; } catch (AmazonServiceException e) { - if (e.getStatusCode() == 404) { + if (e.getStatusCode() == 404 || e.getStatusCode() == 403) { LOG.debug("exists [{}]: [false] took [{}] ms.", identifier, (System.currentTimeMillis() - start) ); return false; @@ -279,7 +279,7 @@ } } catch (AmazonServiceException e) { - if (e.getStatusCode() == 404) { + if (e.getStatusCode() == 404 || e.getStatusCode() == 403) { retVal = false; } else { throw new DataStoreException( @@ -443,7 +443,7 @@ (System.currentTimeMillis() - start) }); return lastModified; } catch (AmazonServiceException e) { - if (e.getStatusCode() == 404) { + if (e.getStatusCode() == 404 || e.getStatusCode() == 403) { LOG.info( "getLastModified:Identifier [{}] not found. Took [{}] ms.", identifier, (System.currentTimeMillis() - start)); @@ -613,7 +613,7 @@ try { objectMetaData = s3service.getObjectMetadata(bucket, key); } catch (AmazonServiceException ase) { - if (ase.getStatusCode() != 404) { + if (!(ase.getStatusCode() == 404 || ase.getStatusCode() == 403)) { throw ase; } }