apache/druid · error · UnsupportedOperationException (UOE)

Cannot delete S3 items anonymously. jetS3t doesn't support…

Error message

Cannot delete S3 items anonymously. jetS3t doesn't support authenticated deletes easily.

What it means

Thrown from the segment puller's StreamResourceView.delete() when removal of S3-backed segment files is attempted through an anonymous S3Client. Deletes require credentials, and this legacy code path intentionally refuses to perform them rather than risk a silent failure or an unauthenticated API misuse.

Solutions

  1. Configure the S3 client with valid AWS credentials so deletes can be authenticated, or remove the anonymous-client configuration.
  2. Perform the deletion out of band with a properly authenticated tool (aws s3 rm, AWS SDK) instead of the Druid puller.
  3. If the delete is unexpected, audit the code path: segment cleanup should normally be handled by the segment deleter/Kill tasks with a fully configured S3 connector.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3DataSegmentPuller.java:280 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07). Data as JSON: /api/errors/0d300f9626c5a974. Report an issue: GitHub.

Appendix: source

Thrown at extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3DataSegmentPuller.java:280

      @Override
      public long getLastModified()
      {
        if (s3InputStream != null) {
          Instant lastModified = s3InputStream.response().lastModified();
          return lastModified != null ? lastModified.toEpochMilli() : 0L;
        }
        if (objectMetadata == null) {
          objectMetadata = S3Utils.getSingleObjectMetadata(s3Client, coords.getBucket(), coords.getPath());
        }
        Instant lastModified = objectMetadata.lastModified();
        return lastModified != null ? lastModified.toEpochMilli() : 0L;
      }

      @Override
      public boolean delete()
      {
        throw new UOE("Cannot delete S3 items anonymously. jetS3t doesn't support authenticated deletes easily.");
      }
    };
  }

  @Override
  public Predicate<Throwable> shouldRetryPredicate()
  {
    return S3Utils.S3RETRY;
  }

  /**
   * Returns the "version" (aka last modified timestamp) of the URI
   *
   * @param uri The URI to check the last timestamp
   * @return The time in ms of the last modification of the URI in String format
   * @throws IOException
   */
  @Override

View on GitHub (pinned to 9b90983fd2)