Description
Set KmsMasterKeyId on a new SNS topic to encrypt newly published message bodies at rest. The first MySNSTopic excerpt omits it.
Potential impact
Without topic encryption, sensitive bodies are stored without KMS protection. Keep sensitive data out of topic names, message subjects and attributes, which SNS leaves outside body encryption.
Remediation
Supply KmsKeyId with a symmetric encryption KMS key in the topic’s Region. Configure key access for SNS and publishers, then publish a test message and verify delivery to the subscriber.
Examples
Protect delivery in transit and data stored at the subscription destination separately.
Before
yaml
Resources:
MySNSTopic:
Type: AWS::SNS::Topic
Properties:
TopicName: "SampleTopic"
After
yaml
Resources:
MySNSTopic:
Type: AWS::SNS::Topic
Properties:
TopicName: "SampleTopic"
KmsMasterKeyId: !Ref KmsKeyId