Skip to main content
Welcome. This lesson explains how AWS Config supports detective work within the monitoring and logging domain and how it complements AWS CloudTrail to provide operational visibility and auditability. CloudTrail answers “who did what and when.” AWS Config answers “what does my resource look like now, how has it changed over time, and is it compliant?” Together they give you a full picture for incident investigation, compliance auditing, and automated governance.
A slide titled "AWS Config and Detective Work" showing an AWS Certified DevOps Engineer badge and boxes listing use cases like configuration tracking, compliance automation, and forensic investigation. On the right is the AWS Config icon with features such as continuous monitoring, automated compliance checks, relationship mapping, and change tracking.

How AWS Config and CloudTrail work together

Think of AWS Config as the source of truth for resource configuration state (snapshots and timelines), and CloudTrail as the accountability/audit service (API activity and actor identity). CloudTrail records API calls (including AWS Config API calls) and identifies who performed them; Config stores the configuration items (CIs), timelines, and resource relationships. When used together:
  • CloudTrail shows who made a change and when.
  • AWS Config shows what changed, the before/after snapshots, and resource relationships.
This integration streamlines forensic investigations and incident response.
A slide comparing AWS Config and AWS CloudTrail as complementary services. AWS Config shows configuration timelines (resource history, compliance state, relationships) while CloudTrail provides activity logging (API/audit trails, user actions and timestamps).

Config Rules — automated compliance monitoring

Config Rules are the core mechanism for continuous compliance checks. AWS ships a library of managed rules and you can author custom rules (Lambda-backed or AWS-managed). Rules evaluate either:
  • Change-triggered (near real-time) — triggered when a relevant resource changes.
  • Periodic — scheduled scans across resources.
Evaluation frequency affects detection latency and cost: change-triggered rules detect issues faster but typically incur higher costs; periodic rules are more cost-effective for stable resources. Key rule evaluation states: Choose evaluation modes by balancing risk, detection speed, and cost.
A slide titled "AWS Config Rules – Compliance Automation" with four colored panels. The panels describe Managed Rules, Custom Rules, Evaluation Triggers, and Compliance States with brief explanations of each.

Conformance packs — package rules and remediations

Conformance packs bundle multiple Config rules and remediation actions into a single packaged representation of a compliance framework (for example, HIPAA or FedRAMP). They are ideal for repeatable, organization-wide policy enforcement.
  • Deploy conformance packs from a central delegated account to all member accounts in an AWS Organization.
  • Obtain aggregated compliance reporting and centrally manage exceptions.
  • Integrate conformance packs with Security Hub for consolidated findings and prioritization.
Conformance packs let you deploy a tested, auditable compliance posture across accounts. Use them to reduce operational overhead by packaging rules and automation into a single, repeatable unit.
A presentation slide titled "Conformance Packs – Multi-Rule Compliance" showing three colored sections: "AWS-Provided Packs," "Organization-Wide Deployment," and "Aggregated Compliance" with brief descriptions of each. The slide includes a note about exam answer patterns and a copyright for KodeKloud.

Change history, relationships, and remediation workflows

AWS Config records the full configuration history for supported resources, including timestamps and before/after snapshots. When CloudTrail data is available, Config timelines can be correlated with API actors to answer who changed what and when. Config also maps relationships between resources (for example, which EC2 instances or Lambda functions are associated with a security group), which helps with blast-radius analysis during investigations. When a rule detects non-compliance, it can trigger automated remediation. Typical remediation patterns include:
  • Systems Manager (SSM) Automation runbooks.
  • Lambda functions to perform custom fixes.
  • Built-in managed remediation actions for common fixes (e.g., enable S3/EBS encryption, revoke permissive security group rules).
  • Orchestration via EventBridge to integrate manual approval workflows or third-party ticketing systems.
Select remediation approaches that match your compliance goals and operational risk model.
A slide titled "Automated Remediation With AWS Config" showing a four-stage flow: Detection, Trigger, Remediation, and Notification. Beneath each stage it notes that Config rules detect noncompliance, EventBridge routes the event, SSM Automation executes the fix, and SNS sends alerts on completion.
AWS offers managed remediation actions such as enabling S3/EBS encryption, revoking overly permissive security group rules, and rotating or deleting unused IAM keys. For specialized behavior, implement Lambda-based remediation, custom SSM documents, or integrate with external systems (ticketing, SIEM) via EventBridge.
A presentation slide titled "Automated Remediation With AWS Config" showing two columns: "Managed Remediation Actions" (e.g., enable S3/EBS encryption, revoke permissive security group rules, delete unused IAM keys, enable versioning/MFA delete) and "Custom Remediation" (e.g., Lambda functions, custom SSM documents, manual approval, ticketing integration).

Aggregators — centralized compliance visibility

