S3TableStorage
- class aws_cdk.aws_glue_alpha.S3TableStorage(*args: Any, **kwargs)
Bases:
object(experimental) Where an
S3Tablestores 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.
- Stability:
experimental
- ExampleMetadata:
infused
Example:
# my_database: glue.Database glue.S3Table(self, "MyTable", storage=glue.S3TableStorage.managed_bucket(glue.S3TableEncryption.s3_managed()), # ... database=my_database, columns=[glue.Column( name="col1", type=glue.Schema.STRING )], data_format=glue.DataFormat.JSON )
Static Methods
- classmethod from_bucket(bucket)
(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 (
IBucket) – the bucket that holds the table’s data.- Stability:
experimental
- Return type:
- classmethod managed_bucket(encryption=None)
(experimental) Store the table’s data in a bucket created and managed by the table.
- Parameters:
encryption (
Optional[S3TableEncryption]) – the server-side encryption for the created bucket.- Default:
S3-managed (SSE-S3) encryption
- Stability:
experimental
- Return type: