Class S3TableStorage
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
S3Table stores its data.
The two paths are mutually exclusive: a managed bucket may specify its server-side encryption, while an existing bucket keeps its own encryption — so an encryption choice can never be paired with a bring-your-own bucket.
Example:
Database myDatabase;
S3Table.Builder.create(this, "MyTable")
.storage(S3TableStorage.managedBucket(S3TableEncryption.s3Managed()))
// ...
.database(myDatabase)
.columns(List.of(Column.builder()
.name("col1")
.type(Schema.STRING)
.build()))
.dataFormat(DataFormat.JSON)
.build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedS3TableStorage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedS3TableStorage(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic S3TableStoragefromBucket(IBucket bucket) (experimental) Store the table's data in an existing bucket.static S3TableStorage(experimental) Store the table's data in a bucket created and managed by the table.static S3TableStoragemanagedBucket(S3TableEncryption encryption) (experimental) Store the table's data in a bucket created and managed by the table.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
S3TableStorage
protected S3TableStorage(software.amazon.jsii.JsiiObjectRef objRef) -
S3TableStorage
protected S3TableStorage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
fromBucket
(experimental) Store the table's data in an existing bucket. CDK does not manage the bucket's encryption.The bucket can be one you don't own, imported with
Bucket.fromBucketArn()orBucket.fromBucketAttributes(). If that bucket is KMS-encrypted, import it withBucket.fromBucketAttributes()and supply theencryptionKeyattribute. Otherwise, CDK has no reference to the key, which means thatS3Table.grantRead()/grantWrite()will correctly grant S3 access but silently skip the KMS permissions on the key. As a consequence, at runtime, reads and writes will fail with access denied on the key.- Parameters:
bucket- the bucket that holds the table's data. This parameter is required.
-
managedBucket
@Stability(Experimental) @NotNull public static S3TableStorage managedBucket(@Nullable S3TableEncryption encryption) (experimental) Store the table's data in a bucket created and managed by the table.Default: - S3-managed (SSE-S3) encryption
- Parameters:
encryption- the server-side encryption for the created bucket.
-
managedBucket
(experimental) Store the table's data in a bucket created and managed by the table.Default: - S3-managed (SSE-S3) encryption
-