Easy ReviewDOP-C02
Monitoring and Logging57

CloudTrail

Record AWS account activity, retain audit evidence, and trigger security alerts.

CloudTrail records supported account activity. Use Event history for recent management events, trails for ongoing delivery to S3, and log-based or event-based rules for alerts. The sections explain event selection, organization coverage, encryption, integrity validation and CloudTrail Lake for existing customers.

CloudTrail basics

AWS CloudTrail is the audit log of an AWS account: it records who did what, when and from where through the console, CLI, SDKs and APIs.

How it works

  1. A user, role or AWS service calls an AWS APIAn interface through which software requests an action from a service..
  2. CloudTrail records the call as an event with the identity, time and source.
  3. Event history keeps 90 days of management events; a trail stores events in an S3 bucket for as long as you need.

Exam cues

  • If the question says who made a change or which API call happened, think CloudTrail, because it records account activity.
  • If the question says keep the activity log for years, think a CloudTrail trail to S3, because Event history keeps only 90 days.

Remember

  • Event history: 90 days of management events, free.
  • Trails store events in S3.

Trap: CloudTrail answers who did what. CloudWatch answers how resources perform, and AWS Config answers how a resource was configured over time.

From the AWS docs (7)
  • AWS CloudTrail records actions taken by users, roles and AWS services as events, whether they come from the console, the CLI, SDKs or APIs, to support auditing, governance and compliance.
  • Event history shows the last 90 days of management events in a Region, is on by default and costs nothing to view.
  • A trail delivers events to an Amazon S3 bucket for longer storage, optionally also to CloudWatch Logs and EventBridge.
  • CloudTrail Insights learns a baseline from past API activity and emits events when call or error rates depart from it.
  • Management API call-rate Insights require write management events and Insights enabled on the trail or source event data store.
  • Management API error-rate Insights require read or write management events, or both, with Insights enabled.
  • Insights logging is disabled by default and incurs additional charges when enabled.

Event history and event types

CloudTrail records supported activity in an AWS account so investigators can identify an action and its caller. An APIAn interface through which software requests an action from a service. is the interface a tool uses to ask a service to perform an action. CloudTrail events include API calls and some actions such as console sign-ins.

How it works

  1. A person, application or AWS service performs a supported action. CloudTrail records fields such as identity, event name, event time, Region and source IP address.
  2. Classify the event by what it describes. The control planeOperations that create, configure or manage resources. manages resources; the data planeOperations performed on or within a resource, such as reading an object. performs operations on those resources.
  3. Search Event history for recent management activity in the relevant account and Region. Use one attribute filter and a time range, or call LookupEvents.
  4. Use a trail or event data storeAn immutable collection of selected events retained for analysis. for an ongoing record beyond the history window. Athena can query trail files retained in S3. Event history · Athena queries
Category What it records Default trail coverage
Management Resource administration and console sign-ins Read and write events
Data Resource operations such as S3 object reads and Lambda invocations Must be enabled
Network activity API calls through VPC endpointsA private entry point used to reach supported AWS services from a VPC., private entry points to AWS services Must be enabled
Insights Call-rate or error-rate departures from normal activity Must be enabled

Exam cues

  • If the question says a security group changed outside a deployment, think CloudTrail management events, because the event identifies the caller and action.
  • If the question says the change occurred more than 90 days ago, think previously retained trail logs or an event data store, because Event history has a fixed window.
  • If the question says an object was downloaded, think data events, because object operations are data plane activity.

Remember

  • Event history: 90 days, management events, one account and Region per search.
  • One attribute filter plus a time range is available in an Event history search.
  • Data, network activity and Insights events are absent from the Event history console.

Trap: An organization trail does not turn Event history into an organization-wide search. Event history still covers the account being searched.

From the AWS docs (13)
  • CloudTrail records supported API and non-API account activity from the console, SDKs, command line tools and AWS services.
  • CloudTrail records the identity, event name, event time, AWS Region and source IP address for an event.
  • Management events describe resource administration, including security configuration and ConsoleLogin sign-in events.
  • Data events describe operations on resources, including S3 GetObject, PutObject and DeleteObject and Lambda Invoke.
  • Network activity events record API activity through VPC endpoints and require explicit logging configuration.
  • Insights events describe unusual API call rates or error rates relative to a learned baseline.
  • Event history automatically retains an immutable record of management events for the past 90 days in each AWS Region, without a trail.
  • Event history searches cover one account and one Region, allow one attribute filter plus a time range, and do not aggregate an organization.
  • The Event history console excludes data, network activity and Insights events.
  • LookupEvents retrieves recent events; an ongoing record beyond the Event history window requires a trail or event data store.
  • A trail without specific event selectors logs read and write management events, but no data or network activity events.
  • Amazon Athena can query CloudTrail log files stored in S3.
  • CloudTrail trails do not log Insights events by default.

Trails and event selectors

A trail is the CloudTrail configuration that sends selected events to S3 for an ongoing audit record. An event selectorA filter that determines which events CloudTrail records. is a filter that decides which activity the trail records.

How it works

  1. Choose the destination bucket and Region coverage. A multi-Region trail covers enabled Regions; the console creates this kind of trail.
  2. Choose the events. Without specific selectors, the trail records read and write management events. Add data events explicitly for object operations or function invocations.
  3. Narrow data collection with advanced selectors. An ARNA unique identifier for an AWS resource., or Amazon Resource Name, identifies a resource. Use the fields below to select its activity.
