feat(bucket): expose the underlying S3 client through getStorageClient()

This commit is contained in:
2026-04-07 16:28:01 +00:00
parent 3a0cd78dad
commit cf0402cd7a
4 changed files with 32 additions and 1 deletions
+14
View File
@@ -49,6 +49,20 @@ export class Bucket {
this.name = bucketName;
}
/**
* Returns the underlying AWS SDK v3 S3Client for this bucket.
*
* Use this when you need to perform operations smartbucket doesn't
* wrap directly (e.g. lifecycle policies, bucket tagging, multipart
* upload control, object-lock, inventory config, etc.).
*
* The returned client is shared with the parent SmartBucket — do not
* call `.destroy()` on it.
*/
public getStorageClient(): plugins.s3.S3Client {
return this.smartbucketRef.storageClient;
}
/**
* gets the base directory of the bucket
*/