Apply an inbound SNS message data protection policy with the De-identify operation to mask sensitive data
Short answer
B An inbound SNS message data protection policy with the De-identify operation masks sensitive data before delivery.
Question
Key Takeaways
SNS message data protection policies are purpose-built to scan messages for sensitive data and take actions like masking (De-identify) on inbound or outbound messages—exactly this requirement. Macie (A) discovers sensitive data in S3/managed stores, not live SNS messages, and a Lambda mask (A) is custom code. KMS encryption (C) protects at rest but does not mask content in logs. GuardDuty/Security Hub (D) detect, they do not mask. B is correct.
To stop sensitive data in SNS messages from leaking into transaction/debug logs, configure an inbound message data protection policy on the SNS topics that scans incoming messages and applies the De-identify operation to mask detected sensitive data before delivery. This protects the data at the messaging layer without a custom Lambda or encryption scheme.
Common mistake: Using Macie (A)—it classifies sensitive data in stored data (S3, etc.), not in-flight SNS messages, and would still need a Lambda to mask. Encrypting with KMS (C) protects confidentiality but leaves plaintext in logs. GuardDuty/Security Hub (D) are detect-and-alert, not masking. B is the native control.
Expert Analysis
Why the Answer Is Correct
An inbound SNS message data protection policy lets you define sensitive-data detectors and the De-identify operation, which masks detected sensitive elements inside messages before they are published to subscribers—directly preventing accidental exposure in downstream transaction and debug logs, with no custom code.
Why the Other Options Are Wrong
A uses Macie, which discovers sensitive data in managed data stores (not live SNS messages) and would still require a custom Lambda to mask. C encrypts messages with KMS but does not mask content, so sensitive values still appear in logs. D uses GuardDuty/Security Hub, which detect and alert but do not de-identify messages. B is the correct native solution.
Community Comment Notes
Community voted B (100). Commenters linked the AWS Compute blog introducing message data protection for SNS and noted the inbound policy with De-identify masks sensitive data inside messages. B confirmed.
Official Reference
https://docs.aws.amazon.com/sns/latest/dg/message-data-protection.html
This link opens the official vendor documentation in a new tab.
Community Votes
100% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 3 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 3
-
grekh001 👍 6B. https://aws.amazon.com/blogs/compute/introducing-message-data-protection-for-amazon-sns/
-
nischal77777 👍 1 Answered BData Protection: AWS introduced data protection policies for Amazon SNS to help ensure that sensitive data within messages is not exposed inadvertently. These policies can be used to define operations such as de-identifying or masking sensitive information before it's processed or logged. De-identify Operation: The de-identify operation in the data protection policy allows you to automatically mask or obfuscate sensitive information in the SNS messages. This helps prevent sensitive data from being exposed in transaction logs or debug logs.
-
aescudero51 👍 1 Answered BAnswer is B Inbound message data protection policy: This feature of Amazon SNS is specifically designed to scan incoming messages for sensitive data and take actions like masking or redacting it. De-identify operation: This option within the policy allows you to mask the sensitive data identified by the policy, preventing its exposure in the logs. Applied to SNS topics: By applying the policy to the SNS topics, all messages published to those topics will be scanned and protected.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.