Skip to content

Primary SAA curriculum

Secure Cross-Account CloudTrail Logging

Centralized CloudTrail evidence across an AWS organization using an organization trail, a separate log archive account, restrictive S3 and KMS policies, validation, and retention controls.

9 min read

After this, you will understand

This lesson turns CloudTrail from a checkbox into a protected evidence pipeline whose coverage, ownership, integrity, retention, and investigation access are explicit.

Article guideprerequisites, mental models, and concepts

Article overview

intermediateCloudCertificationSecurity

Three useful mental models

In plain terms

An organization trail records account activity and delivers it to a protected S3 bucket owned by a separate log archive account.

Decision pressure

Workload administrators own their only logs, high-value data events are never selected, or a bucket or KMS policy silently blocks delivery.

Exam-ready model

Centralize collection, separate evidence ownership, permit only controlled delivery and reading, validate integrity, and monitor the logging system itself.

Think before reading

Why put audit logs in a separate account?

It reduces the chance that a compromised workload account can erase the evidence needed to investigate that compromise.

Connected learning

These lessons add useful context to the current core lesson.
  1. 1Centralized Security Findings And Incident TriageAWS Scenario

Concepts Covered

  • Event history versus a persistent trail
  • Organization and multi-Region trails
  • Management events versus data events
  • Separate log ownership and S3 resource policies
  • SSE-KMS delivery permissions
  • Log file validation versus immutability
  • Versioning, Object Lock, lifecycle, and investigation access
  • Delivery monitoring, query cost, and AWS Solutions Architect Associate exam (SAA-C03) signals

1. Situation

An attacker obtains an administrator role in a production account, changes a bucket policy, creates access keys, and tries to hide the activity.

The security team needs evidence answering who called which AWS API, from where, when, against what resource, and with what result. That is CloudTrail's core job.

The harder question is who owns the evidence. If the compromised account owns and can delete its only logs, the investigator is asking the suspect to guard the recording.

2. Naive Design

Per-account setup drifts: new accounts can miss persistent coverage, and workload administrators may control the only evidence of their own activity.

Coverage, the rules selecting which event types to record, encryption, and retention all drift between accounts. A production administrator may be able to alter the production evidence bucket. Another mistake is treating CloudTrail Event history, the built-in recent management-event view for one Region, as the organization's durable, centrally retained audit archive.

3. What Breaks

  1. In the per-account starting design above, a new account is created but no local trail is added.
  2. S3 object-level access is investigated, but only management events—API calls that manage AWS resources—were recorded; the required S3 data events were never selected.
  3. Central delivery is configured, but the bucket policy rejects the expected organization prefix, the beginning of the S3 object-key path where those logs belong.
  4. Server-side encryption with AWS Key Management Service (SSE-KMS) is enabled, but the encryption key's policy does not allow CloudTrail delivery.
  5. Logs arrive, but workload admins can delete them and nobody monitors trail status.

“CloudTrail enabled” is therefore incomplete. The design needs coverage, event scope, delivery permission, protected storage, and usable investigation access.

4. AWS Architecture

Step 1: create organization-wide coverage

An organization trail expands the coverage boundary automatically; multi-Region scope and deliberate event selectors determine what enters the evidence pipeline.

An organization trail logs events for the management account and member accounts. The management account or a CloudTrail delegated administrator can manage it with the required permissions. A multi-Region trail protects against forgetting active Regions.

Step 2: choose event scope deliberately

Event typeExampleMental model
Management eventDescribeInstances, RunInstances, IAM policy changeControl-plane reads and changes to AWS resources and configuration
Data eventS3 object read, Lambda invocationHigh-volume operation on or within a resource
Insights eventUnusual management-event API activityAnomaly derived from trail activity when enabled

Management events are the audit baseline. Data events are not universally logged by default and can be high volume, so select high-value resources and use cases intentionally.

Step 3: separate the storage boundary

The S3 bucket policy and KMS key policy are separate authorization boundaries: delivery needs both, investigators receive scoped read and decrypt access, and workload administrators do not control the archive.

The bucket policy is a resource policy. It must allow the CloudTrail service to check the bucket and write under the expected organization and account prefixes, the beginning segments of the S3 object keys used to organize each account's logs. Avoid broad workload access; S3 Block Public Access and TLS-only access remain appropriate.

Step 4: add encryption without breaking delivery

S3 encrypts objects at rest. When requirements call for a customer-managed AWS Key Management Service (KMS) key, the customer controls the key policy and lifecycle. Coordinate three permission paths:

  1. CloudTrail can use the key for delivery.
  2. Authorized investigators can decrypt.
  3. Workload principals cannot gain broad decrypt access.

An IAM allow cannot overcome a key policy that does not permit the necessary use.

Step 5: distinguish integrity from retention

Validation detects tampering, Versioning supports recovery, and Object Lock prevents early overwrite or deletion; none of the three substitutes for the others.

CloudTrail log file validation delivers signed digest files. Validation helps detect modification or deletion after delivery; enabling it does not automatically run validation and does not prevent deletion.

