Topic lessonTopic: CloudWatch, CloudTrail, Config and incident investigation
CloudTrail vs AWS Config: activity records and configuration history
CloudTrail helps investigate who or what requested an operation; AWS Config helps examine how a recorded resource was configured. An activity record alone does not establish current configuration, and configuration history alone does not identify a human actor. Follow one security-group change to see how the two records complement each other.
Choose the appropriate evidence, align subject, timestamps and collection conditions, and explain what activity and configuration differences establish.
Know AWS resources, accounts, Regions and security-group permission rules. No AWS account is needed. Read fixed documentation examples; this page does not receive real logs or change AWS settings.
Choose activity evidence or configuration evidence
- Your question → CloudTrailInvestigate activity
- Your question → AWS ConfigInvestigate configuration
- Your question
- Actor and action, or resource configuration?
- CloudTrail
- Read the recorded action, identity and outcome.
- AWS Config
- Read recorded configuration, relationships and history.
| Question | Primary evidence | Not established by that evidence alone |
|---|---|---|
| Which credentials requested an operation? | Relevant CloudTrail events, including action and outcome. | Conclusive human identity, current configuration or application effects. |
| How was this resource configured earlier? | AWS Config records and history for the resource in scope. | Every point in time, the acting identity or successful traffic. |
| Did application responses or errors change? | Metrics and application logs aligned by subject and time. | Activity/configuration records alone do not establish every aspect of health. |
CloudTrail records activity by users, roles and AWS services. Config records configuration and relationships for supported resources in scope. Neither replaces every other source of evidence. Combine the required records and retain gaps as unknowns.
Read a Config configuration item
A configuration item (CI) is a Config record for a resource. Inspect its identity, configuration, relationships and recording time. Similar-looking security-group names in different accounts, Regions or resource IDs do not identify the same comparison subject.
| Check | Example CI field | Interpretation |
|---|---|---|
| Same subject? | accountId / awsRegion / resourceType / resourceId | Align account, Region, resource type and ID. |
| What configuration? | configuration | Resource-specific configuration; the API represents it as a JSON-encoded string. |
| Related resources? | relationships | Relationships recorded in this CI, not a complete application-dependency model. |
| When recorded? | configurationItemCaptureTime | When recording of configuration changes was initiated; not the API-operation timestamp. |
| What record status? | configurationItemStatus | A status for configuration update, discovery or deletion; OK does not mean secure or healthy. |
Do not rely on a CI’s relatedEvents as an automatic CloudTrail join. The documented field is empty from version 1.3 onward. Empty does not establish that no operation occurred. Correlate the required events separately by subject, time and content.
Fixed example: adding 8080 alongside 443
- C1: 10:00 UTC → T1: 10:02 UTCRead the next record
- T1: 10:02 UTC → C2: 10:06 UTCCompare the later configuration
- C1: 10:00 UTC
- Config records an inbound TCP 443 permission.
- T1: 10:02 UTC
- Stipulated successful request to add 8080.
- C2: 10:06 UTC
- Config records inbound TCP 443 and 8080.
| Record | Stipulated content | Interpretation |
|---|---|---|
| C1 / Config | 10:00 UTC record: allow inbound TCP 443 from 192.0.2.0/24. | The earlier record includes 443. |
| T1 / CloudTrail-side record | 10:02 UTC: a successful AuthorizeSecurityGroupIngress operation adds TCP 8080. | Read action and outcome; success is a given, not inferred from the action name. |
| C2 / Config | 10:06 UTC record: allow inbound TCP 443 and 8080 from the same source. | The difference is added 8080; 443 remains. |
CloudTrail eventTime is when the request completed; Config configurationItemCaptureTime is when recording of configuration changes was initiated. The 10:02-to-10:06 interval is neither a four-minute delivery guarantee nor measured change duration. In actual investigation, correlate subject, request, outcome and configuration rather than joining by nearby timestamps alone.
When a record is missing, check collection conditions
| Check | What to establish |
|---|---|
| Subject | Correct account/Region/resource ID? Is this resource type recorded? |
| Start and operation | When did recording start? Is the relevant recorder operating with required permissions? |
| Frequency | Continuous or Daily? Do another recorder or resource-specific conditions affect coverage? |
| Retrieval scope | Required interval, destination and read access? Could recording or delivery still be pending? |
Continuous records configuration changes continuously. Daily provides the latest state over the previous 24-hour period when it differs from the preceding CI. A→B→A changes therefore cannot be read as a complete per-change sequence from Daily records. Continuous also does not guarantee that every record appears without delay.
A configuration recorder performs recording. Customers manage the scope of a customer managed recorder; a linked AWS service controls a service-linked recorder’s scope. Stopping one does not establish that all account recording has stopped. This lesson stops or changes neither.
Separate recording, rule evaluation and remediation
- Configuration record → Selected-rule evaluationWhen evaluating a configured rule
- Selected-rule evaluation → Remediation actionWhen remediation is also configured and run
- Configuration record
- Inspect resource configuration and recording time.
- Selected-rule evaluation
- Read scope, criteria, evaluation time and result.
- Remediation action
- Check separately configured action, access and outcome.
A Config rule evaluates a resource against configured desired conditions. Read COMPLIANT within that rule’s scope, criteria and evaluation time. It differs from CI OK and is not a declaration that no vulnerability exists. Recording, evaluation and current resources require separate checks.
When a rule reports NON_COMPLIANT, inspect which condition differs rather than assuming it was fixed. Config remediation uses separately associated actions such as Systems Manager Automation. Manual/automatic configuration, permissions, target and execution results need review; an evaluation label does not prove successful remediation.
Check what the evidence establishes
Choose an option to see the result and explanation.
Check, then explain in your own words
- Select CloudTrail or Config evidence from the question.
- Read B1 for the same resource and explain addition, timestamps and collection scope.
- Check the distinction between recording, evaluation and remediation.
Check your understanding: Someone says “we have both CloudTrail and Config records.” What should you align?
Align account/Region/resource ID, action and outcome, timestamp meanings, before/after configuration, and collection scope/frequency.
Activity, configuration, evaluation and actual functionality require distinct evidence.
Sources and conditions checked
The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.
- What Is AWS CloudTrail?Checked:
Scope and conditionsAccount activity records; not automatic evidence of configuration history or application health.
Used in this lessonChoose activity evidence or configuration evidence
- What Is AWS Config?Checked:
Scope and conditionsConfiguration, relationships and history of recorded resources; not universal collection of all resources at all times.
Used in this lessonChoose activity evidence or configuration evidence Read a Config configuration item
- What is Amazon CloudWatch?Checked:
Scope and conditionsMetrics and logs support application/resource observation; no specific monitoring setup or health result was verified.
Used in this lessonChoose activity evidence or configuration evidence
- AWS Config ConfigurationItemChecked:
Scope and conditionsCI identity, configuration, timestamps, status and current relatedEvents behavior; OK is not security or rule compliance.
Used in this lessonRead a Config configuration item Fixed example: adding 8080 alongside 443 Separate recording, rule evaluation and remediation Check what the evidence establishes
Scope and conditionsSelected-rule evaluation and possible recording delays; no universal security or health guarantee.
Used in this lessonRead a Config configuration item When a record is missing, check collection conditions Separate recording, rule evaluation and remediation Check what the evidence establishes
- AuthorizeSecurityGroupIngressChecked:
Scope and conditionsAdds inbound rules with protocol, ports and source conditions. B1 success is stipulated, not an execution result.
Used in this lessonFixed example: adding 8080 alongside 443 Check what the evidence establishes
- CloudTrail event record contentsChecked:
Scope and conditionsCorrelate identity, subject, action, outcome and eventTime; absence of one error field is not a universal success test.
Used in this lessonFixed example: adding 8080 alongside 443 Check what the evidence establishes
- How AWS Config WorksChecked:
Scope and conditionsDiscovery, recording start, history and possible delays; recording time is not the API-operation timestamp.
Used in this lessonFixed example: adding 8080 alongside 443 When a record is missing, check collection conditions
Scope and conditionsResource/Region scope and Continuous versus Daily recording; Daily is not a complete sequence of every change.
Used in this lessonWhen a record is missing, check collection conditions Check what the evidence establishes
Scope and conditionsRecorder ownership, permissions and operating scope; distinguish customer managed from service-linked recorders.
Used in this lessonWhen a record is missing, check collection conditions Separate recording, rule evaluation and remediation
Scope and conditionsRemediation requires separately configured actions such as Automation; distinguish evaluation from execution success.
Used in this lessonSeparate recording, rule evaluation and remediation Check what the evidence establishes
- AWS Config pricingChecked:
Scope and conditionsRecording/evaluation and associated-service cost factors; not a fixed-price quote or verified bill.
Used in this lessonSeparate recording, rule evaluation and remediation