Home › AWS › AWS data services › CloudTrail

AWS data services · Observability, audit and cost · about 9 min read

AWS CloudTrail (and CloudTrail Lake)

The record of who called which AWS API, when and from where; here it joins the access report as audit evidence.

RoleObservability, audit and cost
StatusCloudTrail is generally available and fully supported. CloudTrail Lake is closed to new customers since 31 May 2026; existing users continue but get only critical fixes, and AWS points them to CloudWatch. Trails, Insights and Aggregated Events are unaffected.
Verdict on this sitePursue
AzureAzure Activity Log and resource diagnostic logs
Google CloudCloud Audit Logs
DatabricksAudit logs in the system.access.audit system table
Open sourceNone as such: send OCSF-format events to your own lake
Verdict: Pursue. An organization trail to the log-archive account is part of the landing zone. Its S3 data events and KMS key-use events join Databricks audit system tables in the access report that owners review every quarter. Do not start on CloudTrail Lake; land trail files in S3 and read them in Databricks.

In plain words

What it is

Almost everything that happens in AWS happens through an API call. Creating a bucket, reading a file, using an encryption key, changing a permission and starting a DMS task are all API calls. CloudTrail records these calls as events. Each event says who made the call (the user or role), what they did, to which resource, when, from which IP address, and whether it worked. It is the black-box flight recorder of an AWS account.

CloudTrail has three kinds of event. Management events are changes and reads of configuration, such as creating a role or using a KMS key. Data events are operations on the data itself, such as reading or writing an S3 object or invoking a Lambda function; they are off by default because there are so many. Network activity events record calls that pass through VPC endpoints. The console's Event history keeps 90 days of management events for free. To keep more, or to keep data events, you create a trail, which delivers event files to an S3 bucket every few minutes.

A concrete example: a tyre maker keeps compound recipes in a restricted catalog with its own S3 bucket and KMS key. An auditor asks who read recipe data in the last quarter. The Databricks audit table shows which people queried the recipe tables. CloudTrail shows which IAM roles used the recipe KMS key and read objects in the recipe bucket. If CloudTrail shows a role reading that bucket that is not the Unity Catalog storage credential, someone has gone around the catalog, and that is the finding.

CloudTrail Lake was a managed store with SQL queries over events. AWS closed it to new customers on 31 May 2026 and recommends CloudWatch for new work. Plain trails, which are what this platform uses, are not affected.

The signed visitor book at a secure building's front desk, kept in a locked room in another building where the visitors cannot reach it.

Big picture

Where it fits

SourcesMove inStreamStoreProcessServeUseAcross everything: catalog · security · orchestration · observability and cost · infrastructure as codegets data fromhands data toEvery AWS API call in every accountS3KMSCloudTrailObservability, audit and costS3 bucket in the log-archive accountDatabricks prod_ops tables (ops.fct_access)EventBridge

The lit lane is where CloudTrail works. Boxes on the left feed it; boxes on the right use what it produces.

CloudTrail sits in the band across the bottom of the picture, with health and cost. It is set up before anything else. In the landing zone, an organization trail sends every account's events to an S3 bucket in a separate log-archive account, with log file integrity validation turned on. People who run the data platform cannot change or delete those files.

On the reference platform, CloudTrail is one of three sources for the access report. Databricks audit system tables say which person or service principal read which table or column through Unity Catalog. CloudTrail S3 data events and KMS events say which IAM role touched which bucket and key. These are joined in prod_ops into ops.fct_access, one row per read of sensitive data. Data owners review it every quarter, and it is the evidence pack for an auditor.

The join works because of a rule in the platform design: only Unity Catalog's storage credentials and the platform's own service roles should ever touch the catalog buckets. Any other role in the CloudTrail data shows a path around governance. CloudTrail also feeds incident triage, because the triage step checks recent configuration and permission changes when a pipeline breaks.

How it works

The ideas you need

