Protect CloudWatch Logs data with masking policies
Learn how to protect sensitive information in Amazon CloudWatch Logs using data protection policies. You will start by connecting to a preconfigured EC2 instance that is already sending Nginx access log to CloudWatch, then review the log events in CloudWatch to see how sensitive fields (client IP addresses) appear by default. From there, you will create a log group–level data protection policy using AWS’s managed data identifiers (IpAddress) to automatically detect and mask IP addresses in new incoming log events.
- 9 guided tasks
- Video walkthrough

Scenario
Your organization runs a web application with Nginx as the web server. The access logs contain client IP addresses, but your compliance team has determined that these IP addresses should be masked from general log viewers to protect user privacy. You'll configure a CloudWatch Logs data protection policy to automatically detect and mask IP addresses in the logs.
What you will learn
- Inspect simulated Nginx access logs in CloudWatch Logs.
- Create a data protection policy with the IpAddress managed data identifier.
- Verify that CloudWatch masks IP addresses in new log events.
- Unmask protected data with the logs:Unmask permission.
Protect CloudWatch Logs data with masking policies
Included in Cybr Premium.