This rule ensures the presence of a log metric filter and alarm for AWS Organizations changes.
Rule | Ensure a log metric filter and alarm exists for AWS Organizations changes |
Framework | cis_v130 |
Severity | ✔ Low |
Rule Description:
The rule requires the presence of a log metric filter and alarm for capturing and alerting on AWS Organizations changes. This rule ensures monitoring and detection of any modifications made to the AWS Organizations service, providing visibility and timely notification of events related to changes in the account structure and organizational hierarchy.
Troubleshooting Steps:
Validate AWS Organizations Setup:
Check CloudTrail Configuration:
Verify Log Metric Filter Creation:
Validate Alarm Configuration:
Check Notification Actions:
Necessary Code:
There is no specific code provided for this rule. However, following are the CloudFormation template snippets that can be used for creating the necessary resources:
Type: AWS::Logs::MetricFilter
Properties:
LogGroupName: !Ref LogGroupName
FilterPattern: |-
{ ($.eventSource = organizations.amazonaws.com) && (($.eventName = "InviteAccountToOrganization") || ($.eventName = "UpdateOrganizationalUnit") || ($.eventName = "CreateOrganizationalUnit") || ($.eventName = "AddOrganizationsServiceLinkedRole") || ($.eventName = "DeleteOrganizationalUnit") || ($.eventName = "RemoveAccountFromOrganization") || ($.eventName = "CreateAccount") || ($.eventName = "MoveAccount") || ($.eventName = "CreateOrganization") || ($.eventName = "UpdateAccount") || ($.eventName = "UpdatePolicy")) }
MetricTransformations:
- MetricName: OrganizationsChanges
MetricValue: 1
DefaultValue: 1
Type: AWS::CloudWatch::Alarm
Properties:
AlarmName: OrganizationsChangesAlarm
AlarmDescription: Notify on AWS Organizations Changes
MetricName: OrganizationsChanges
Namespace: AWS/Logs
Statistic: SampleCount
Threshold: 1
ComparisonOperator: GreaterThanThreshold
Period: 300
EvaluationPeriods: 1
AlarmActions:
- !Ref AlarmNotificationTopic
Dimensions:
- Name: LogGroupName
Value: !Ref LogGroupName
Note: The above code snippets are written in YAML format for AWS CloudFormation. Adjustments may be needed based on your specific infrastructure and deployment methodology.
Remediation Steps:
To remediate any non-compliance with this rule, follow these steps:
Create a Log Metric Filter:
Create a CloudWatch Alarm:
Validate and Test:
Remediation Automation:
By following these steps, you can ensure the existence of a log metric filter and alarm for AWS Organizations changes, enabling effective monitoring and timely alerting capabilities within your AWS environment.