Config Aggregators centralize visibility across accounts and regions by aggregating configuration and compliance data into a single view. For organization-wide monitoring:
  • Enable Config recording in each member account and relevant regions.
  • Create an aggregator in a central audit/accounting account.
  • Ensure proper cross-account IAM roles/policy permissions so the aggregator can read Config data.
  • Use aggregated queries and compliance scoring to prioritize remediation activities.
A presentation slide titled "Multi-Account and Multi-Region Aggregators" showing four colored feature boxes: Centralized Dashboard, Cross-Account Queries, Unified Compliance, and IAM Requirements. Each box has a short description about multi-account dashboards, searching across accounts (e.g., finding public S3 buckets), aggregate compliance scoring, and cross-account IAM roles.

Drift detection — keep IaC as the source of truth

Detecting configuration drift helps keep infrastructure-as-code (IaC) authoritative. AWS CloudFormation has native drift detection to compare live resources against stack templates. Combine CloudFormation drift detection with AWS Config’s continuous recordings to:
  • Identify resources modified outside IaC (e.g., security group rule changes).
  • Trigger remediation or alerting when drift is detected.
  • Ensure your CloudFormation/Terraform state remains the source of truth.
A slide titled "Configuration Drift Detection Integration – How It Works" showing a four-step workflow: 1) Detection, 2) Comparison, 3) Identification, and 4) Response. Each step has a short description explaining detecting config changes, comparing to templates, identifying drift, and triggering automated responses.

Common use cases

AWS Config supports several production-focused scenarios: Relationship mapping is especially helpful when answering “who or what is using this resource?” during impact analysis.
A presentation slide titled "Common Config Detection – Use Cases" showing four colored use-case boxes: Security Audit, Compliance Reporting, Change Tracking, and Cost Optimization. Each box has a short description of questions they address (exposed resources, regulatory evidence, forensic change investigation, and idle resources).

Exam and operational mapping

Understanding how Config Rules, remediation, aggregators, and drift detection operate together is useful both for real-world operations and for certification exam preparation. Focus on the integration patterns and decision trade-offs (cost vs. detection speed vs. coverage).
A presentation slide titled "Exam Task Mapping" showing two items: Task Statement 4.2 and Task Statement 5.2. The slide notes "AWS Config rules" for continuous audit and compliance monitoring, and "Configuration management services" for automated remediation and infrastructure governance.

Integration patterns

Common production integration patterns include:
  • Config + CloudTrail: correlate configuration timelines with API activity to identify actors.
  • Config + EventBridge: route rule evaluations to remediation pipelines or external systems.
  • Config + Systems Manager (SSM): execute automation documents for remediation.
  • Config + Security Hub: aggregate compliance findings for security operations.
  • Config + Organizations: deploy and aggregate at scale across accounts.
These patterns help centralize detection, response, and reporting.
A presentation slide titled "Exam Integration Patterns" showing several AWS Config integration options (Config + CloudTrail, EventBridge, SSM, Security Hub, Organizations) with short descriptions of each integration's purpose. The slide uses icons and gray text boxes to pair each integration name with a one-line benefit or use case.

Cost considerations and optimization

AWS Config billing factors you should plan for:
  • Charges per configuration item recorded.
  • Charges for rule evaluations (frequency and number of resources affect cost).
  • Continuous (real-time) evaluations cost more than periodic checks.
  • Conformance packs can be more cost-effective than many individual, frequently-evaluated rules.
Optimization strategies:
  • Use conformance packs to group and reuse rules.
  • Reduce evaluation frequency for stable, low-risk resources.
  • Filter which resources are recorded by Config to limit data volume.
  • Use S3 lifecycle policies to transition older snapshots to cheaper storage classes.
Balance detection speed against cost: reserve continuous evaluations for high-risk, production-critical resources and use periodic checks for less critical assets.
A presentation slide titled "Config Costs" that shows two colorful rounded boxes labeled "Configuration Items Recorded" and "Rule Evaluations," each with a short explanatory line beneath. The slide includes a © Copyright KodeKloud note at the bottom.
A presentation slide titled "Config Optimization Strategies" showing four colored boxes: Use Conformance Packs, Adjust Evaluation Frequency, Resource Filtering, and S3 Lifecycle Policies, each with a short explanatory note. The slide includes a © Copyright KodeKloud footer.

Next steps — hands-on practice

To prepare for the exam and to operate effectively in production, follow hands-on exercises that demonstrate:
  • Creating and evaluating Config Rules (managed and custom).
  • Implementing automated remediation (SSM, Lambda, EventBridge).
  • Deploying conformance packs across accounts.
  • Building an aggregator and running cross-account queries.
  • Performing drift detection and reconciling IaC with live state.
Labs and demos solidify the concepts above and expose practical trade-offs between detection, automation, and cost.

Watch Video

Practice Lab