SNS topic is encrypted at rest with KMS
Amazon SNS topics are assessed for server-side encryption with AWS KMS. Topics lacking a configured KMS key (e.g., missing kms_master_key_id) are identified as unencrypted at rest.
Risk
Without KMS-backed SSE, SNS stores message bodies unencrypted at rest, undermining confidentiality.
Privileged insiders or compromised service components could access plaintext during persistence windows, causing data exposure. You also lose KMS controls such as key policies, rotation, and detailed audit trails.
Run this check with Prowler
Run in Prowler Cloudprowler aws --checks sns_topics_kms_encryption_at_rest_enabledRecommendation
Enable server-side encryption on all SNS topics with AWS KMS; prefer customer-managed keys for control.
Apply least privilege on key use, enforce rotation, and monitor key/access logs. Minimize sensitive data in messages and use end-to-end encryption where feasible to add defense in depth.
Remediation
CLI
aws sns set-topic-attributes --topic-arn <TOPIC_ARN> --attribute-name KmsMasterKeyId --attribute-value alias/aws/snsTerraform
# Enable SSE for an SNS topic
resource "aws_sns_topic" "<example_resource_name>" {
name = "<example_resource_name>"
kms_master_key_id = "alias/aws/sns" # Critical: Enables encryption at rest
}NativeIaC
# CloudFormation: Enable SSE for an SNS topic
Resources:
<example_resource_name>:
Type: AWS::SNS::Topic
Properties:
KmsMasterKeyId: alias/aws/sns # Critical: Enables encryption at rest with AWS managed KMS keyOther
Check Code
from prowler.lib.check.models import Check, Check_Report_AWS
from prowler.providers.aws.services.sns.sns_client import sns_client
class sns_topics_kms_encryption_at_rest_enabled(Check):
def execute(self):
findings = []
for topic in sns_client.topics:
report = Check_Report_AWS(metadata=self.metadata(), resource=topic)
report.status = "PASS"
report.status_extended = f"SNS topic {topic.name} is encrypted."
if not topic.kms_master_key_id:
report.status = "FAIL"
report.status_extended = f"SNS topic {topic.name} is not encrypted."
findings.append(report)
return findings