Description
For an Amazon Data Firehose Direct PUT stream, enable server-side encryption and choose AWS_OWNED_CMK or CUSTOMER_MANAGED_CMK as the key_type.
Potential impact
An invalid key type prevents the configuration from applying. Loss of key access can interrupt ingestion or delivery.
Remediation
For customer managed encryption, set enabled to true in server_side_encryption and supply an available symmetric encryption key ARN with the required permissions. Verify the stream’s encryption status and actual delivery. Firehose also encrypts interim storage during processing. If the source is Kinesis Data Streams, check that stream’s encryption. Review destination encryption and access separately.
Examples
These excerpts show the Direct PUT encryption block. Configure the S3 destination and service role separately.
Before
resource "aws_kinesis_firehose_delivery_stream" "firehose_stream" {
name = "${aws_s3_bucket.logs.bucket}-firehose"
destination = "extended_s3"
server_side_encryption {
enabled = true
key_type = "AWS_OWN"
}
}
After
resource "aws_kinesis_firehose_delivery_stream" "firehose_stream" {
name = "${aws_s3_bucket.logs.bucket}-firehose"
destination = "extended_s3"
server_side_encryption {
enabled = true
key_type = "CUSTOMER_MANAGED_CMK"
key_arn = var.firehose_kms_key_arn
}
}
Both examples request encryption, but AWS_OWN is invalid. The second uses the customer managed key specified by var.firehose_kms_key_arn.