Skip to content

Files

Latest commit

 

History

History
34 lines (21 loc) · 1.03 KB

aws-sns-topic-encryption-use-cmk.md

File metadata and controls

34 lines (21 loc) · 1.03 KB

Pattern: Missing use of CMK for AWS SNS topic

Issue: -

Description

Topics should be encrypted with customer managed KMS keys and not default AWS managed keys in order to allow granular key management.

Resolution: Use a CMK for SNS Topic encryption.

Examples

The following example will fail the aws-sns-topic-encryption-use-cmk check.

 resource "aws_sns_topic" "bad_example" {
    kms_master_key_id = "alias/aws/sns"
 }
 

The following example will pass the aws-sns-topic-encryption-use-cmk check.

 resource "aws_sns_topic" "good_example" {
 	kms_master_key_id = "/blah"
 }
 

Further reading