Create a new S3 connector.
The underlying S3Client is not created until the first read
operation, so construction is synchronous and never throws.
S3 client configuration. See S3ConnectorOptions.
Destroy the underlying S3Client and release its HTTP connection pool.
After calling this method, the connector must not be used for further
reads. Calling close() on an already-closed connector is a safe no-op.
Resolves when the client has been destroyed.
Read a contiguous byte range from an S3 object using a GetObject
request with a Range: bytes=offset-(offset+length-1) header.
The S3 client is lazily initialized on the first call.
S3 path in s3://bucket/key or bucket/key format.
Zero-based byte offset to begin reading from.
Number of bytes to read.
The requested byte range.
Read multiple byte ranges from the same S3 object.
Each range is fetched as a separate GetObject call with a Range
header. Calls are dispatched through a worker pool limited to
S3ConnectorOptions.maxConcurrency concurrent requests.
Results are returned in the same order as the input ranges.
S3 path in s3://bucket/key or bucket/key format.
Array of { offset, length } byte-range descriptors.
Array of Uint8Array chunks in the same order as the input ranges.
Returns an empty array when ranges is empty.
S3 connector using AWS SDK v3 (
@aws-sdk/client-s3).The SDK is a peer dependency -- it is only required at runtime if this connector is instantiated. Byte-range reads use
GetObjectwith an HTTPRangeheader, identical to how the AWS CLI performs partial downloads.The S3 client is created lazily on the first read and reused for all subsequent requests. Call S3Connector.close to destroy the client and release its underlying HTTP connection pool.
Example
Example: Using with an S3-compatible store (MinIO)