IdeaWhat it means
EventOne recorded API call: who, what, which resource, when, from where, and the result.
Management eventA call that manages resources, such as creating a role or using a KMS key. Logged by default.
Data eventA call on data inside a resource, such as S3 GetObject or PutObject. Off by default; you choose which buckets to log.
TrailA configuration that delivers events as compressed files to S3, and optionally to CloudWatch Logs, for as long as you keep them.
Organization trailOne trail, created in the management or delegated admin account, that records events for every account in AWS Organizations.
Event historyThe free, 90-day view of management events in each account and Region.
Advanced event selectorsFilters that choose exactly which data events to log, for example only GetObject on the restricted buckets.
Log file integrity validationHourly signed digest files that prove trail files were not changed or deleted after delivery.
CloudTrail InsightsA feature that spots unusual rates of API calls or errors compared with a baseline.

Choosing

When to use it, and when not

Use it when

  • You need evidence of who changed permissions, keys, buckets or network settings, for an audit or an incident.
  • You need proof of who read sensitive data at the storage level, alongside Databricks audit logs.
  • You run a landing zone with many accounts and want one tamper-evident record in a log-archive account.
  • You want to react within minutes to risky changes, such as a bucket policy made public, through EventBridge rules.
  • A regulation asks you to keep access logs for years, with proof they were not altered.

Avoid it when

  • You want to log S3 data events on every bucket, including landing and bronze, which multiplies cost for little audit value.
  • You plan a new CloudTrail Lake setup; it is closed to new customers, so land trail files in S3 or use CloudWatch.
  • You want to know which person queried which table through Databricks; that is in the Databricks audit system table, not CloudTrail.
  • You need application-level logs, such as what a pipeline did; that belongs in the run log and CloudWatch Logs.

Production grade

What goes wrong in production

ProblemWhat breaksWhat to do
Data events costLogging every S3 read on busy buckets produces billions of events and a large bill.Use advanced event selectors to log data events only on restricted and personal-data buckets, and only the operations you need.
Role, not personCloudTrail shows the Unity Catalog storage credential's role reading a bucket, not the person behind the query.Join CloudTrail with Databricks audit system tables on time and resource, and treat any other role touching the bucket as a finding.
Trail turned off or changedAn attacker or a well-meaning admin stops logging or changes the trail to hide activity.Use an organization trail owned by the management account, deny StopLogging and DeleteTrail with SCPs, and alarm on those events.
Delivery delayEvents reach S3 a few minutes after the call, not instantly, so near-real-time rules see a lag.Use EventBridge for fast reactions to management events, and use trail files in S3 for the complete record and reports.
Format drift and nested JSONEvent fields vary by service and are nested, so reports break when a new field appears.Read trail files with Auto Loader into a bronze table with schema evolution, and build a small silver table with the fields the access report needs.
CloudTrail Lake closureTeams that planned to query events with CloudTrail Lake find it closed to new customers.Query trail files in Databricks or Athena, or move to CloudWatch as AWS recommends; existing Lake users can export to CloudWatch.

Alternatives

What to compare it with

AlternativePick the alternative whenPick CloudTrail when
Databricks audit system tablesYou need who read which table, column or volume through Unity Catalog, by person or service principal.You need storage-level, key-level and AWS configuration events.
Amazon CloudWatch (CloudTrail ingestion)You want AWS's recommended successor to CloudTrail Lake, with query, alerts and Iceberg access in one service.You already land trail files in S3 and analyse them in Databricks.
Amazon Athena over trail filesYou want quick ad hoc SQL over trail files in S3 without moving them.You need the access report joined with Databricks audit, which is easier in Databricks.
Azure Activity Log and diagnostic logsYou are on Azure.You are on AWS.
Google Cloud Audit LogsYou are on Google Cloud.You are on AWS.

Cost

How you pay

The 90-day event history is free. The first copy of management events delivered by a trail in each Region is free; extra copies are charged per 100,000 events. Data events and network activity events are charged per 100,000 events delivered. CloudTrail Insights is charged per event analysed. You also pay S3 storage for trail files and any CloudWatch Logs ingestion if you send events there. Check the CloudTrail pricing page for your region.

What drives the bill

  • Volume of S3 data events on the buckets you choose to log.
  • Extra trails that deliver second copies of management events.
  • S3 storage for years of trail files in the log-archive account.
  • CloudTrail Insights, if turned on for all event types.

