Amazon_CloudWatch_12
Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs and establishing corresponding metric filters and alarms. Network gateways are required to send/receive traffic to a destination outside of a VPC. It is recommended that a metric filter and alarm be established for changes to network gateways.
Perform the following to setup the metric filter, alarm, SNS topic, and subscription:
To Create Metric Filter and Cloudwatch Alarm
1.Navigate to Cloudwatch dashboard at https://console.aws.amazon.com/cloudwatch/.
2.In the left navigation panel, select Logs.
3.Select the log group created for your CloudTrail trail event logs and click Create Metric Filter button.
4.On the Define Logs Metric Filter page, paste the following pattern inside the Filter Pattern box: { ($.eventName = CreateCustomerGateway) || ($.eventName = DeleteCustomerGateway) || ($.eventName = AttachInternetGateway) || ($.eventName = CreateInternetGateway) || ($.eventName = DeleteInternetGateway) || ($.eventName = DetachInternetGateway) }. This pattern will be used for scanning the AWS CloudTrail logs for event names like “CreateInternetGateway”, “AttachInternetGateway” or “DeleteInternetGateway”.
5.Review the metric filter config details then click Assign Metric.
6.On the Create Metric Filter and Assign a Metric page, perform the following:
<span style=white-space:pre
Want to Know More?
Learn how our partners are managing their cloud security and compliance with Cloudlytics.
I hereby accept the GDPR and Privacy Policy, by subscribing to the newsletters.