Selector field Meaning Example selection
eventCategory Category to collect Data
resources.type Resource kind AWS::S3::Object or AWS::Lambda::Function
resources.ARN Resource identifier or prefix StartsWith the chosen S3 prefix
eventName APIAn interface through which software requests an action from a service. operation Selected object operations
readOnly Read or write activity Read operations only

AWS data event selection · Advanced selector fields

Exam cues

  • If the question says audit one S3 prefix, think advanced data event selectors, because a resource ARN filter limits collection to that prefix.
  • If the question says audit a Lambda invocation, think data event selectors, because function invocations require explicit selection.
  • If the question says a trail was created in the console, think all enabled Regions, because console-created trails are multi-Region.

Remember

  • Data events are opt-in and incur additional charges.
  • Console-created trails cover all enabled Regions.
  • First copy of management events per Region: free. Duplicate trails for the same events: charged.
  • SNS can notify on each log file delivery (about every 5 minutes).

Trap: An existing trail is not evidence that an S3 download was recorded. Its data event selection must have included that operation when it happened.

From the AWS docs (10)
  • A trail configures ongoing delivery of selected CloudTrail events to an S3 bucket.
  • Trails created without specific selectors record all read and write management events, with no data or network activity events.
  • S3 object and Lambda invocation data events require explicit selection and incur additional charges.
  • Advanced selectors can select S3 object data events with eventCategory Data, resources.type AWS::S3::Object and resources.ARN StartsWith a bucket or object prefix.
  • Advanced selectors use resources.type AWS::Lambda::Function for Lambda function data events.
  • Advanced data event selectors can filter eventName and readOnly to include specific operations or read versus write activity.
  • Global service events are included by default in console-created trails; multiple single-Region trails should include them only once to avoid duplicates.
  • A trail created in the CloudTrail console applies to all enabled Regions (a multi-Region trail); a single-Region trail can only be created with the CLI or API.
  • The first copy of management events in each Region for an account is delivered free; more trails delivering the same management events, such as an extra single-Region trail beside a multi-Region trail, incur CloudTrail charges.
  • A trail can publish an Amazon SNS notification when CloudTrail delivers log files, which it does about every 5 minutes.

Log delivery and encryption

CloudTrail sends audit logs to S3 and can also send selected events to CloudWatch Logs for monitoring. Server-side encryptionEncryption applied to stored data by the destination service using KMS-managed or S3-managed keys. means the destination encrypts stored files: SSE-KMS uses an AWS KMS key, while SSE-S3 uses keys managed by S3.

How it works

  1. Configure the trail destination and encryption. The trail creation console enables SSE-KMS by default; disabling it selects SSE-S3.
  2. For SSE-KMS, choose a key in the bucket Region and authorize CloudTrail to generate data keys and describe the key. Readers need S3 read access and KMS decrypt permission. A disabled key or incorrect key policy blocks delivery.
  3. For CloudWatch Logs, select a log groupA CloudWatch Logs container for related log streams. in the current account and trail home RegionThe AWS Region where a trail was created.. A log group holds related event streams. Give CloudTrail a role it can assume with logs:CreateLogStream and logs:PutLogEvents on those streams. Include organization stream permissions for an organization trail.
  4. Allow for delivery delay and inspect eventTime when reconstructing events. CloudTrail files have no guaranteed event order. The CloudWatch console time column shows delivery time.
  5. If delivery fails, inspect GetTrailStatus. LatestDeliveryError reports S3 errors, while LatestCloudWatchLogsDeliveryError reports CloudWatch Logs errors. The S3 error field does not report request timeouts.

Exam cues

  • If the question says S3 access works but encrypted audit files cannot be read, think KMS decrypt permission, because reading the bucket and decrypting its files are separate permissions.
  • If the question says delivery stopped after a key was disabled, think restore the KMS configuration, because encrypted log delivery depends on an available, authorized key.
  • If the question says a delegated administratorA member account authorized to manage organization resources for a service. needs organization trail log integration, think CLI or APIAn interface through which software requests an action from a service., because console configuration is limited to the management accountThe account that manages an AWS Organizations organization..

Remember

  • S3 and CloudWatch Logs delivery average about 5 minutes; neither timing is guaranteed.
  • CloudTrail does not forward events larger than 256 KB to CloudWatch Logs or EventBridge.
  • The KMS key Region follows the S3 bucket Region.
  • CloudTrail retries delivery to a misconfigured S3 destination for 30 days; attempted deliveries are subject to standard CloudTrail charges.

Trap: A multi-Region trail does not let its S3 encryption key reside in any Region. The key must match the destination bucket Region.

