S3

object S3

Used to set configuration options for an S3 Object Store, which can be used as implementation of objectStore within a xtdb.api.storage.Storage.RemoteStorageFactory.

Requires at least bucket and an snsTopicArn to be provided - these will need to be accessible to whichever authentication credentials you use. Authentication is handled via the Default AWS Credential Provider Chain. See the AWS documentation on the various methods which you can handle authentication to be able to make use of the operations inside the modules.

For more info on setting up the necessary infrastructure on AWS to be able to use S3 as an XTDB object store, see the section on infrastructure & setting up the AWS Cloudformation Stack within our S3 Module Reference.

Example usage, as part of a node config:

Xtdb.openNode {
remoteStorage(
objectStore = s3(bucket = "xtdb-bucket", snsTopicArn = "example-arn") {
prefix = Path.of("my/custom/prefix")
},
localDiskCache = Paths.get("test-path")
),
...
}

Types

Link copied to clipboard
@Serializable
@SerialName(value = "!S3")
data class Factory(val bucket: String, val snsTopicArn: String, var prefix: Path? = null, var s3Configurator: S3Configurator = DefaultS3Configurator) : ObjectStoreFactory

Functions

Link copied to clipboard
fun s3(bucket: String, snsTopicArn: String): S3.Factory

fun s3(bucket: String, snsTopicArn: String, configure: S3.Factory.() -> Unit = {}): S3.Factory

Used to set configuration options for an S3 Object Store, which can be used as implementation of objectStore within a xtdb.api.storage.Storage.RemoteStorageFactory.