CIS Amazon Web Services Foundations Benchmark v1.2.0/Monitoring/45 of 49
3.14Ensure a log metric filter and alarm exist for VPC changes
Control family: Monitoring
Control description
Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. It is possible to have more than 1 VPC within an account, in addition it is also possible to create a peer connection between 2 VPCs enabling network traffic to route between VPCs. It is recommended that a metric filter and alarm be established for changes made to VPCs.
How to implement
ResponsibilityCustomerYou configure and operate this in your own cloud accounts.
New VPCs, changed VPC attributes and new peering connections change what can talk to what. Alerting on them makes sure a network that bypasses the agreed design, or a peering to an unknown account, is spotted and questioned.
Before you start
The same on every cloud, before the steps in the tabs.
- Send CloudTrail to a CloudWatch Logs log group first (2.4), from a trail that covers every Region (2.1).
- Agree who receives these alerts, how quickly they respond and how they record what they found.
Evidence
- The alert routing and the response notes for alarms raised during the period
Not applicable. This benchmark covers AWS only.
On AWS the tasks add a metric filter to the CloudTrail log group in CloudWatch Logs, alarm on it through an SNS topic, and check the result with Security Hub CSPM control CloudWatch.14.
Task 1Count the events with a metric filter
- Sign in to the AWS Management Console at console.aws.amazon.com, in the Region where the trail delivers to CloudWatch Logs, and open CloudWatch.
- In the navigation pane, choose Logs > Log groups and choose the CloudTrail log group.
- Choose Actions > Create metric filter.
- In Filter pattern, enter {($.eventName=CreateVpc) || ($.eventName=DeleteVpc) || ($.eventName=ModifyVpcAttribute) || ($.eventName=AcceptVpcPeeringConnection) || ($.eventName=CreateVpcPeeringConnection) || ($.eventName=DeleteVpcPeeringConnection) || ($.eventName=RejectVpcPeeringConnection) || ($.eventName=AttachClassicLinkVpc) || ($.eventName=DetachClassicLinkVpc) || ($.eventName=DisableVpcClassicLink) || ($.eventName=EnableVpcClassicLink)} exactly as shown, then choose Next.
- Name the filter vpc-changes.
- Under Metric details, enter LogMetrics as the Metric namespace (select Create new if it doesn't exist yet), VPCChanges as the Metric name, 1 as the Metric value and 0 as the Default value.
- Choose Next, then Create metric filter.
- Check it: the log group's Metric filters tab lists vpc-changes.
Task 2Alarm on the metric and notify the security team
- On the log group's Metric filters tab, select vpc-changes and choose Create alarm.
- Under Conditions, set Threshold type to Static, Whenever VPCChanges is... to Greater/Equal and than... to 1.
- Choose Next.
- Under Notification, choose the alarm state trigger In alarm and select the security team's SNS topic, or create a new topic with the team's shared mailbox as its endpoint and confirm the subscription from that mailbox.
- Choose Next, name the alarm vpc-changes-alarm and choose Next.
- Under Preview and create, check the settings and choose Create alarm.
- Check it: the alarm shows OK or Insufficient data, and an event that matches the pattern turns it to In alarm and sends the email.
Task 3Check it with Security Hub CSPM control CloudWatch.14
- Open Security Hub CSPM in the Region where the trail lives.
- In the navigation pane, choose Security standards; if CIS AWS Foundations Benchmark v1.2.0 isn't enabled yet, choose Enable standard for it.
- Choose Controls, search for CloudWatch.14 and open it.
- Check it: the control shows as passed. It fails if the filter pattern differs from the one above, so copy it unchanged.
Evidence
- The CloudTrail log group's Metric filters tab, showing vpc-changes with its pattern
- The vpc-changes-alarm alarm in CloudWatch > Alarms, with its SNS topic and confirmed subscriptions
- Security Hub CSPM control CloudWatch.14, showing passed
Not applicable. This benchmark covers AWS only.
Console steps as of 5 November 2026. Not every step has been confirmed in a live console yet, and menus and labels can move between releases, so look for the nearest match if one has changed.