From the AWS docs (19)
  • CloudTrail typically delivers logs to S3 about 5 minutes after an API call on average; delivery time is not guaranteed.
  • CloudTrail typically delivers events to CloudWatch Logs in about 5 minutes on average, without a guaranteed delivery time.
  • CloudTrail events in log files are not in a guaranteed order.
  • The eventTime field records when the API request completed in UTC.
  • The CloudWatch console Time UTC column for delivered CloudTrail events shows delivery time, not the original event time.
  • A CloudTrail trail must use a CloudWatch Logs group in the current account; console configuration selects a group in the trail home Region.
  • The delivery role trusts cloudtrail.amazonaws.com to assume it.
  • The delivery role needs logs:CreateLogStream and logs:PutLogEvents on the intended log streams.
  • An organization trail requires delivery role permissions for organization log streams.
  • Only the management account configures organization trail CloudWatch Logs integration in the console; a delegated administrator uses the CLI or API.
  • CloudTrail does not forward events larger than 256 KB to CloudWatch Logs or EventBridge.
  • The trail creation console enables SSE-KMS by default; disabling it uses SSE-S3 encryption for log and digest files.
  • The KMS key for CloudTrail S3 log encryption must be in the same Region as the destination bucket.
  • The KMS key policy must authorize CloudTrail to generate data keys and describe the key.
  • Reading KMS-encrypted CloudTrail log and digest files requires S3 read access and KMS decrypt permission.
  • A disabled KMS key or a key policy that does not authorize CloudTrail prevents encrypted log delivery.
  • CloudTrail retries delivery to a misconfigured S3 destination for 30 days, and attempted deliveries are subject to standard CloudTrail charges.
  • GetTrailStatus reports S3 errors in LatestDeliveryError and CloudWatch Logs errors in LatestCloudWatchLogsDeliveryError; the S3 field does not report request timeouts.
  • One copy of ongoing management events delivered to S3 by a trail is free; additional copies of management events, data events and network activity events are charged, and S3 storage is billed separately.

Log integrity and protection

CloudTrail log file integrity validation gives auditors evidence that delivered files stayed unchanged. A hashA fingerprint calculated from file contents to detect changes. is a fingerprint calculated from file contents. A signed digestA signed file that lists delivered logs and their hashes for integrity validation. is an index of those fingerprints whose signature can be checked. It acts as a tamper-evident seal on the archive.

How it works

  1. Enable integrity validation. CloudTrail calculates a SHA-256The hash algorithm CloudTrail uses to calculate log file fingerprints. hash for each delivered log file.
  2. Each hour, CloudTrail delivers a digest containing log references and hashes in a separate folder of the same bucket. It signs the digest using SHA-256 with RSA and links it to the previous digest signature.
  3. Validate separately. validate-logs checks the digests and the log files they reference.
  4. Apply storage protection as well. S3 Object Lock retains object versions using a write-once-read-many model, meaning a retained version cannot be overwritten or deleted under its protection. RetentionThe length of time stored events are kept. periods and legal holdsProtection that keeps an object version locked until the hold is removed. control how long protection applies. CLI validation · Object Lock

Exam cues

  • If the question says prove audit files were not altered, think integrity validation followed by validate-logs, because signed digests provide the evidence the validator checks.
  • If the question says prevent permanent deletion of retained versions, think S3 Object Lock, because a digest supplies detection evidence rather than a storage lock.
  • If the question says validation was enabled but no validator ran, think separate validation, because digest delivery alone does not validate the files.

Remember

  • Hash: SHA-256. Digest signature: SHA-256 with RSA. Digest delivery: hourly.
  • Enabling digest delivery and running validation are separate actions.
  • MFA Delete adds protection for digest files.

Trap: Integrity validation detects changes or deletion; it does not prevent deletion. Use storage protection as well.

From the AWS docs (9)
  • CloudTrail log file integrity validation detects modification or deletion after delivery.
  • CloudTrail integrity validation uses SHA-256 hashes for log files.
  • CloudTrail delivers a digest file each hour containing references and hashes for delivered log files.
  • CloudTrail signs digests using SHA-256 with RSA, and each digest includes the previous digest signature when one exists.
  • Digest files arrive in the same S3 bucket as logs but in a separate folder.
  • Enabling integrity validation creates digest files but does not itself validate delivered files.
  • The validate-logs CLI command checks digest files and referenced log files for modification or deletion.
  • S3 Object Lock uses write-once-read-many storage to protect object versions against deletion or overwrite for a retention period or legal hold.
  • AWS recommends S3 MFA Delete as an additional security measure for stored CloudTrail digest files.

API event alerts

CloudTrail events can drive notifications or automated responses. A metric filterA pattern that turns matching log events into metric values. counts log records matching a pattern; an alarm evaluates that metric. EventBridge uses rules to match events on an event busAn EventBridge destination where events arrive before rules route them to targets., the place events enter its routing system, and sends matches to targets. CloudWatch alert examples · EventBridge integration

How it works

  1. Keep a trail logging the activity of interest. For CloudWatch alarms, configure delivery to a CloudWatch Logs group.
  2. Match security changes with a metric filter on eventName. The root user has unrestricted account access. To monitor root usage, AWS documents a filter on userIdentity.type = Root that excludes service-invoked activity and AwsServiceEvent records. Attach an alarm and SNS notification.
  3. For an event-driven response, match CloudTrail-derived events on the default EventBridge bus. APIAn interface through which software requests an action from a service. requests use AWS API Call via CloudTrail; sign-in attempts use AWS Console Signin via CloudTrail. A Lambda function can be the target.
  4. Set the rule state for the activity being watched. Read-only management calls need the special state below; data calls must also be selected by the trail.
Activity Trail requirement EventBridge rule state
Write management event Logging enabled ENABLED
Read-only management event Logging enabled ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS
Data event Relevant data type selected ENABLED

For new log groupsA CloudWatch Logs container for related log streams., a rule can match CreateLogGroup and invoke Lambda to call PutSubscriptionFilter, attaching a subscription that streams matching logs to Firehose. A subscription is an ongoing log-delivery connection. EventBridge targets · Subscription API · CloudWatch Logs events

For AWS Organizations API activity, configure CloudTrail and EventBridge monitoring in us-east-1. An SNS topic can receive matching events for notifications.