Cost traps

  • Logging data events on all S3 buckets, including the busy landing and bronze buckets.
  • Two trails in the same Region both delivering management events, which charges the second copy.
  • Sending every event to CloudWatch Logs as well as S3 doubles ingestion cost.
  • No lifecycle rule on the trail bucket, so old files never move to cheaper storage classes.

Prices change; check the AWS pricing page for your region before deciding.

Security and governance

Keeping it safe

  • Use one organization trail into a dedicated log-archive account; workload admins get no write or delete rights on that bucket.
  • Turn on log file integrity validation, encrypt trail files with a KMS key in the log-archive account, and use S3 Object Lock where rules require it.
  • Protect the trail with SCPs that deny StopLogging, DeleteTrail and UpdateTrail outside the security team.
  • Send key management events to EventBridge and alert on risky changes, such as a KMS key scheduled for deletion or a bucket policy that allows public access.
  • Trail files contain IP addresses and user names, which can be personal data; restrict who can read them and set a retention period that matches policy.
  • Use a VPC endpoint for CloudTrail where services in private subnets call its API.

Operating it

What to watch, and the limits

WatchWhy
Trail logging statusIsLogging from GetTrailStatus; alarm if a trail stops logging.
LatestDeliveryErrorDelivery failures to S3, often from a changed bucket policy or KMS key policy.
StopLogging, DeleteTrail and UpdateTrail eventsChanges to the trail itself; alert security on any of them.
Unexpected roles on restricted bucketsRows in ops.fct_access where a role other than the Unity Catalog storage credential read a restricted bucket.
KMS Decrypt by principalWho used the restricted catalog's key; compare with the expected service roles.
Insights eventsUnusual API call or error rates flagged by CloudTrail Insights, if turned on.
LimitValue and notes
Trails5 per Region per account (cannot be increased)
Event history90 days of management events, free
Event size256 KB maximum per event (event version 1.05 and newer)
Data resources in basic event selectors250 across all event selectors in a trail
Advanced event selectors500 condition values in total per trail

Limits and quotas checked 2026-11-11; many can be raised through Service Quotas.

Decisions

Situations and verdicts

SituationChoiceVerdict
Landing zone audit for all accountsOrganization trail to the log-archive account, integrity validation, SCPs protecting itPursue: the base of every audit and incident question.
Proof of who read compound recipesS3 data events on the recipe bucket and KMS events on its key, joined with Databricks audit tables in ops.fct_accessPursue: shows reads that went around Unity Catalog.
S3 data events on landing and bronze bucketsNot logged; Databricks audit and the run log cover these pathsDrop: high cost and little audit value.
New SQL query store for audit eventsTrail files in S3 read by Databricks, or CloudWatch if a native AWS tool is requiredDrop CloudTrail Lake: closed to new customers since 31 May 2026.

FAQ

Questions people ask

Is CloudTrail Lake being discontinued?

CloudTrail Lake is closed to new customers since 31 May 2026. Existing customers can keep using it, with critical fixes only, and AWS recommends migrating to CloudWatch. CloudTrail itself, including trails and Insights, is fully supported.

Does CloudTrail log S3 reads by default?

No. S3 object reads and writes are data events, which are off by default. Turn them on for chosen buckets with advanced event selectors, and accept the per-event charge.

Can CloudTrail tell me which user queried a Databricks table?

Not directly. Databricks reads S3 with the Unity Catalog storage credential's role, so CloudTrail shows the role. The Databricks audit system table shows the person; join the two for the full picture.

How long does CloudTrail keep events?

Event history keeps 90 days of management events for free. A trail keeps events in your S3 bucket for as long as your lifecycle rules say.

How quickly do CloudTrail events arrive?

Trail files usually arrive in S3 within minutes of the call, though this is not guaranteed. For faster reactions, use EventBridge rules on CloudTrail management events.

Sources

Checked against

Checked 2026-11-11.

Related

Where it connects

AWS and Databricks reference platform · AWS Organizations, Control Tower and SCPs · AWS KMS · Amazon CloudWatch · Amazon Macie · All AWS data services

← AWS Backup · CloudWatch →