# S3TableEncryption

Server-side encryption for the S3 bucket that a managed `S3Table` creates.

Applies only when the table manages its own bucket (via
`S3TableStorage.managedBucket`). An existing bucket keeps whatever encryption
it was created with.

- Source: [`aws-glue/lib/s3-table.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-glue/lib/s3-table.ts#L21)
- Type last changed: v2.270.0 · 17 Sep 2026

## Example

```ts
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

- `kms(key?: IKey): S3TableEncryption // chainable` (static) — Server-side encryption (SSE-KMS) with an AWS KMS key managed by the account owner.

  **Parameters**

  - `key` — the KMS key used to encrypt the data.

- `kmsManaged(): S3TableEncryption // chainable` (static) — Server-side encryption (SSE-KMS) with an AWS KMS key managed by the KMS service.

- `s3Managed(): S3TableEncryption // chainable` (static) — Server-side encryption (SSE-S3) with an Amazon S3-managed key.
