BucketEncryption

class aws_cdk.aws_s3.BucketEncryption(value)

Bases: enum.Enum

What kind of server-side encryption to apply to this bucket.

ExampleMetadata

infused

Example:

bucket = s3.Bucket(self, "MyEncryptedBucket",
    encryption=s3.BucketEncryption.KMS
)

# you can access the encryption key:
assert(bucket.encryption_key instanceof kms.Key)

Attributes

KMS

Server-side encryption with a KMS key managed by the user.

If encryptionKey is specified, this key will be used, otherwise, one will be defined.

KMS_MANAGED

Server-side KMS encryption with a master key managed by KMS.

S3_MANAGED

Server-side encryption with a master key managed by S3.

UNENCRYPTED

Objects in the bucket are not encrypted.