This rule ensures the presence of a log metric filter and alarm for any changes made to route tables.
Rule | Ensure a log metric filter and alarm exist for route table changes |
Framework | General Data Protection Regulation (GDPR) |
Severity | ✔ Low |
Rule Description
This rule ensures that a log metric filter and alarm are in place to track and monitor any changes made to the route tables in compliance with the General Data Protection Regulation (GDPR). By implementing this rule, you can establish a reliable auditing mechanism to identify any unauthorized or unexpected modifications to your network's route tables, which are essential for protecting personal data according to GDPR regulations.
Troubleshooting Steps
If you encounter any issues related to the log metric filter or alarm for route table changes, please follow these troubleshooting steps:
Verify CloudTrail Configuration: Ensure that AWS CloudTrail is properly configured and enabled in your AWS account. Without CloudTrail, the necessary log data for monitoring route table changes will not be available. Check if CloudTrail is active and capturing relevant events.
Check IAM Roles and Permissions: Validate that the IAM roles associated with the CloudTrail service have sufficient permissions to create log metric filters and alarms. Inspect the IAM policies attached to the roles to confirm they include necessary permissions for CloudWatch Logs and CloudWatch Alarms.
Confirm Route Table Logging: Ensure that route table changes are being logged. Check the settings of your VPC's flow logs and verify if the flow logs capture the required information for route table modifications.
Review Log Metric Filter: Examine the log metric filter that you created for tracking route table changes. Verify that the filter pattern is correctly defined to capture relevant events. If there are any issues with the pattern, update it to match the structure of the logged events correctly.
Check Alarm Configuration: Review the alarm configuration associated with the log metric filter. Confirm that the alarm's threshold settings, actions, and notification mechanism are accurate. Make any necessary adjustments or corrections to ensure the alarm functions as intended.
Review CloudWatch Logs Retention: Ensure that the CloudWatch Logs retention period is sufficient for storing the required log data. If the logs are being automatically deleted due to a short retention period, increase the retention period accordingly.
Necessary Codes
Before proceeding with the remediation steps, make sure you have the necessary permissions to create log metric filters and alarms.
There are no specific codes required for this rule. The remediation steps involve configuring and setting up the log metric filter and alarm using the AWS Management Console and the AWS Command Line Interface (CLI).
Remediation Steps
Follow these step-by-step instructions to implement the log metric filter and alarm for route table changes:
Open the AWS Management Console: Go to the AWS Management Console and sign in to your AWS account.
Navigate to CloudWatch: Using the AWS Console's search bar, search for and select "CloudWatch."
Create a Log Metric Filter:
{($.eventName = CreateRouteTable) || ($.eventName = ReplaceRouteTableAssociation) || ($.eventName = ReplaceRoute) || ($.eventName = DeleteRouteTable)}
Create an Alarm:
Test the Alarm:
Monitor and Respond:
By following these steps, you ensure that the necessary log metric filter and alarm are consistently monitoring any alterations to your route tables, helping maintain compliance with GDPR regulations.