Skip to content
v2.277.0

StreamEncryption Enum ​

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

Example ​

ts
const lambdaRole = new iam.Role(this, 'Role', {
  assumedBy: new iam.ServicePrincipal('lambda.amazonaws.com'),
  description: 'Example role...',
});

const stream = new kinesis.Stream(this, 'MyEncryptedStream', {
  encryption: kinesis.StreamEncryption.KMS,
});

// give lambda permissions to read stream
stream.grantRead(lambdaRole);
python
lambda_role = iam.Role(self, "Role",
    assumed_by=iam.ServicePrincipal("lambda.amazonaws.com"),
    description="Example role..."
)

stream = kinesis.Stream(self, "MyEncryptedStream",
    encryption=kinesis.StreamEncryption.KMS
)

# give lambda permissions to read stream
stream.grant_read(lambda_role)
java
Role lambdaRole = Role.Builder.create(this, "Role")
        .assumedBy(new ServicePrincipal("lambda.amazonaws.com"))
        .description("Example role...")
        .build();

Stream stream = Stream.Builder.create(this, "MyEncryptedStream")
        .encryption(StreamEncryption.KMS)
        .build();

// give lambda permissions to read stream
stream.grantRead(lambdaRole);
csharp
// Install: dotnet add package Amazon.CDK.Lib
var lambdaRole = new Role(this, "Role", new RoleProps {
    AssumedBy = new ServicePrincipal("lambda.amazonaws.com"),
    Description = "Example role..."
});

var stream = new Stream(this, "MyEncryptedStream", new StreamProps {
    Encryption = StreamEncryption.KMS
});

// give lambda permissions to read stream
stream.GrantRead(lambdaRole);
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
lambdaRole := iam.NewRole(this, jsii.String("Role"), &RoleProps{
	AssumedBy: iam.NewServicePrincipal(jsii.String("lambda.amazonaws.com")),
	Description: jsii.String("Example role..."),
})

stream := kinesis.NewStream(this, jsii.String("MyEncryptedStream"), &StreamProps{
	Encryption: kinesis.StreamEncryption_KMS,
})

// give lambda permissions to read stream
stream.grantRead(lambdaRole)

Members ​

MemberDescription
UNENCRYPTEDRecords in the stream are not encrypted.
KMSServer-side encryption with a KMS key managed by the user.
MANAGEDServer-side encryption with a master key managed by Amazon Kinesis.

Referenced by ​

  • StreamProps.encryptionencryptionencryptionEncryptionEncryption