Exam cues

  • If the question says send email for security group changes, think metric filter, alarm and SNS, because CloudWatch converts matching audit records into an alarm signal.
  • If the question says automate a reaction to an API request, think an EventBridge rule and Lambda target, because the rule can route the matching CloudTrail event.
  • If the question says detect a stopped trail and restore it, think periodic cloudtrail-enabled evaluation plus separately configured remediationAn action configured to correct a resource that fails a compliance rule., because compliance evaluation alone does not restart logging. StartLogging resumes an existing trail. Config rule · Remediation

Remember

  • CloudTrail-derived EventBridge events require an active trail and enter the default bus.
  • Forwarded read-only management events need the special state on both the forwarding and destination rules.
  • The cloudtrail-enabled Config rule runs periodically; remediation is a separate configuration.

Trap: A default ENABLED EventBridge rule does not match read-only management events even when the trail records them.

React to a CloudTrail API event
12CloudTrailtrail loggingiEventBridgedefault bus ruleiLambdaresponse functioni
  1. CloudTrail sends the event to the default EventBridge bus.

  2. The rule matches the event and invokes its Lambda target.

Box details (3)
CloudTrail

The trail must capture the activity of interest.

EventBridge

Match API events by detail-type and event details. Read-only management events require the special rule state.

Lambda

The matched rule invokes the configured Lambda target.

From the AWS docs (18)
  • A CloudWatch Logs metric filter turns matching CloudTrail log events into a metric that a CloudWatch alarm can evaluate.
  • CloudTrail security group configuration changes can be matched by eventName and connected to a CloudWatch alarm and SNS notification.
  • AWS documents a metric filter on userIdentity.type Root, excluding service-invoked and AwsServiceEvent activity, with an alarm and SNS topic for root usage.
  • CloudTrail-derived EventBridge events require a trail with logging enabled.
  • CloudTrail events arrive on the default EventBridge event bus; a rule can forward them to another bus.
  • EventBridge uses AWS API Call via CloudTrail for API calls and AWS Console Signin via CloudTrail for sign-in attempts.
  • EventBridge rules in ENABLED state match CloudTrail write management events.
  • Read-only management events require EventBridge rule state ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS, including both forwarding and destination rules when forwarding.
  • CloudTrail data events match normally enabled EventBridge rules only if the trail captures the relevant data event types.
  • An EventBridge rule can invoke a Lambda function as a target.
  • Organization trails cover the management and member accounts and members cannot change the trail.
  • The cloudtrail-enabled AWS Config rule evaluates periodically and reports NON_COMPLIANT when a trail is not enabled.
  • AWS Config remediation actions must be configured separately and use Systems Manager Automation documents.
  • StartLogging begins recording and log delivery for an existing trail.
  • CloudWatch Logs records CreateLogGroup API calls as CloudTrail events.
  • PutSubscriptionFilter attaches a real-time CloudWatch Logs subscription, with Firehose supported as a destination.
  • AWS Organizations activity monitoring with CloudTrail and EventBridge is configured in us-east-1, and an SNS topic can receive matching events.
  • The root user has unrestricted access to services and resources in its AWS account.

Insights

CloudTrail Insights detects unusual APIAn interface through which software requests an action from a service. call rates and error rates. Its baselineThe normal API activity pattern learned from past events. is the normal activity pattern learned from past events, so the feature looks for departures from that pattern.

How it works

  1. Record the supporting activity and enable Insights. The table shows which inputs each detector needs.
  2. CloudTrail learns normal call and error patterns from past activity.
  3. When current activity departs from that baseline, CloudTrail generates an Insights event in the Region of the supporting events.
Detector Supporting activity Where supported
Management call rate Write management calls Trail or source event data storeAn immutable collection of selected events retained for analysis.
Management error rate Read or write management calls, or both Trail or source event data store
Data call or error rate Relevant data events Trail only

Exam cues

  • If the question says a burst of write API calls differs from normal behavior, think call-rate Insights, because it compares current volume with a learned baseline.
  • If the question says API errors increased unusually, think error-rate Insights, because it compares errors with past patterns.
  • If the question says detect unusual S3 data API volume, think trail data event Insights, because event data stores do not support that detector.

Remember

  • Insights is opt-in and incurs additional charges.
  • Trail delivery can take up to 36 hours after enablement or restart, and only produces events when unusual activity is detected.
  • Lake uses a source and destination event data store and can take up to 7 days under the same condition.

Trap: Enabling management call-rate Insights on a trail that records only read calls does not supply its required write-event input.

From the AWS docs (6)
  • CloudTrail Insights learns a baseline from past API activity and emits events when call or error rates depart from it.
  • Management API call-rate Insights require write management events and Insights enabled on the trail or source event data store.
  • Data event Insights require a trail logging the relevant data events and support call-rate and error-rate detection; event data stores do not support data event Insights.
  • An Insights event is generated in the same Region as its supporting events.
  • Trail Insights delivery can take up to 36 hours after first enabling or restarting Insights, provided unusual activity is detected.
  • Lake Insights delivery uses a source and destination event data store and can take up to 7 days after enabling or restarting, provided unusual activity is detected.

Lake

CloudTrail Lake lets existing customers analyze retained audit events with SQLA language used to select and analyze stored records., a language for selecting and combining stored records. It stores selected events in an event data storeAn immutable collection of selected events retained for analysis., an immutable collection whose retained records cannot be changed.

