More Info:

AWS IAM policy configuration changes should be monitored using CloudWatch alarms.

Risk Level

High

Address

Security

Compliance Standards

SOC2, HIPAA, ISO27001, AWSWAF, HITRUST, CISAWS, CBP, NISTCSF, PCIDSS

Triage and Remediation

Remediation

  1. Configure CloudTrail to Deliver Logs to CloudWatch Logs:

    • Go to the AWS Management Console.
    • Open the CloudTrail service.
    • Select your trail.
    • Click on “Edit”.
    • In the “CloudWatch Logs” section, select an existing log group or create a new one.
    • Click “Save changes”.
  2. Create Metric Filter and Alarm:

    • Go to the CloudWatch service in the AWS Management Console.
    • In the left-hand navigation pane, choose “Logs” and then select the log group you configured in CloudTrail.
    • Click on “Create metric filter”.
    • Define a filter pattern that matches IAM policy changes. For example, you might use a pattern like { $.eventSource = "iam.amazonaws.com" && $.eventName = "AttachRolePolicy" }.
    • Click “Assign metric”.
    • Give your metric a name like IAMPolicyChangesEventCount.
    • Click “Create filter”.
    • Once your filter is created, you can set up an alarm based on this metric.

Additional Reading: