Sub topic 10
Centralized CloudTrail and AWS Config records
This chapter assumes you know what CloudTrail and AWS Config do in a single account, and that you have read the chapter on the Log Archive and Audit accounts. Here you will see how Control Tower wires both services across every enrolled account, and what to check when records are missing.
What Control Tower sets up
When you launch a landing zone, Control Tower configures two record-keeping services in every enrolled account.
- CloudTrail records API activity. Control Tower creates an organization trail in the management account. It covers all enrolled accounts and delivers logs to an Amazon S3 bucket in the Log Archive account.
- AWS Config records resource configurations and changes. Control Tower enables a configuration recorder and a delivery channel in each enrolled account in each governed Region. Configuration history and snapshots go to an S3 bucket in the Log Archive account.
The Audit account gets read access to these records and receives notifications. You review them there and leave the Log Archive account alone.
Why the records matter
The Log Archive account holds records that member account administrators cannot easily alter. Auditors can then trust the history of who did what and how resources changed. Many detective controls also depend on AWS Config. If the recorder in an account is stopped, those controls cannot evaluate that account.
Checking that logging works
After launch, confirm the trail and recorder exist. Run these in the management account for the trail, and in a member account for the recorder.
aws cloudtrail describe-trails --region us-east-1
aws configservice describe-configuration-recorder-status \
--region us-east-1In the first output, look for a trail with IsOrganizationTrail set to true. In the second, look for "recording": true and a lastStatus of SUCCESS.
To see which S3 buckets receive the records, sign in to the Log Archive account and list its buckets.
aws s3 lsYou should see one bucket for CloudTrail logs and one for AWS Config. Their names contain the Log Archive account ID.
Common errors
| Symptom | Likely cause | What to do |
|---|---|---|
| Config recorder missing in a Region | The Region is not governed, or the account is not enrolled | Add the Region to the landing zone and update it, or enroll the account |
| Recorder stopped or deleted | Someone changed it directly in the member account | Repair drift in Control Tower; do not recreate it by hand |
| No logs in the bucket | Bucket policy or key policy changed | Compare against the landing zone's expected settings and repair |
| Unexpected Config charges | Recorders run in many governed Regions | Remove Regions you do not use |
Do not edit managed resources
Control Tower owns the trail, the recorders, the buckets and their encryption keys. Changing them outside Control Tower causes drift and can break controls.
Where this fits
Logging comes from the landing zone itself, so it is already in place when you apply controls in the next chapter. Controls use the records described here to judge whether resources comply.
Exercise
A detective control reports no results for one member account, and describe-configuration-recorder-status in that account shows the recorder is not recording. What should you do, and what should you avoid?
Show answer
Treat it as drift and use Control Tower to repair it (for example, by re-registering the OU or updating the landing zone). Avoid recreating or editing the recorder by hand, because Control Tower owns that resource and manual changes cause further drift.
Exercise
Which account holds the S3 buckets for the organization's CloudTrail and AWS Config records, and which account is used to review them?
Show answer
The Log Archive account holds the buckets. The Audit account is used to review the records and receive notifications.