Cloud Defense Logo

Products

Solutions

Company

Book A Live Demo

Rule: CloudTrail trails should be integrated with CloudWatch logs

This rule highlights the importance of integrating CloudTrail trails with CloudWatch logs for enhanced security and monitoring.

RuleCloudTrail trails should be integrated with CloudWatch logs
FrameworkSOC 2
Severity
Critical

CloudTrail Integration with CloudWatch Logs for SOC 2 Compliance

Overview

Integrating AWS CloudTrail with CloudWatch Logs is crucial for achieving Service Organization Control 2 (SOC 2) compliance. SOC 2 is designed for service providers storing customer data in the cloud, requiring companies to establish and follow strict information security policies and procedures. Integration allows for real-time monitoring, alerting, and archiving of account activity, providing the necessary audit trails to meet SOC 2 requirements.

Prerequisites

  • An active AWS account.
  • An existing S3 bucket for CloudTrail logs.
  • Proper IAM permissions to create and configure CloudTrail and CloudWatch Logs.

Step by Step Guide

Step 1: Create a New Trail in CloudTrail

  1. 1.
    Go to the AWS CloudTrail console.
  2. 2.
    Click on “Create trail.”
  3. 3.
    Name your trail and select "Yes" for Apply trail to all regions.
  4. 4.
    Set up an S3 bucket or use an existing one for log storage.
  5. 5.
    Enable "Log file SSE-KMS encryption" for enhanced security (Optional but recommended).

Step 2: Create a New Log Group in CloudWatch Logs

  1. 1.
    Go to the AWS CloudWatch console.
  2. 2.
    Navigate to Logs and click "Create log group."
  3. 3.
    Name your log group and choose an appropriate Retention setting (e.g., 365 days for SOC 2).

Step 3: Integrate CloudTrail with CloudWatch Logs

  1. 1.
    In the CloudTrail console, select your trail and click on "CloudWatch Logs" in the navigation pane.
  2. 2.
    Click on "Configure."
  3. 3.
    Select the log group created in Step 2.
  4. 4.
    Choose or create a new IAM role that grants permissions for CloudTrail to write to CloudWatch Logs.

Step 4: Set Up CloudWatch Alarms for SOC 2 Compliance (Optional)

  1. 1.
    In the CloudWatch console, navigate to Alarms.
  2. 2.
    Click "Create Alarm" and select the CloudTrail/CloudWatch Log group as source.
  3. 3.
    Define Metric filters for specific events that need monitoring as per SOC 2.
  4. 4.
    Configure actions like SNS topics to send notifications when the alarm triggers.

Troubleshooting

  • If logs are not appearing in CloudWatch Logs, ensure CloudTrail is correctly configured and has the necessary permissions to write to CloudWatch Logs.
  • Verify the IAM role policies for permissions issues.
  • Check for any encryption errors if SSE-KMS encryption is enabled.

Necessary IAM Role Policy Example for CloudTrail to CloudWatch Logs Integration

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "logs:CreateLogStream",
        "logs:PutLogEvents"
      ],
      "Resource": [
        "arn:aws:logs:region:account-ID:log-group:log-group-name:*"
      ]
    }
  ]
}

Compliance Monitoring and Remediation

  • Regularly review CloudWatch metrics and alarms to ensure SOC 2 compliant event capture.
  • Respond promptly to any alerts.
  • Perform routine audits of your CloudTrail logs and CloudWatch metrics.

This integration aids in maintaining SOC 2 compliance through diligent monitoring and provides the transparency needed to manage cloud resource configurations and changes effectively. Following these steps will create a secure audit environment to satisfy SOC 2 requirements without unnecessary filler data, ensuring that instructions are both actionable and SEO-optimized.

Is your System Free of Underlying Vulnerabilities?
Find Out Now