{"record":{"id":"0d300f9626c5a974","repo":"apache/druid","slug":"cannot-delete-s3-items-anonymously-jets3t-doesn-t","errorCode":null,"errorMessage":"Cannot delete S3 items anonymously. jetS3t doesn't support authenticated deletes easily.","messagePattern":"Cannot delete S3 items anonymously\\. jetS3t doesn't support authenticated deletes easily\\.","errorType":"exception","errorClass":"UnsupportedOperationException (UOE)","httpStatus":null,"severity":"error","filePath":"extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3DataSegmentPuller.java","lineNumber":280,"sourceCode":"\n      @Override\n      public long getLastModified()\n      {\n        if (s3InputStream != null) {\n          Instant lastModified = s3InputStream.response().lastModified();\n          return lastModified != null ? lastModified.toEpochMilli() : 0L;\n        }\n        if (objectMetadata == null) {\n          objectMetadata = S3Utils.getSingleObjectMetadata(s3Client, coords.getBucket(), coords.getPath());\n        }\n        Instant lastModified = objectMetadata.lastModified();\n        return lastModified != null ? lastModified.toEpochMilli() : 0L;\n      }\n\n      @Override\n      public boolean delete()\n      {\n        throw new UOE(\"Cannot delete S3 items anonymously. jetS3t doesn't support authenticated deletes easily.\");\n      }\n    };\n  }\n\n  @Override\n  public Predicate<Throwable> shouldRetryPredicate()\n  {\n    return S3Utils.S3RETRY;\n  }\n\n  /**\n   * Returns the \"version\" (aka last modified timestamp) of the URI\n   *\n   * @param uri The URI to check the last timestamp\n   * @return The time in ms of the last modification of the URI in String format\n   * @throws IOException\n   */\n  @Override","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3DataSegmentPuller.java#L262-L298","documentation":"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.","triggerScenarios":"Thrown at extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3DataSegmentPuller.java:280 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Configure the S3 client with valid AWS credentials so deletes can be authenticated, or remove the anonymous-client configuration.","Perform the deletion out of band with a properly authenticated tool (aws s3 rm, AWS SDK) instead of the Druid puller.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}