Setting props serverSideEncryption or serverSideEncryptionAwsKmsKeyId results in a failure to deploy.
const encryptionKey = new kms.Key(this, "ArtifactKey");
const artifactBucket = new s3.Bucket(this, "artifactBucket", { encryptionKey });
new s3deploy.BucketDeployment(this, "ArtifactPreparation", {
sources: [s3deploy.Source.asset(path.resolve(__dirname, '../assets'))],
destinationBucket: artifactBucket,
serverSideEncryption: ServerSideEncryption.AWS_KMS,
serverSideEncryptionAwsKmsKeyId: encryptionKey.keyId
});
From lambda:
Unknown options: --server-side-encryption 'aws:kms',--ssekms-key-id 'redacted-key-id'
Command '['python3', '/var/task/aws', 's3', 'sync', '--delete', '/tmp/tmpgvs36uzh/contents', 's3://foo-bucket/', "--server-side-encryption 'aws:kms'", "--ssekms-key-id 'redacted-key-id'", '--metadata-directive', 'REPLACE']' returned non-zero exit status 255
1.21.1Framework Version: 1.21.1
Language : typescript
Invalid system metadata keys:
From documentation, these should be:
ssesse-kms-key-idSystem metadata keys usage to construct the s3 sync operation here:
https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-s3-deployment/lambda/src/index.py#L156
This is :bug: Bug Report
I am working on a fix, but it's my first time contributing to the cdk so it will take a while for me to test it successfully.
Hi @pnwpedro, thanks for reporting this. And thanks @mattsains for working on it, much appreciated! 馃憤
Most helpful comment
I am working on a fix, but it's my first time contributing to the cdk so it will take a while for me to test it successfully.