How it works

  1. Choose the events using advanced selectors. An organization event data store can collect activity across accounts and Regions.
  2. Lake converts JSON records into Apache ORCA storage format that organizes data by columns for querying., a columnar format that organizes stored data by field for queries. Previously retained trail events can also be copied into a store.
  3. Choose the retentionThe length of time stored events are kept. pricing option, which determines how long events can remain available. Retention means how long stored events are kept.
  4. Query the retained events with SQL. Charges depend on data scanned. Stores are encrypted by default; once a customer KMS key is associated, it cannot be removed or changed. Stores · Queries

Since May 31, 2026, Lake has been closed to new customers. Existing customers retain access, with critical bug fixes and security updates. Existing organization stores support new member accountsAn AWS account that belongs to an AWS Organizations organization.; account-level stores do not extend ingestion to newly added organization accounts. CloudTrail trails and Insights remain available.

Exam cues

  • If the question says an existing Lake customer needs SQL over organization activity, think an organization event data store, because it collects across accounts and Regions.
  • If the question says account-level stores must cover newly added accounts, think organization store coverage, because account-level stores do not extend to those accounts after the availability change.
  • If the question says swap the KMS key associated with a store, think an immutable key association, because Lake does not allow removing or replacing that key.

Remember

  • One-year extendable retention pricing: maximum 3,653 days.
  • Seven-year retention pricing: maximum 2,557 days.
  • SQL query charges follow data scanned.
  • New-customer closure: May 31, 2026. Older questions may describe Lake as available to new customers.

Trap: The Lake availability change applies to Lake. It does not mean that CloudTrail trails or Insights have closed.

From the AWS docs (12)
  • CloudTrail Lake supports SQL queries over events and converts row-based JSON to columnar Apache ORC format.
  • A Lake event data store is an immutable collection of events selected through advanced event selectors.
  • The One-year extendable retention pricing option allows retention up to 3,653 days.
  • The Seven-year retention pricing option allows retention up to 2,557 days.
  • An organization event data store can collect events from multiple accounts and Regions.
  • CloudTrail Lake queries are billed according to data scanned.
  • Previously retained trail events can be copied into a new or existing event data store.
  • Lake event data stores are encrypted by default; an associated customer KMS key cannot later be removed or changed.
  • CloudTrail Lake closed to new customers on May 31, 2026; existing customers retain access and Lake receives critical bug fixes and security updates.
  • Existing organization event data stores continue to support new member accounts and expansion to additional Regions.
  • Existing account-level event data stores support their existing accounts and additional Regions but do not extend ingestion to newly added organization accounts.
  • The Lake availability change does not close CloudTrail trails or Insights.

Organization trails

An organization trail applies CloudTrail event collection across an AWS Organizations organization, a group of centrally managed AWS accounts. A delegated administratorA member account authorized to manage organization resources for a service. is a member accountAn AWS account that belongs to an AWS Organizations organization. authorized to manage CloudTrail organization resources.

How it works

  1. The management accountThe account that manages an AWS Organizations organization. or a CloudTrail delegated administrator creates the organization trail and chooses the event selection and destinations.
  2. For enabled Regions, use a multi-Region trail. The console creates this type; the CLI also supports single-Region trails. If the home RegionThe AWS Region where a trail was created. requires explicit opt-in, each member must enable it before contributing any activity.
  3. CloudTrail adds trail copies to member accounts. New members receive the trail and its required service-linked roleAn IAM role linked to an AWS service so that the service can perform its required tasks., an IAM roleAn identity with permissions that another identity or service can assume to perform tasks. used by the service, and logging starts automatically.
  4. Collect files in S3 under paths containing the organization and account IDs. Optionally add hourly signed digestsA signed file that lists delivered logs and their hashes for integrity validation. and CloudWatch Logs delivery. That delivery needs permissions for organization log streams. File paths · Organization log permissions
  5. Inspect delivery status and destination permissions. The presence of a trail copy does not prove that its bucket or KMS configuration allows delivery.

Exam cues

  • If the question says member administrators must not disable auditing, think organization trail, because members cannot change its logging configuration.
  • If the question says new accounts need automatic audit coverage, think organization trail, because CloudTrail adds the trail and service-linked role automatically.
  • If the question says some accounts send nothing from a trail based in an opt-in RegionAn AWS Region that an account must explicitly enable before using it., think home Region activation, because members must enable that Region.

Remember

  • An organization trail includes the management account and member accounts, for the selected events.
  • Members can view the trail with permission, but cannot stop logging, edit it or delete it.
  • get-trail-status helps distinguish a visible trail from working delivery.

Trap: Central trail administration does not remove destination permission failures. S3, CloudWatch Logs and KMS errors can still prevent delivery.

Organization trail and centralized audit
1234Member accountsselected activityiOrganization trailenabled RegionsiS3 bucketorganization/account pathiCloudWatch Logsoptional deliveryiMetric alarmsecurity changesi
  1. The trail records selected organization activity.

  2. CloudTrail delivers the log files to S3.

  3. Optional CloudWatch Logs delivery uses a role authorized for organization streams.

  4. A metric filter supplies a security-change metric for an alarm.

Box details (5)
Member accounts

New members receive the organization trail automatically. Member users cannot change its settings.

Organization trail

The management account or a delegated administrator manages the trail. Members must enable an opt-in home Region.

S3 bucket

The organization and account IDs identify the log path. Integrity validation adds signed hourly digests. A KMS key must be in the bucket Region.

CloudWatch Logs

The delivery role policy must allow the organization log streams.

Metric alarm

A metric filter converts matching events into a metric for an alarm.

From the AWS docs (12)
  • An organization trail records selected events for the management account and member accounts in an AWS Organizations organization.
  • The management account or a CloudTrail delegated administrator can create and manage organization trails.
  • Console-created organization trails are multi-Region and cover enabled Regions; the CLI can create single-Region or multi-Region trails.
  • Member-account users with CloudTrail permissions can view an organization trail but cannot modify, delete, start or stop it.
  • New organization members receive the organization trail and required AWSServiceRoleForCloudTrail service-linked role automatically, and logging starts automatically.
  • If a multi-Region organization trail has an opt-in home Region, member accounts must enable that Region before they send any activity to the trail.
  • An organization trail copy can exist despite S3, SNS, CloudWatch Logs or KMS validation errors; get-trail-status exposes delivery problems.
  • Organization log file paths include AWSLogs, organization ID, account ID, CloudTrail and Region.
  • CloudWatch Logs delivery requires an IAM role policy that permits organization log streams as well as the selected log group.
  • A metric filter on CloudTrail events delivered to CloudWatch Logs can feed an alarm for security changes.
  • Enabling integrity validation adds signed hourly digest files to the same S3 bucket as the logs.
  • The KMS key used to encrypt CloudTrail log and digest files must be in the destination bucket's Region.

Trail operations and validation

CloudTrail trail operations determine which events are recorded, where to look for them, and how to validate delivered logs. Check the trail configuration and validation evidence together when investigating a gap. Trail concepts · CLI validation

How it works

  1. Choose Region coverage. A multi-Region trail covers enabled Regions. The console creates multi-Region trails, while CreateTrail defaults to a single Region unless IsMultiRegionTrail is enabled. Trail concepts · CreateTrail
  2. Set event selectorsA filter that determines which events CloudTrail records.. A trail without specific selectors records read and write management events, but no data or network activity events. Advanced selectors replace basic selectors, so include the management events still needed. For S3 object data, use eventCategory: Data, resources.type: AWS::S3::Object and a resources.ARN prefix. PutEventSelectors · Data events
  3. Start recording. CLI trail creation and starting logging are separate operations. Call StartLogging in the home RegionThe AWS Region where a trail was created. of a multi-Region trail to begin recording and delivery. CLI trail operations · StartLogging
  4. Validate logs with validate-logs. The CLI needs online access, read permission, and log and digest files in their original S3 locations. It checks only logs referenced by digests. Pass --trail-arn and --start-time, add --account-id for an organization trail, and use --region to select the Region.

Exam cues

  • If the question says a trail logs its own S3 deliveries repeatedly, think RecursiveLogging: false, because it suppresses CloudTrail delivery events while preserving other callers’ events.
  • If the question says find an STS request, think about the endpoint: global endpoint requests are logged in us-east-1, while Regional endpoint requests are logged in their respective Region.
  • If the question says a digest is missing or its signature is invalid, think validation failure, because the affected files’ integrity is not established.

Remember

  • RecursiveLogging defaults to true. Setting it to false suppresses CloudTrail-invoked S3 PutObject and CloudWatch Logs PutLogEvents delivery events. CreateTrail · Recursive logging
  • Disabling validation breaks the digest chain after one hour. Files delivered while validation was disabled do not get digests.

Trap: Reenabling validation does not create digests for the disabled period. A missing or modified digest also cannot establish the integrity of affected files.

From the AWS docs (15)
  • An invalid signature, modified or missing digest, or missing log file is a validation failure and does not establish log integrity for affected files.
  • AWS CLI validation requires online access, read permission and log and digest files in their original S3 locations; it checks only logs referenced by digests.
  • validate-logs requires trail-arn and start-time; organization trails also require account-id, and region selects the Region being validated.
  • Disabling validation breaks the digest chain after one hour, and CloudTrail does not create digests for files delivered while validation was disabled.
  • Logging S3 data events on the trail destination bucket can record CloudTrail PutObject deliveries and create repeated delivery events.
  • RecursiveLogging false suppresses CloudTrail-invoked S3 PutObject and CloudWatch Logs PutLogEvents delivery events while preserving other callers' events.
  • Advanced selectors can select S3 object data events with eventCategory Data, resources.type AWS::S3::Object and resources.ARN StartsWith a bucket or object prefix.
  • CloudTrail logs STS global endpoint requests in us-east-1, while Regional STS endpoint requests are logged in their respective Region.
  • A multi-Region trail covers enabled Regions; all trails created in the CloudTrail console are multi-Region.
  • A trail uses basic or advanced selectors, not both; applying advanced selectors overwrites basic selectors.
  • Trails created without specific selectors record all read and write management events, with no data or network activity events.
  • Trail creation and starting event logging are separate CLI operations: create-trail and start-logging.
  • StartLogging starts API recording and log delivery for an existing trail and must be called in the home Region for a multi-Region trail.
  • RecursiveLogging defaults to true on trails.
  • CreateTrail defaults IsMultiRegionTrail to false, creating a single-Region trail unless the setting is enabled.

Flashcards

tap to flip
Answer

·

All 57 cards as a list

An auditor asks who deleted an S3 bucket yesterday in an AWS account. Which service answers it?

AWS CloudTrail, which records API calls with the identity, time and source of each action.

How far back can AWS CloudTrail Event history show management events without any setup?

90 days, per Region, at no charge. Keeping events longer needs a trail to an S3 bucket.

Does Amazon CloudWatch or AWS CloudTrail record which IAM user called an AWS API?

AWS CloudTrail. CloudWatch monitors metrics and logs about resource performance.

