23 of 50 in All Controls
aws

Centralized and Immutable CloudTrail Logging

IDAWS-LOG-001
Severity
critical
Automation
Auto
Category
logging
Enforcementmandatory
Complexity / Impact
medium(none impact)
Risk Profile
high likelihood(low residual)
Cloud Scopeaws:root
Environments
all
Target Resources
AWS::CloudTrail::TrailAWS::S3::BucketAWS::KMS::Key
Services
cloudtrails3aws-organizationskmsiam
Tags
loggingauditcloudtrails3compliancelanding-zoneimmutable
Frameworks
CIS AWSNIST 800-53ISO 27001SOC 2PCI DSSHIPAACSA CCM
Governance
Cloud Security (quarterly)
Created
2026-05-03
Last Updated
2026-08-21

Specification & Description

Aggregate multi-region AWS CloudTrail audit logs from all AWS Organizations member accounts into a dedicated, centralized Log Archive account secured with KMS CMK encryption, log file validation, and S3 Object Lock compliance retention.

Technical Specifications

A foundational security baseline requirement for any AWS Landing Zone is continuous, centralized, and tamper-proof event logging. AWS CloudTrail records all management and data API calls made across an organization.

1. Multi-Account Organization Trail Architecture

  • Configured from the AWS Organizations Management account (or delegated administrator).
  • An Organization Trail automatically logs API events for all existing and newly provisioned member accounts across all AWS regions.
  • Member accounts cannot view, modify, or delete the organizational trail locally.

2. Dedicated Centralized S3 Log Archive Storage

  • CloudTrail log files are delivered directly to an S3 bucket residing in the dedicated, isolated Log Archive account.
  • S3 Object Lock is enabled in Compliance Mode with a mandatory retention period (e.g., 365 days or 7 years). In Compliance Mode, no user (including root or AWS account administrators) can overwrite or delete log objects before the retention period expires.
  • S3 Bucket Policies enforce strict aws:SourceArn validation and enforce TLS 1.2+ encrypted in-transit connections (aws:SecureTransport: true).

3. Customer Managed KMS Key (CMK) Encryption

  • Log files are encrypted at rest using an AWS KMS Customer Managed Key with key rotation enabled.
  • The KMS key policy permits the cloudtrail.amazonaws.com service principal across the organization while preventing unauthorized decryption attempts from unprivileged roles.

4. Cryptographic Log File Validation

  • CloudTrail log file validation produces signed SHA-256 digest files every hour.
  • Enables security and forensic teams to mathematically verify whether any log file was modified, deleted, or forged following delivery.

5. Preventative SCP Guardrail

  • A Service Control Policy (SCP) attached to the Organization Root denies cloudtrail:StopLogging, cloudtrail:DeleteTrail, cloudtrail:UpdateTrail, and bucket deletion actions across all member accounts.

Security Rationale

Centralized, immutable audit logs provide the indispensable foundation for security incident response, forensic timeline reconstruction, threat hunting, and compliance validation. Without centralized immutability in an isolated Log Archive account, an attacker compromising an individual member account could disable logging or delete forensic trails to conceal unauthorized lateral movement or data exfiltration.

Business & Security Impact

Without centralized immutable logging, malicious activities, privilege escalations, or data breaches within member accounts can be erased or tampered with by adversaries, blinding incident response teams and causing immediate regulatory non-compliance across CIS, SOC 2, PCI DSS, and NIST frameworks.

Operational & Implementation Notes

When provisioning the centralized S3 Log Archive bucket, ensure that S3 server access logging is NOT enabled on the CloudTrail target bucket itself. Directing S3 access logs back into the same bucket creates an infinite recursive logging loop resulting in rapid storage growth and severe cost escalation. Refer to AWS-DATA-004 for loop prevention guardrails.

Compliance Framework Mappings (7)

Regulatory baselines and industry standards mapped to this control specification.

Beta
Framework / StandardMapped Requirements & ControlsControls
CIS AWS Foundations Benchmark v3.0CIS AWS
3.13.23.33.7
4
NIST 800-53 Rev 5NIST 800-53
AU-2AU-3AU-4AU-6AU-9AU-12SC-28
7
ISO 27001:2022ISO 27001
A.8.15A.8.24
2
SOC 2SOC 2
CC6.1CC7.2CC7.3
3
PCI DSS v4.0PCI DSS
10.2.110.2.210.3.110.5.1
4
HIPAA Security RuleHIPAA
164.312(b)164.312(c)(1)
2
CSA Cloud Controls Matrix v4.0CSA CCM
LOG-01LOG-02
2

* Compliance framework mappings are provided for informational architectural reference. Always verify control alignment against your organization's formal audit requirements.

Automated Detection & Rule Logic

Detection Engine: aws-api • Automated: Yes

Evaluates AWS CloudTrail configuration to verify that at least one active, multi-region Organization Trail is delivering logs to the designated Log Archive S3 bucket with KMS encryption and cryptographic log file validation enabled.

AWS CLI: Audit Organization Trail Configurationbash
# 1. Check for active Organization Trail with multi-region and log validation enabled
aws cloudtrail describe-trails \
  --include-shadow-trails \
  --query 'trailList[?IsOrganizationTrail==`true` && IsMultiRegionTrail==`true` && LogFileValidationEnabled==`true`]' \
  --output json

# 2. Check logging delivery status
aws cloudtrail get-trail-status \
  --name org-security-trail
Python (Boto3): Audit Organization Trail & Immutabilitypython
import json
import boto3

cloudtrail = boto3.client('cloudtrail')
s3 = boto3.client('s3')

def audit_organization_logging():
    trails = cloudtrail.describe_trails(includeShadowTrails=True).get('trailList', [])
    compliant_trails = []

    for trail in trails:
        is_org = trail.get('IsOrganizationTrail', False)
        is_multi = trail.get('IsMultiRegionTrail', False)
        has_validation = trail.get('LogFileValidationEnabled', False)
        has_kms = bool(trail.get('KmsKeyId'))
        bucket_name = trail.get('S3BucketName')

        if is_org and is_multi and has_validation and has_kms and bucket_name:
            # Check S3 Object Lock configuration on target bucket
            try:
                lock_config = s3.get_object_lock_configuration(Bucket=bucket_name)
                lock_status = lock_config.get('ObjectLockConfiguration', {}).get('ObjectLockEnabled')
                if lock_status == 'Enabled':
                    compliant_trails.append(trail['Name'])
            except Exception as e:
                print(f"Bucket {bucket_name} object lock check failed: {e}")

    if not compliant_trails:
        return {"status": "NON_COMPLIANT", "reason": "No immutable organization CloudTrail found."}
    return {"status": "COMPLIANT", "trails": compliant_trails}

if __name__ == "__main__":
    result = audit_organization_logging()
    print(json.dumps(result, indent=2))

Preventative Enforcement Policies

SCP: Prevent CloudTrail Disablement or Tamperingjson
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "DenyCloudTrailModification",
      "Effect": "Deny",
      "Action": [
        "cloudtrail:StopLogging",
        "cloudtrail:DeleteTrail",
        "cloudtrail:UpdateTrail",
        "cloudtrail:PutEventSelectors",
        "cloudtrail:PutInsightSelectors"
      ],
      "Resource": "*",
      "Condition": {
        "ArnNotLike": {
          "aws:PrincipalArn": [
            "arn:aws:iam::*:role/LandingZoneAdminRole"
          ]
        }
      }
    },
    {
      "Sid": "DenyLogArchiveBucketDeletion",
      "Effect": "Deny",
      "Action": [
        "s3:DeleteBucket",
        "s3:DeleteObject",
        "s3:DeleteObjectVersion",
        "s3:PutBucketPolicy"
      ],
      "Resource": [
        "arn:aws:s3:::central-log-archive-*",
        "arn:aws:s3:::central-log-archive-*/*"
      ],
      "Condition": {
        "ArnNotLike": {
          "aws:PrincipalArn": [
            "arn:aws:iam::*:role/LandingZoneAdminRole"
          ]
        }
      }
    }
  ]
}
Log Archive S3 Bucket Policy with SourceArn Validationjson
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "EnforceTLSRequestsOnly",
      "Effect": "Deny",
      "Principal": "*",
      "Action": "s3:*",
      "Resource": [
        "arn:aws:s3:::central-log-archive-ACCOUNT_ID",
        "arn:aws:s3:::central-log-archive-ACCOUNT_ID/*"
      ],
      "Condition": {
        "Bool": {
          "aws:SecureTransport": "false"
        }
      }
    },
    {
      "Sid": "AWSCloudTrailAclCheck",
      "Effect": "Allow",
      "Principal": {
        "Service": "cloudtrail.amazonaws.com"
      },
      "Action": "s3:GetBucketAcl",
      "Resource": "arn:aws:s3:::central-log-archive-ACCOUNT_ID",
      "Condition": {
        "StringEquals": {
          "aws:SourceArn": "arn:aws:cloudtrail:us-east-1:MANAGEMENT_ACCOUNT_ID:trail/org-security-trail"
        }
      }
    },
    {
      "Sid": "AWSCloudTrailWrite",
      "Effect": "Allow",
      "Principal": {
        "Service": "cloudtrail.amazonaws.com"
      },
      "Action": "s3:PutObject",
      "Resource": "arn:aws:s3:::central-log-archive-ACCOUNT_ID/AWSLogs/*",
      "Condition": {
        "StringEquals": {
          "s3:x-amz-acl": "bucket-owner-full-control",
          "aws:SourceArn": "arn:aws:cloudtrail:us-east-1:MANAGEMENT_ACCOUNT_ID:trail/org-security-trail"
        }
      }
    }
  ]
}
Terraform: Organization CloudTrail & Log Archive Buckethcl
# 1. S3 Log Archive Bucket with S3 Object Lock
resource "aws_s3_bucket" "log_archive" {
  bucket = "central-log-archive-${var.log_archive_account_id}"
  
  object_lock_enabled = true
}

resource "aws_s3_bucket_object_lock_configuration" "lock_config" {
  bucket = aws_s3_bucket.log_archive.id

  rule {
    default_retention {
      mode = "COMPLIANCE"
      days = 365
    }
  }
}

# 2. KMS Key for CloudTrail Encryption
resource "aws_kms_key" "cloudtrail_key" {
  description             = "KMS Key for Organization CloudTrail log encryption"
  deletion_window_in_days = 30
  enable_key_rotation     = true
  policy                  = data.aws_iam_policy_document.kms_cloudtrail.json
}

# 3. Organization CloudTrail Trail
resource "aws_cloudtrail" "org_trail" {
  name                          = "org-security-trail"
  s3_bucket_name                = aws_s3_bucket.log_archive.id
  include_global_service_events = true
  is_multi_region_trail         = true
  is_organization_trail         = true
  enable_log_file_validation    = true
  kms_key_id                    = aws_kms_key.cloudtrail_key.arn

  depends_on = [
    aws_s3_bucket_policy.log_archive_policy
  ]
}

Remediation Guide & Automation

From the AWS Organizations Management account (or designated delegated administrator), provision an organization-wide CloudTrail trail targeting a centralized S3 bucket in the Log Archive account configured with S3 Object Lock compliance retention, KMS CMK encryption, and log file validation.

Step-by-Step Instructions

  1. Provision a centralized S3 bucket in the dedicated Log Archive account with S3 Object Lock enabled in Compliance Mode.
  2. Configure an AWS KMS Customer Managed Key (CMK) with automated key rotation and a multi-account key policy.
  3. Attach the CloudTrail S3 Bucket Policy requiring aws:SourceArn validation and TLS 1.2+ secure transport.
  4. In the Management account, create an Organization Trail (is-organization-trail and is-multi-region-trail) directing logs to the central S3 bucket.
  5. Enable CloudTrail Log File Validation to generate hourly SHA-256 cryptographic digest signatures.
  6. Deploy the protective Service Control Policy (SCP) to the Organization Root to prevent log tampering or disablement across member accounts.
AWS CLI: Create Organization Trail with Log Validationbash
# Create the organization trail with KMS encryption and log file validation
aws cloudtrail create-trail \
  --name org-security-trail \
  --s3-bucket-name central-log-archive-ACCOUNT_ID \
  --is-organization-trail \
  --is-multi-region-trail \
  --enable-log-file-validation \
  --kms-key-id arn:aws:kms:us-east-1:LOG_ARCHIVE_ACCOUNT_ID:key/KEY_ID

# Start logging for the trail
aws cloudtrail start-logging \
  --name org-security-trail

We value your privacy

We use analytics cookies to understand how visitors interact with our site and to improve the user experience. You can choose to accept or decline these cookies.