S3 Versioning retains versions. S3 Object Lock supplies stronger retention behavior when configured appropriately. Lifecycle transitions control storage cost but must preserve required retrieval and retention.

Step 6: monitor and expose a controlled investigation path

Alert on trail stop/delete attempts, delivery errors, bucket-policy changes, KMS-key changes, Object Lock changes, and missing expected log delivery. Give analysts read-only or query roles rather than S3 administration.

CloudWatch Logs can support near-real-time metric filters and alarms; S3 remains the durable central archive in this design. Athena can run SQL queries over the archived S3 files, while a security information and event management (SIEM) system correlates evidence from multiple security sources.

Completed architecture

CloudTrail observes supported activity after the API call; selectors, delivery permissions, protected retention, monitoring, and scoped investigation turn that activity into usable evidence.

5. Request Or Data Flow

  1. A principal calls an AWS API in a member account.
  2. CloudTrail evaluates whether the event matches trail selectors.
  3. CloudTrail batches and delivers log files to the central S3 prefix.
  4. If SSE-KMS is configured, the service uses the permitted key path.
  5. Digest files support later integrity validation when enabled.
  6. Lifecycle rules retain or transition the objects.
  7. During investigation, a scoped security role queries the evidence and correlates it with findings and workload logs.

CloudTrail delivery is not an inline blocker for the API call and is not a zero-delay SIEM feed.

6. Security Controls

  • separate log archive administration from workload administration;
  • restrict bucket writes to expected CloudTrail delivery conditions and prefixes;
  • restrict reads and decrypt permission to approved investigation roles;
  • deny insecure transport and keep Block Public Access enabled;
  • use validation and immutable retention according to evidence requirements; and
  • audit changes to the trail, bucket, key, retention, and Organizations relationship.

7. Resilience Controls

Use an organization, multi-Region trail for broad coverage. Monitor actual delivery rather than assuming configuration equals evidence. Test KMS and bucket-policy changes safely.

If requirements demand regional disaster recovery for audit evidence, evaluate S3 replication and destination key/policy behavior. Maintain break-glass investigation access, a tightly controlled emergency read path, without granting delete authority.

8. Performance Controls

Collection is managed; analysis becomes the scaling concern. Partition-aware queries should filter account, Region, service, and date. Avoid repeatedly scanning years of logs.

Send only actionable subsets to expensive real-time analytics while retaining the authoritative archive. Select high-volume data events from investigation value, not fear of missing everything.

9. Cost Controls

Cost comes from trail copies and optional features, data-event volume, S3 retention, KMS requests, CloudWatch Logs ingestion, cross-Region copies, and downstream queries or SIEM ingestion.

Apply lifecycle by evidence policy. Narrow Athena columns and partitions. Never reduce cost by allowing critical audit coverage to disappear silently.

10. Exam Variants

Exam wordingFirst thought
Automatically cover organization accountsOrganization trail
Capture activity across RegionsMulti-Region trail
Record S3 object-level activityCloudTrail data events
Keep member admins from deleting evidenceSeparate log archive account + restrictive S3 policy
Verify delivered logs were changed or deletedLog file validation
Prevent deletion during retentionS3 Object Lock
Encrypt with customer-managed keyKMS key policy for delivery and readers
Alert on a specific API actionCloudTrail to CloudWatch Logs / EventBridge pattern as appropriate

11. Common Traps

  • Do not store each account's only evidence inside that account.
  • Do not assume Event history replaces a persistent organization trail.
  • Do not assume every data event is logged automatically.
  • Do not confuse validation with prevention or automatic validation execution.
  • Do not confuse CloudTrail API evidence with CloudWatch performance metrics.
  • Do not forget bucket and KMS resource policies.
  • Do not grant investigators delete or policy-administration access merely to query logs.

Final Mental Model: One-Minute Review

TermExact jobMemory cue
Organization trailCollects configured events across organization accountsOrganization camera system
Management eventRecords control-plane API activityWho inspected or changed the building?
Data eventRecords supported resource-level operationsWho opened the file?
Log archive accountOwns evidence separatelyOff-site evidence room
Bucket policyPermits controlled delivery and accessEvidence-room door policy
KMS key policyControls encryption-key useKey-cabinet policy
Log validationDetects post-delivery tampering or deletionTamper seal
Object LockPrevents deletion for configured retentionLocked evidence bag
Remember the control chain: cover the organization, select the right events, separate evidence ownership, protect retention, and grant investigators controlled access.

CloudTrail records the activity; the organization trail supplies coverage; the separate archive preserves trustworthy evidence.

Review AWS CloudTrail, AWS Organizations, Amazon S3, and Identity Policies vs Resource Policies.

Official references: Creating an organization trail and CloudTrail log file integrity validation.

Finished reading?

Your reading history is saved in this browser so you can continue later.

Recommended Next

Centralized Security Findings And Incident TriageAWS Architecture Scenarios9 min read

This applies the foundation mental models to a real architecture decision instead of a service inventory.

Optional exploration

These links add context, but they do not replace the recommended next lesson.

Arcflow Plus is coming — review drills, research breakdowns, more AI. Get one email at launch.