What does CloudTrail Insights detect, and which management events must be recorded first?

Call-rate or error-rate deviations from a learned baseline. Management call-rate Insights need write events; error-rate Insights need read or write events, or both. Enable Insights explicitly.

A security group was changed outside a CloudFormation deployment yesterday. How can investigators identify the caller?

Search CloudTrail management events for the change, then inspect the identity and event time.

What does CloudTrail Event history retain without configuring a trail?

The past 90 days of management events in each Region for the current account. It is an immutable record.

Does a default CloudTrail trail record S3 object reads and VPC endpoint API activity?

No. It records read and write management events. Data and network activity logging require configuration.

Investigators need a CloudTrail security configuration change from more than 90 days ago. Where should they search?

Search previously retained trail logs in S3 with Athena, or a retained event data store. Event history has only 90 days.

Which CloudTrail event category records S3 GetObject and Lambda Invoke?

Data events. They record operations on resources.

An auditor searches CloudTrail Event history in the management account but cannot find member-account changes. What explains this?

Event history searches one account and Region. It does not aggregate organization events.

A CloudTrail trail existed before an S3 download, but S3 data events were disabled. Can its management events identify the download?

No. S3 GetObject is a data event and had to be selected when the request occurred.

How can a CloudTrail trail audit reads of one S3 object prefix and invocations of one Lambda function?

Use advanced data event selectors. Select AWS::S3::Object or AWS::Lambda::Function and restrict resources.ARN. Use readOnly or eventName to narrow activity.

How does a CloudTrail trail capture S3 GetObject and DeleteObject for a chosen bucket?

Enable S3 object data events for that bucket. Data event logging is opt-in and incurs additional charges.

A trail is created in the CloudTrail console. Which Regions does it log?

All enabled Regions. Console trails are multi-Region; a single-Region trail needs the CLI or API.

An account has a multi-Region CloudTrail trail for management events and adds a second, single-Region trail with the same events. Is the second trail free?

No. Only the first copy of management events per Region is free; the duplicate delivery incurs CloudTrail charges.

A team wants an automated process to start each time AWS CloudTrail delivers new log files to S3. What can the trail send?

An Amazon SNS notification on each log file delivery.

How soon should a CloudTrail event reach S3 or CloudWatch Logs, and which time should investigators use?

About 5 minutes on average, without a guarantee. Use eventTime for request completion time; the CloudWatch console delivery time and file ordering do not establish event order.

A CloudTrail trail must deliver events to CloudWatch Logs. Which destination and IAM settings are needed?

A log group in the current account and trail home Region, plus a role trusted by cloudtrail.amazonaws.com with logs:CreateLogStream and logs:PutLogEvents. Organization streams need matching policy permissions.

Which large CloudTrail events are not forwarded to CloudWatch Logs or EventBridge?

Events larger than 256 KB. This is the documented CloudTrail forwarding cutoff.

An auditor can read the CloudTrail S3 bucket but cannot open its SSE-KMS log files. Which additional permission is required?

KMS decrypt permission for the encryption key. S3 read permission alone is insufficient.

A multi-Region CloudTrail trail delivers to a bucket in one Region. Where must its S3 encryption KMS key be located?

In the destination bucket Region. The trail collecting events from other Regions does not change that requirement.

A delegated administrator cannot configure CloudWatch Logs for a CloudTrail organization trail in the console. What supported route should it use?

Use the AWS CLI or CloudTrail CreateTrail or UpdateTrail API. Only the management account configures this integration in the console.

What encryption does the CloudTrail creation console select by default, and what happens if that option is disabled?

SSE-KMS is enabled by default. Disabling it uses SSE-S3 for log and digest files.

A CloudTrail trail cannot deliver logs because its S3 bucket policy is incorrect. What happens while delivery remains misconfigured?

CloudTrail retries S3 delivery for 30 days, and attempted deliveries are subject to standard CloudTrail charges. Repair the bucket policy.

A CloudTrail organization trail delivers to S3 but not CloudWatch Logs. Which status field helps identify the CloudWatch failure?

Inspect LatestCloudWatchLogsDeliveryError with GetTrailStatus, then repair the CloudWatch Logs role policy.

An organization trail already logs management events, and each account also creates its own trail for them. What does that cost?

The extra trails deliver additional copies of management events, which are charged; only one copy is free. S3 storage is billed too.

How can auditors detect whether CloudTrail files changed after delivery?

Enable log file integrity validation, retain hourly signed digests, then run validate-logs. Log hashes use SHA-256 and digest signatures use SHA-256 with RSA.

Does enabling CloudTrail integrity validation stop audit log deletion?

No. It provides evidence for detecting changes or deletion. Protect stored versions separately with S3 Object Lock retention or legal holds.

An audit archive needs tamper detection and protection against permanent deletion of stored CloudTrail versions. Which controls address both needs?

Use integrity validation with validate-logs for detection, and S3 Object Lock retention or legal holds for version protection.

A team enables CloudTrail integrity validation but never runs a validator. Has CloudTrail already validated its archive?

No. Enabling the feature delivers digest files. Validate the files separately with the CLI or a custom validator.

How can CloudTrail generate a notification when someone changes a security group or uses root credentials?

Deliver the trail to CloudWatch Logs, create a matching metric filter, and connect its metric to a CloudWatch alarm and SNS topic.

An active CloudTrail trail records read-only management calls, but an enabled EventBridge rule never invokes its target for them. What setting is missing?

