Lesson 1 of 6 Centralized Security and Encryption

Building Complete, Tamper-Resistant Organisation-Wide Logging

This lesson explains how logging is enabled everywhere by default and delivered to an account that workload administrators cannot alter, since investigations, audits and operations depend on complete, centralised and tamper-resistant logs.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe the logging foundation of an organisation trail and Config aggregation.
  • Explain how validation, Object Lock and SCPs protect logs.
  • Choose a way to query centralised logs.

The logging foundation

An organisation CloudTrail trail, created from the management account or a delegated administrator, records management events in every account and Region, including accounts and Regions added later, and delivers them to the Log Archive account. Member accounts can see the trail but cannot change or delete it. AWS Config records resource configuration in every account and Region, with an aggregator in a central account for an organisation-wide view.

Network and application logs complete the picture: VPC Flow Logs, Route 53 Resolver query logs, load balancer access logs and AWS WAF logs, enabled by baseline templates in every account and delivered to central storage. Data events, such as S3 object access and Lambda invocations, are enabled selectively for sensitive resources, because their volume and cost are high. Enabling all of this through Control Tower, StackSets or Organizations features, rather than per account, means no new account is ever unlogged.

Protecting the logs

Logs are useful as evidence only if they cannot have been altered, so the Log Archive combines several controls. CloudTrail log file validation produces signed, chained digest files that prove whether log files were changed or deleted after delivery. Encryption with a customer managed KMS key, whose policy allows only the logging services to encrypt and a small security role to decrypt, adds a second permission layer for reading.

S3 Object Lock in compliance mode makes log objects impossible to delete or overwrite for the retention period, even for the Log Archive's administrators, and lifecycle rules move older logs to cheaper storage classes. Bucket policies deny deletion, and SCPs prevent member accounts from stopping or modifying the organisation trail. Because the logs live in a separate account, a compromised workload account cannot reach them at all.

The following diagram shows how the controls combine around the central log bucket.

A tamper-evident Log Archive. An organisation CloudTrail trail and AWS Config in every account and Region deliver to a central bucket in the Log Archive account that only those services may write to. S3 Object Lock in compliance mode prevents deletion, CloudTrail digest files prove whether log files changed, a customer managed KMS key limits who can read, and an SCP stops anyone disabling the trail.
Each control answers a different question: Object Lock whether logs can be deleted, digest files whether they changed, the key policy who can read them, and the SCP whether logging can be stopped.
Select all that apply

Protecting central logs

Exam skills 2.3.2 · 2.4.3

Identify controls that protect organisation-wide logs from tampering.

Log in to try this activity Interactive activities are free with an account.

Querying and analysing logs

Centralised logs are useful only if they can be searched, and four options serve different needs. CloudTrail Lake runs SQL over CloudTrail events kept in managed event data stores for up to ten years, with no pipeline to build (it stopped accepting new customers on 31 May 2026). Athena runs ad hoc SQL over any log type stored in the S3 log archive, paying per query. Amazon Security Lake collects CloudTrail, flow logs, Resolver logs, Security Hub findings, EKS audit logs, WAF logs and third-party sources, and normalises them to the Open Cybersecurity Schema Framework (OCSF) in S3, so SIEM tools can subscribe to one consistent format. CloudWatch Logs Insights, with cross-account observability, queries recent application and service logs for operational work. The following table summarises the options.

OptionBest for
CloudTrail Lake (closed to new customers since 31 May 2026)SQL queries over CloudTrail events with managed retention of up to ten years, without building a pipeline
Athena over the S3 log archiveAd hoc queries over any log type stored in S3, paying per query
Amazon Security LakeNormalising CloudTrail, Flow Logs, Resolver logs, Security Hub findings, EKS audit logs, WAF logs and third-party sources to OCSF in S3, for SIEM subscribers
CloudWatch Logs Insights and cross-account observabilityOperational queries over recent application and service logs
Scenario questions

Analysing security data

Exam skills 2.3.2

Choose how to analyse organisation-wide security data.

Log in to try this activity Interactive activities are free with an account.
Worked example

An organisation trail that cannot be tampered with

Auditors require that API activity in every account is recorded, retained for seven years, and provably unaltered, even by account administrators. In the Log Archive account, a bucket is created with Object Lock and a default retention period:

aws s3api create-bucket --bucket acme-org-cloudtrail --object-lock-enabled-for-bucket \
  --create-bucket-configuration LocationConstraint=eu-west-1
aws s3api put-object-lock-configuration --bucket acme-org-cloudtrail --object-lock-configuration \
  '{"ObjectLockEnabled":"Enabled","Rule":{"DefaultRetention":{"Mode":"COMPLIANCE","Years":7}}}'

From the management account or the delegated administrator, the organisation trail is created:

aws cloudtrail create-trail --name org-trail --s3-bucket-name acme-org-cloudtrail \
  --is-organization-trail --is-multi-region-trail --enable-log-file-validation \
  --kms-key-id arn:aws:kms:eu-west-1:222222222222:key/mrk-0logs
aws cloudtrail start-logging --name org-trail

Member accounts can see the trail but cannot stop or modify it, and an SCP additionally denies cloudtrail:StopLogging and cloudtrail:DeleteTrail for everyone except a security role. Compliance-mode Object Lock prevents deletion for seven years, and the digest files produced by log file validation prove that no log file was changed. A lifecycle rule moves logs older than 90 days to Glacier Flexible Retrieval to reduce cost.

Check yourself

Why are organisation logs delivered to a separate log archive account?

Show answer

Administrators of the workload accounts cannot change or delete them there, and access can be limited to security staff.

Exam Tips

Remember for the exam

  • Use an organisation CloudTrail trail delivered to a dedicated Log Archive account.
  • Tamper-evident trails need log file validation, KMS encryption and Object Lock.
  • An organisation-wide view of configuration comes from a Config aggregator.
  • A normalised security data lake across accounts is Security Lake, using OCSF.
  • For SQL over CloudTrail events in new designs, use Athena over the log archive or Security Lake; CloudTrail Lake is closed to new customers.