More Info:

AWS VPCs configuration changes should be monitored using CloudWatch alarms.

Risk Level

Medium

Address

Security

Compliance Standards

CISAWS, CBP, SOC2, NIST, HIPAA, ISO27001, AWSWAF, HITRUST, NISTCSF, CISAWSF, PCI, APRA, MAS, NIST4

Triage and Remediation

Remediation

The VPC Changes Alarm is triggered when changes are made to the VPC configuration. To remediate this issue and set up the alarm, follow the steps below:

  1. Sign in to the AWS Management Console.

  2. Navigate to the CloudWatch dashboard at CloudWatch Console.

  3. In the left navigation panel, select Logs.

  4. Select the log group created for your CloudTrail trail event logs and click Create Metric Filter.

  5. On the Define Logs Metric Filter page, paste the following filter pattern inside the Filter Pattern box:

{
    ($.eventName = CreateVpc) || ($.eventName = DeleteVpc) || ($.eventName = ModifyVpcAttribute) ||
    ($.eventName = AcceptVpcPeeringConnection) || ($.eventName = CreateVpcPeeringConnection) ||
    ($.eventName = DeleteVpcPeeringConnection) || ($.eventName = RejectVpcPeeringConnection) ||
    ($.eventName = AttachClassicLinkVpc) || ($.eventName = DetachClassicLinkVpc) || ($.eventName = DisableVpcClassicLink) ||
    ($.eventName = EnableVpcClassicLink)
}
  1. Review the metric filter configuration and click Assign Metric.

  2. On the Create Metric Filter and Assign a Metric page, perform the following:

    • In the Filter Name box, enter a unique name for the new filter, e.g., VPCNetworkConfigChanges.
    • In the Metric Namespace box, type CloudTrailMetrics.
    • In the Metric Name box, type VpcEventCount.
    • In the Metric Value box, enter 1.
  3. Review the details and click Create Filter.

  4. On the current page, click Create Alarm.

  5. In the Create Alarm dialog box, provide the following:

  • Name and Description: Enter a unique name and a short description for the CloudWatch alarm.
  • Alarm Threshold: Set the threshold to trigger the alarm every time a configuration change involving an AWS VPC is made.
  • Actions: Add notifications using an existing SNS topic.
  • Alarm Preview: Set the period to 5 minutes and choose Sum for the statistic.
  1. Review the details and click Create Alarm. Once created, the new alarm will be listed on the Alarms page.

Additional Reading: