-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Kinesis Stream encryption should support the Master Kinesis key #751
Comments
Your issue may be solved in the latest release (0.9.2), as all attributes types have disappeared and are replaced with That's not so say that |
I expect you will be forced to; the L2 constructs are helpful in adding permissions to the resource policy for keys when required, but I suspect that will likely fail for service default keys. |
I have retested this with 0.10, and it does break the stack build when trying to use the service default keys: const key = EncryptionKeyRef.import(this, "SystemKey", {
keyArn: "alias/aws/kinesis"
});
const stream = new Stream(this, "EncryptedStream", {
encryption: StreamEncryption.Kms,
encryptionKey: key
});
const func = new Function(this, "Lambda", {
code: Code.directory("dist"),
handler: "lib/index.handler",
runtime: Runtime.NodeJS810,
});
stream.grantRead(func.role); This ultimately generates a PolicyStatement on the function role in the form: -
Action: 'kms:Decrypt'
Effect: Allow
Resource: alias/aws/kinesis Which fails with the error:
|
Are there plans to support this before the 1.0 release is out? We are creating lots of streams in my team and without this we had to fallback to the CfnStream construct and use the raw StreamEncryption that provides In addition, in CfnStream the links to Thanks |
Now that |
We haven't updated the system that encountered this issue to the latest CDK, so it will be some time before I can verify that the use case is covered; that said, the fragment above isn't large, so perhaps I or someone else can rewrite it in the new syntax and verify the Cfn output. |
Adds a `StreamEncryption` option to specify that encryption should be enabled and managed by Kinesis. Closes #751
feat(kinesis): stream encryption with the Kinesis master key Adds a `StreamEncryption` option to specify that encryption should be enabled on a Stream with the master key managed by Kinesis. Closes #751
The L1 construct for Kinesis Stream accepts a string
KeyId
which can be any of arn, guid, or alias. The L2 construct only supports a keyArn, which hinders the use of Amazon-managed aliases such asalias/aws/kinesis
.This may be a change to EncryptionKey more than Kinesis, as EncryptionKey may need to understand the special nature of
alias/aws
keys, and make changes to such keys a no-op.The text was updated successfully, but these errors were encountered: