Sunday, September 28, 2025

AWS CloudTrail Events Retention | Overview.

AWS CloudTrail Events Retention - Overview.

Scope:

  • Intro,
  • Event History (Default Retention),
  • Trails & Long-Term Retention,
  • CloudTrail Lake (Queryable Retention),
  • Table for Retention Lifecycle Options,
  • Architecture,
  • Best Practices,
  • Sample Retention Strategies,
  • Quick takeaway.

Intro:

  • AWS CloudTrail retention depends on how twtech stores and view the event data over time.
    • Event history: By default, the CloudTrail console provides a searchable Event history for management events for the last 90 days at no cost.
    • CloudTrail Lake (Event Data Stores): This managed storage and query service offers two pricing and retention models:
      • One-year extendable retention: Default retention is 366 days, but it can be extended up to 3,653 days (approximately 10 years).
      • Seven-year retention: Specifically designed for high-volume ingestion (over 25 TB/month), with a fixed retention period of 2,557 days (7 years).
    • CloudTrail Trails (S3 Storage): When you create a trail, logs are delivered to an Amazon S3 bucket. By default, these logs are stored indefinitely unless you configure S3 Lifecycle policies to delete or archive them to Glacier.
    • CloudWatch Logs: If twtech sends CloudTrail events to CloudWatch Logs, it can set retention periods ranging from 1 day to 10 years, or keep them indefinitely.
    • AWS Control Tower: For accounts managed via Control Tower, twtech can customize the S3 log retention for CloudTrail logs for up to 15 years.

1. Event History (Default Retention)

    • Management Events only (no Data/Insight).
    • Retained for 90 days in the CloudTrail Event History view (console or API).
    • Cannot be extended beyond 90 days.
    • Useful for short-term troubleshooting (e.g., who started/stopped an instance recently).

 2. Trails & Long-Term Retention

To go beyond 90 days, twtech must create a Trail.

  • S3 Bucket
    • All events (Management, Data, Insight) can be stored in S3 for indefinite retention (until you delete).
    • Supports lifecycle policies for cost optimization (e.g., transition to Glacier/Deep Archive).
    • Used for compliance & forensic history.
  • CloudWatch Logs
    • Events can be sent to CloudWatch Logs with custom retention policies (1 day – indefinite).
    • Enables real-time monitoring and alarms.
  • EventBridge
    • Streams events in near real-time to automation pipelines (but not for retention).

 3. CloudTrail Lake (Queryable Retention)

    • Managed data lake purpose-built for CloudTrail events.
    • Stores events for up to 7 years (configurable per Lake event data store).
    • Supports SQL queries without needing Athena/Glue.
    • Best for: compliance, security investigations, and auditing.

4. Table for Retention Lifecycle Options

Storage Option

Retention

Best For

Event History

90 days (fixed)

Troubleshooting, recent audits

S3

Unlimited (twtech controls lifecycle)

Long-term compliance, archival, forensics

CloudWatch Logs

1 day indefinite

Real-time monitoring, security alerting

CloudTrail Lake

Up to 7 years

Querying, compliance, governance

Architecture

 5. Best Practices

    1. Enable an Organization Trail centralize retention across accounts.
    2. Encrypt Logs in S3 (KMS) compliance & security.
    3. Enable Log File Integrity Validation detect tampering.
    4. Use Lifecycle Policies on S3 move old logs to Glacier for cost savings.
    5. Use CloudTrail Lake for compliance retain only what’s needed for regulated workloads.
    6. Restrict S3 Access store in a logging account with least privilege.

 6. Sample Retention Strategies

  • Enterprise Security Team:
    • Event History (90 days) + Org Trail to S3 (7 years, Glacier archive).
    • Insights + Data Events only for critical resources.
  • Startup / Cost-Sensitive Team:
    • Event History (90 days) + S3 Trail (1 year, auto-delete via lifecycle).
    • CloudWatch Logs for real-time alerts only.
  • Compliance (PCI… Payment Card Industry /HIPAA… Health Insurance Portability and Accountability Act /SOX)… Sarbanes-Oxley Act):
    • Event History (90 days) + S3 Trail (7–10 years).
    • CloudTrail Lake (5 years) for investigations.
    • Integrity validation + KMS encryption required.

twtech-Quick takeaway:

    • Default = 90 days (Management Events only).
    • S3 = Unlimited (long-term archival).
    • CloudWatch = Flexible (monitoring/alerts).
    • CloudTrail Lake = 7 years (query + compliance).


No comments:

Post a Comment

Amazon EventBridge | Overview.

Amazon EventBridge - Overview. Scope: Intro, Core Concepts, Key Benefits, Link to official documentation, What EventBridge  Really  Is (Deep...