teluzia.Cloud Engineer · Day 74
CHAPTER 11 · AWS SECURITY AND GOVERNANCE

CloudTrail and AWS Config

4–5 hours including independent practice3 topics
LET’S MAKE THIS SIMPLE

What you’re learning today

CloudTrail is the activity diary; AWS Config is the inventory timeline showing how supported resource configurations changed. CloudTrail records supported AWS API activity, including identity, action, time, and source context. Event history has scope and retention limits; trails and event data stores provide additional options. Management events and data events are different categories, and not every data operation is included by default. AWS Config records supported resource configurations and their relationships when configured to do so. Rules evaluate compliance against conditions, with scope and timing determined by the rule and recording setup. A compliance result indicates a configuration assessment, not that every possible attack has been prevented.

Think of it this way

CloudTrail is the activity diary; AWS Config is the inventory timeline showing how supported resource configurations changed.

TOPIC 01 / 03Step by step

CloudTrail event evidence

CloudTrail records supported AWS API activity, including identity, action, time, and source context. Event history has scope and retention limits; trails and event data stores provide additional options. Management events and data events are different categories, and not every data operation is included by default. For example, an instance termination investigation searches the relevant region and time window for TerminateInstances and the recorded caller identity.

WORKED EXAMPLE
An instance termination investigation searches the relevant region and time window for TerminateInstances and the recorded caller identity.

An operator investigates an unexpected security-group change. Start with the relevant account, region, approximate time, and supported management event name. CloudTrail evidence can identify the caller, request parameters, session information, and source context for that API activity. An assumed-role event may require tracing the session and role assumption rather than treating the role's display name as the final human identity.

A management event records control-plane activity such as changing configuration. A data event covers selected data-plane actions when supported and configured. Event history, trails, and event data stores have different retention and scope. Not seeing an event in one search does not prove no operation occurred; check region, time, coverage, and the evidence source. CloudTrail is not an application trace of every line of handler code. Protect retained audit storage and its access, because evidence loses value if the identity being investigated can silently remove the records you depend on.

Why this matters

An instance termination investigation searches the relevant region and time window for TerminateInstances and the recorded caller identity.

A common trap

Do not overlook this operational distinction: Management events and data events are different categories, and not every data operation is included by default.

Read all topics in this lesson

A complete reference to revisit alongside the guided steps above.

CloudTrail event evidence

CloudTrail records supported AWS API activity, including identity, action, time, and source context. Event history has scope and retention limits; trails and event data stores provide additional options. Management events and data events are different categories, and not every data operation is included by default. For example, an instance termination investigation searches the relevant region and time window for TerminateInstances and the recorded caller identity.

WORKED EXAMPLE
An instance termination investigation searches the relevant region and time window for TerminateInstances and the recorded caller identity.

An operator investigates an unexpected security-group change. Start with the relevant account, region, approximate time, and supported management event name. CloudTrail evidence can identify the caller, request parameters, session information, and source context for that API activity. An assumed-role event may require tracing the session and role assumption rather than treating the role's display name as the final human identity.

A management event records control-plane activity such as changing configuration. A data event covers selected data-plane actions when supported and configured. Event history, trails, and event data stores have different retention and scope. Not seeing an event in one search does not prove no operation occurred; check region, time, coverage, and the evidence source. CloudTrail is not an application trace of every line of handler code. Protect retained audit storage and its access, because evidence loses value if the identity being investigated can silently remove the records you depend on.

Why this matters

An instance termination investigation searches the relevant region and time window for TerminateInstances and the recorded caller identity.

A common trap

Do not overlook this operational distinction: Management events and data events are different categories, and not every data operation is included by default.

AWS Config recording and rules

AWS Config records supported resource configurations and their relationships when configured to do so. Rules evaluate compliance against conditions, with scope and timing determined by the rule and recording setup. A compliance result indicates a configuration assessment, not that every possible attack has been prevented. For example, a rule flags a security group allowing unwanted public ingress; history shows when that configuration changed.

WORKED EXAMPLE
A rule flags a security group allowing unwanted public ingress; history shows when that configuration changed.

A configuration recorder captures a supported security group's rule change. A rule evaluates the recorded configuration and reports noncompliance because an administrative port is open publicly. The finding describes the configuration state under that rule, while a separate activity record may explain who made the change. Those are complementary views, not interchangeable proof.

A configuration item records a supported resource's configuration and metadata. A rule defines a compliance assessment. A recording scope determines which resources or changes become visible to the service. Missing resource coverage or recording problems can produce an incomplete audit picture. Compliance evaluations may be triggered by changes or scheduled checks depending on the rule. A compliant result only means the checked condition passed at the relevant assessment; it does not establish universal security. Before enabling remediation, understand whether another automation owns the setting so the correction does not create a configuration tug-of-war or interrupt a required business path.

Why this matters

A rule flags a security group allowing unwanted public ingress; history shows when that configuration changed.

A common trap

Do not overlook this operational distinction: A compliance result indicates a configuration assessment, not that every possible attack has been prevented.

Audit retention and remediation

Audit usefulness depends on coverage, retention, integrity, and who may read or change the records. Detection can trigger remediation, but automatic changes require careful permissions and recovery design. Tie the configuration finding to an activity event without assuming timestamps alone prove the exact cause. For example, a Config finding identifies public ingress; CloudTrail evidence helps identify the related authorization change and its caller.

WORKED EXAMPLE
A Config finding identifies public ingress; CloudTrail evidence helps identify the related authorization change and its caller.

A public-ingress finding starts an incident workflow. The responder checks configuration history, correlates a likely change with CloudTrail evidence, confirms the intended access boundary, and applies a reviewed correction. Afterward, the responder verifies current configuration and records whether the triggering activity was expected, mistaken, or suspicious. Detection alone did not restore the boundary.

Retention is the duration evidence remains available. Integrity protects evidence from unauthorized alteration. Remediation is an action to correct an identified condition. Automatic remediation reduces response time but can have side effects; removing a rule might interrupt a legitimate recovery path or be overwritten by infrastructure code. Give the remediation identity only necessary rights and retain a reversal plan. Do not equate similar timestamps with conclusive attribution. A strong incident note links resource identity, relevant event parameters, observed configuration, action taken, and verification, while excluding private request payloads that are unnecessary to explain the issue.

Why this matters

A Config finding identifies public ingress; CloudTrail evidence helps identify the related authorization change and its caller.

A common trap

Do not overlook this operational distinction: Tie the configuration finding to an activity event without assuming timestamps alone prove the exact cause.

KEEP THESE WITH YOU

Today’s takeaways

CloudTrail event evidence: CloudTrail records supported AWS API activity, including identity, action, time, and source context. Event history has scope and retention limits; trails and event data stores provide additional options. Management events and data events are different categories, and not every data operation is included by default.

AWS Config recording and rules: AWS Config records supported resource configurations and their relationships when configured to do so. Rules evaluate compliance against conditions, with scope and timing determined by the rule and recording setup. A compliance result indicates a configuration assessment, not that every possible attack has been prevented.

Audit retention and remediation: Audit usefulness depends on coverage, retention, integrity, and who may read or change the records. Detection can trigger remediation, but automatic changes require careful permissions and recovery design. Tie the configuration finding to an activity event without assuming timestamps alone prove the exact cause.

CLOSE THE LOOP

Ready to complete this day?

Verify the practical steps and pass the knowledge check (at least two thirds correct).

Lab steps verifiedKnowledge check passed