Set the rule state to ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS. The ordinary ENABLED state does not match read-only management events.

An AWS organization needs central auditing plus notifications about root usage. Which CloudTrail design fits?

Use an organization trail, deliver to CloudWatch Logs, and add a root-usage metric filter, alarm and SNS topic. Members cannot change the trail.

An AWS Config cloudtrail-enabled rule reports a stopped trail. Will evaluating the rule restart logging?

No. Evaluation reports compliance. Configure remediation separately; StartLogging resumes an existing trail.

A team forwards CloudTrail read-only management events to another EventBridge bus. Which rules need the special management-event state?

Both the forwarding rule on the default bus and the matching rule on the destination bus need ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS.

A team wants new CloudWatch log groups subscribed to Firehose automatically. How can it react to their creation using CloudTrail?

Match CreateLogGroup in an EventBridge rule and invoke Lambda to call PutSubscriptionFilter for the new group. Keep the CloudTrail trail logging.

A team wants notifications when an AWS Organizations member attempts to leave. In which Region should it configure CloudTrail and EventBridge monitoring?

Use us-east-1, US East (N. Virginia). Match the Organizations activity and route it to an SNS topic for notification.

A CloudTrail trail records only read management calls. A team wants call-rate Insights. What must change?

Enable write management event logging and Insights. Management call-rate Insights analyze write calls.

A team needs CloudTrail Insights for an unusual rate of S3 data calls. Should it configure data event Insights on an event data store?

No. Use a trail logging the data events and enable Insights there. Data event Insights are not supported on event data stores.

A CloudTrail trail has no Insights events immediately after Insights is enabled. Does that prove a delivery failure?

No. Initial delivery can take up to 36 hours, and Insights events appear only when unusual activity is detected.

An existing CloudTrail Lake customer needs SQL analysis over retained activity from multiple organization accounts. Which feature fits?

An organization event data store. Lake stores immutable selected events in ORC and supports SQL queries. Maximum retention is 3,653 or 2,557 days depending on pricing. Lake closed to new customers on May 31, 2026.

An existing CloudTrail Lake customer has only account-level event data stores and adds organization accounts after the availability change. Will those stores ingest the new accounts' events automatically?

No. Existing account-level stores do not extend ingestion to newly added accounts. An organization event data store provides that organization coverage.

How can an existing CloudTrail Lake customer analyze events collected across accounts and Regions?

Use an organization event data store to collect the events and run SQL queries in CloudTrail Lake.

A team needs to analyze older trail events with SQL in CloudTrail Lake. How can it make those events available?

Copy the previously retained trail events into a new or existing event data store, then query them.

An AWS organization needs management event logging for all accounts and enabled Regions, including future members. What should it configure?

A multi-Region organization trail, created by the management account or a CloudTrail delegated administrator. New members receive the trail automatically.

Can an administrator in a member account disable the CloudTrail organization trail?

No. Members can view it with CloudTrail permissions, but cannot change or delete it or turn logging on or off.

A multi-Region CloudTrail organization trail has its home in an opt-in Region. Some members send no activity. What must be checked?

Confirm those member accounts enabled the home Region. Without that opt-in they do not send activity to this trail.

A CloudTrail organization trail appears in a member account, but no logs arrive. Does the trail copy prove delivery works?

No. Check get-trail-status and destination permissions. Trail copies can exist despite S3, CloudWatch Logs or KMS errors.

CloudTrail validate-logs reports an invalid or missing digest. Can the affected log files be treated as proven unchanged?

No. The affected integrity evidence failed. The CLI checks only digest-referenced logs and requires the original S3 locations.

An auditor validates one member account's CloudTrail organization logs using the CLI. What additional selector is required?

Pass --account-id for that member account, along with --trail-arn and --start-time. Use --region for the Region being validated.

A team disables CloudTrail log file integrity validation for a week and then reenables it. Can it validate the gap with newly generated digests?

No. CloudTrail does not create digests for files delivered while validation was disabled; the digest chain breaks after one hour.

A CloudTrail trail records its own S3 log deliveries as data events. How can it suppress that repeated activity?

Set RecursiveLogging to false. CloudTrail suppresses its own delivery events; other callers remain logged. A destination excluded from the S3 selector also avoids the loop.

Does CloudTrail log every STS request in us-east-1, even when the caller uses a Regional STS endpoint?

No. Global endpoint requests are logged in us-east-1; Regional endpoint requests are logged in their respective Region. Use a multi-Region trail for enabled Regions.

A team applies advanced data selectors to a CloudTrail trail that used basic management selectors. What must it preserve explicitly?

Include the required management selection in the new configuration. Advanced selectors overwrite basic selectors.

Automation recreates a CloudTrail trail through the CLI after deletion. Which additional operation begins recording and log delivery?

Call StartLogging for the new trail. For a multi-Region trail, call it in the home Region.

What is the default RecursiveLogging value on a CloudTrail trail?

True. Set it to false to suppress CloudTrail-generated delivery events.

A team creates a CloudTrail trail using CreateTrail without setting IsMultiRegionTrail. Does it collect events in all enabled Regions?

No. The API defaults to a single-Region trail. Set IsMultiRegionTrail to true for multi-Region coverage.

You finished every topic of DOP-C02!

Your badge turned gold. Next step: book the exam on AWS. Once you pass, add yourself to Who passed.

Share

Share that you finished this certification

I finished every topic of AWS Certified DevOps Engineer - Professional (DOP-C02) on Easy Review. Come study too!