class S3TableStorage
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Glue.Alpha.S3TableStorage |
Go | github.com/aws/aws-cdk-go/awscdkgluealpha/v2#S3TableStorage |
Java | software.amazon.awscdk.services.glue.alpha.S3TableStorage |
Python | aws_cdk.aws_glue_alpha.S3TableStorage |
TypeScript (source) | @aws-cdk/aws-glue-alpha ยป S3TableStorage |
Where an 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
declare const myDatabase: glue.Database;
new glue.S3Table(this, 'MyTable', {
storage: glue.S3TableStorage.managedBucket(glue.S3TableEncryption.s3Managed()),
// ...
database: myDatabase,
columns: [{
name: 'col1',
type: glue.Schema.STRING,
}],
dataFormat: glue.DataFormat.JSON,
});
Methods
| Name | Description |
|---|---|
| static from | Store the table's data in an existing bucket. CDK does not manage the bucket's encryption. |
| static managed | Store the table's data in a bucket created and managed by the table. |
static fromBucket(bucket)
public static fromBucket(bucket: IBucket): S3TableStorage
Parameters
- bucket
IBucketโ the bucket that holds the table's data.
Returns
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() or Bucket.fromBucketAttributes(). If that bucket
is KMS-encrypted, import it with Bucket.fromBucketAttributes() and supply
the encryptionKey attribute. Otherwise, CDK has no reference to the key,
which means that S3Table.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.
static managedBucket(encryption?)
public static managedBucket(encryption?: S3TableEncryption): S3TableStorage
Parameters
- encryption
S3โ the server-side encryption for the created bucket.Table Encryption
Returns
Store the table's data in a bucket created and managed by the table.

.NET
Go
Java
Python
TypeScript (