Skip to content
v2.277.0

BucketEncryption Enum ​

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

Example ​

ts
declare const application: appconfig.Application;

const bucket = new s3.Bucket(this, 'MyBucket', {
  versioned: true,
  encryption: s3.BucketEncryption.KMS,
});

new appconfig.SourcedConfiguration(this, 'MySourcedConfiguration', {
  application,
  location: appconfig.ConfigurationSource.fromBucket(bucket, 'path/to/file.json'),
});
python
# application: appconfig.Application


bucket = s3.Bucket(self, "MyBucket",
    versioned=True,
    encryption=s3.BucketEncryption.KMS
)

appconfig.SourcedConfiguration(self, "MySourcedConfiguration",
    application=application,
    location=appconfig.ConfigurationSource.from_bucket(bucket, "path/to/file.json")
)
java
Application application;


Bucket bucket = Bucket.Builder.create(this, "MyBucket")
        .versioned(true)
        .encryption(BucketEncryption.KMS)
        .build();

SourcedConfiguration.Builder.create(this, "MySourcedConfiguration")
        .application(application)
        .location(ConfigurationSource.fromBucket(bucket, "path/to/file.json"))
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
Application application;


var bucket = new Bucket(this, "MyBucket", new BucketProps {
    Versioned = true,
    Encryption = BucketEncryption.KMS
});

new SourcedConfiguration(this, "MySourcedConfiguration", new SourcedConfigurationProps {
    Application = application,
    Location = ConfigurationSource.FromBucket(bucket, "path/to/file.json")
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var application Application


bucket := s3.NewBucket(this, jsii.String("MyBucket"), &BucketProps{
	Versioned: jsii.Boolean(true),
	Encryption: s3.BucketEncryption_KMS,
})

appconfig.NewSourcedConfiguration(this, jsii.String("MySourcedConfiguration"), &SourcedConfigurationProps{
	Application: Application,
	Location: appconfig.ConfigurationSource_FromBucket(bucket, jsii.String("path/to/file.json")),
})

Members ​

MemberDescription
UNENCRYPTED deprecatedS3 applies server-side encryption with SSE-S3 for every bucket that default encryption is not configured.
KMS_MANAGEDServer-side KMS encryption with a master key managed by KMS.
S3_MANAGEDServer-side encryption with a master key managed by S3.
KMSServer-side encryption with a KMS key managed by the user.
DSSE_MANAGEDDouble server-side KMS encryption with a master key managed by KMS.
DSSEDouble server-side encryption with a KMS key managed by the user.

Referenced by ​

  • Bucket.encryptionencryptionencryptionEncryptionEncryption
  • BucketAttributes.encryptionencryptionencryptionEncryptionEncryption
  • BucketBase.encryptionencryptionencryptionEncryptionEncryption
  • BucketProps.encryptionencryptionencryptionEncryptionEncryption
  • DefaultStagingStackOptions.stagingBucketEncryptionstaging_bucket_encryptionstagingBucketEncryptionStagingBucketEncryptionStagingBucketEncryption
  • IBucket.encryptionencryptionencryptionEncryptionEncryption