DOP-C02 Practice Question 89: CloudWatch Logs Data Protection Policy

AWS Certified DevOps Engineer – Professional (DOP-C02) · Test 9 · question 9 of 10

Monitoring and Logginghard

An application log group occasionally receives log lines that include customer social security numbers and credit card numbers because of an upstream logging defect that the team has not yet fixed. Operators need to keep querying the log group with CloudWatch Logs Insights and viewing events in the console for troubleshooting, but the raw sensitive values must never be visible to most operators, only to a small group with an explicit unmasking permission, and the masking must apply automatically as new log events arrive without changing the application. What should the team configure?

Select one answer
Show answer and explanation

Answer:

  • C. A CloudWatch Logs data protection policy on the log group with managed data identifiers for the relevant categories, so sensitive data is masked at egress points such as Logs Insights and console views by default, with unmasking gated behind the logs:Unmask permission.

A data protection policy scans incoming events against selected managed data identifiers (PII and financial categories cover SSNs and credit card numbers), masks matches automatically at egress points including Logs Insights queries and the console, and restricts viewing the unmasked value to principals holding the logs:Unmask permission, exactly meeting the requirement without any application change.

A is wrong because it requires building and maintaining custom redaction logic and a parallel log group, which duplicates a native capability and still leaves the original log group's raw events unmasked. B is wrong because denying GetLogEvents entirely blocks operators from troubleshooting at all, it does not selectively mask sensitive fields while preserving the rest of the log. D is wrong for the same reason: blocking FilterLogEvents for most principals removes their ability to search logs rather than protecting only the sensitive portions of each event.

Reference: Help protect sensitive log data with masking

Practice Test 9 ›

Study guides for DOP-C02

AWS Service Control Policies Explained: SCPs and DenialsAWS service control policies explained: how SCPs cap permissions, why admins still get access denied, inheritance, deny vs allow lists and the exam traps.
How AI Is Changing Software Jobs: Where to PrepareHow AI is changing software jobs: what history shows, the evidence on junior developers, what Klarna learned, new AI roles and five domains to prepare for.
How AWS Certification Exams Work: Scoring and RenewalHow AWS certification exams work: levels, booking, question types, unscored questions, scaled scores, pass marks, validity and how recertification works.
What Is Amazon RDS? Multi-AZ, Read Replicas and BackupsWhat is Amazon RDS? Engines, Multi-AZ, read replicas, backups, RDS Proxy, Aurora and pricing explained, with the traps that AWS exams set around each one.
Best DevOps certification: AWS, Azure, Google or CKAThe best DevOps certification for your stack: AWS DOP-C02, Azure AZ-400, Google Cloud DevOps Engineer and CKA compared on cost, level and prerequisites.
What Is AWS Lambda? Triggers, Concurrency and Cold StartsWhat is AWS Lambda? How functions run, cold starts, triggers vs event source mappings, concurrency, layers, aliases, pricing and the exam traps.
AWS CloudOps Engineer Associate (SOA-C03) exam guideAWS Certified CloudOps Engineer – Associate (SOA-C03) replaced SysOps Administrator. Format, cost, the five domains, what changed and how to prepare.
Which AWS certification should you get? 2026 roadmapWhich AWS certification to get first, by role and experience, with each exam's status in October 2026, what is changing, and prices in USD and INR.
What Is Amazon EC2? Instances, AMIs, EBS and Auto ScalingAmazon EC2 explained: instances, AMIs, instance types, security groups, EBS, Auto Scaling groups and pricing options, with the traps AWS exams set.
SQS vs SNS vs EventBridge on AWSWhen to use an SQS queue, an SNS topic or an EventBridge bus, plus fan-out, FIFO ordering, visibility timeouts and dead-letter queues for AWS exams.