Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poor usability of S3 Bucket encryption #2714

Closed
skinny85 opened this issue May 31, 2019 · 0 comments · Fixed by #2719 or MechanicalRock/tech-radar#14 · May be fixed by MechanicalRock/cdk-constructs#5, MechanicalRock/cdk-constructs#6 or MechanicalRock/cdk-constructs#7
Labels
@aws-cdk/aws-s3 Related to Amazon S3

Comments

@skinny85
Copy link
Contributor

When I say:

const key = new kms.Key(this, 'Key');

new s3.Bucket(this, 'Bucket', {
  encryptionKey: key,
});

I get a validation error:

Error: encryptionKey is specified, so 'encryption' must be set to KMS (value: NONE)

This customer experience is not up to the CDK bar. If you know what should be specified in the encryption property, why are you forcing me to do it? Why should I have to tell you I want encryption twice?

(Now, if I explicitly specify both encryptionKey: key and encryption: s3.BucketEncryption.Unencrypted (note: different enum constant name than the NONE in the error message above!), fine, hit me with that validation error. But it should not happen by default)

@skinny85 skinny85 added the @aws-cdk/aws-s3 Related to Amazon S3 label May 31, 2019
eladb pushed a commit that referenced this issue Jun 3, 2019
If `encryptionKey` is specified, defaults to KMS encryption.

Fixes #2714
eladb pushed a commit that referenced this issue Jun 3, 2019
If `encryptionKey` is specified, defaults to KMS encryption.

Fixes #2714
This was referenced Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment