BucketEncryption Enum
What kind of server-side encryption to apply to this bucket.
| Source | aws-s3/lib/bucket.ts |
|---|---|
| Type last changed |
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
| Member | Description |
|---|---|
UNENCRYPTED deprecated | S3 applies server-side encryption with SSE-S3 for every bucket that default encryption is not configured. |
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. |
KMS | Server-side encryption with a KMS key managed by the user. |
DSSE_MANAGED | Double server-side KMS encryption with a master key managed by KMS. |
DSSE | Double server-side encryption with a KMS key managed by the user. |
Referenced by
Bucket.encryptionencryptionencryptionEncryptionEncryptionBucketAttributes.encryptionencryptionencryptionEncryptionEncryptionBucketBase.encryptionencryptionencryptionEncryptionEncryptionBucketProps.encryptionencryptionencryptionEncryptionEncryptionDefaultStagingStackOptions.stagingBucketEncryptionstaging_bucket_encryptionstagingBucketEncryptionStagingBucketEncryptionStagingBucketEncryptionIBucket.encryptionencryptionencryptionEncryptionEncryption