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.
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
- 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.
- 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.
- Search Event history for recent management activity in the relevant account and Region. Use one attribute filter and a time range, or call
LookupEvents. - 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.
Da documentação da AWS (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
- Choose the destination bucket and Region coverage. A multi-Region trail covers enabled Regions; the console creates this kind of trail.
- Choose the events. Without specific selectors, the trail records read and write management events. Add data events explicitly for object operations or function invocations.
- 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.
Da documentação da AWS (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 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
- Enable integrity validation. CloudTrail calculates a SHA-256The hash algorithm CloudTrail uses to calculate log file fingerprints. hash for each delivered log file.
- 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.
- Validate separately.
validate-logschecks the digests and the log files they reference. - 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.
Da documentação da AWS (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.
Flashcards
Nada para revisar aqui agora. Escolha outros tópicos ou outro filtro.
·
Todos os 16 flashcards em lista
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 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.