Skip to main content
Welcome. This lesson explains how to enforce governance using AWS Config — AWS’s continuous configuration monitoring service that’s commonly tested on certification exams. At a high level, AWS Config continuously records resource configurations, builds an inventory of your AWS resources, and evaluates those configurations against rules (AWS-managed or custom). Based on evaluations, Config can emit events that trigger notifications or automated remediation workflows (for example, via EventBridge, SNS, Systems Manager, or Lambda).
A slide titled "AWS Config" with the AWS Config icon and cloud on the left. On the right are four feature points: keeps inventory of AWS resources, continuous monitoring of resource configuration, automatic notifications on resource changes, and enforces/evaluates compliance rules.
AWS Config records configuration state and evaluates compliance. To automatically remediate non-compliant resources, configure remediation actions that AWS Config can invoke through EventBridge, Systems Manager Automation, or Lambda.
Why use AWS Config?
  • Continuous configuration monitoring and historic change tracking.
  • Built-in and custom rule evaluation for compliance and best practices.
  • Integration points to automate notifications and remediation workflows.
  • Centralized views and aggregate reporting for multi-account, multi-region environments.
Analogy: think of AWS Config as a library catalog for your cloud resources — it knows what exists, how it’s configured now and in the past, and how resources relate to each other. This catalog makes it possible to answer: when was this resource created, what changed, and who changed it? Before AWS Config, teams often lacked visibility into drift, built ad hoc auditing solutions, and struggled to map resource relationships.
A presentation slide titled "Before AWS Config" showing four blue circular icons labeled "Lack of visibility," "Manual configuration auditing," "Configuration drift," and "Security and compliance risks." It appears to outline problems encountered prior to using AWS Config (© Copyright KodeKloud).
How AWS Config fills the gap:
  • Tracks Configuration Items (CIs) that include metadata, attributes, relationships, and snapshots.
  • Records a history of configuration versions so you can perform forensic analysis and audits.
  • Triggers events and workflows when resources change or when rules evaluate to non-compliant.
Compare AWS Config with other AWS governance services:
An infographic table titled "AWS Config vs Other AWS Security Services" comparing AWS Config, AWS Security Hub, and AWS Audit Manager across features like purpose, compliance detection, remediation, multi-account support, and best use case. The chart lists that AWS Config provides continuous resource monitoring and auto-remediation, Security Hub aggregates security events, and Audit Manager automates compliance reporting.
Quick comparison table How AWS Config represents resources
  • A Configuration Item (CI) includes the resource’s metadata, attributes, relationships, and configuration snapshot.
  • Record on every change (recommended) or use periodic snapshots (e.g., every 5 or 10 minutes).
  • Use the versioned history to examine prior configurations and detect drift.
A slide titled "Configuration History" showing three configuration item icons (v1, v2, v3) inside a framed collection with a stopwatch icon. To the right are three question boxes asking when the resource was first created, how it was configured in the last month, and what changes were made yesterday at 9 AM.
Recording and delivery
  • The AWS Config Recorder captures configuration items for supported resource types on create, update, and delete events — or periodically if configured.
  • Delivery Channel controls how AWS Config persists data. Typically, AWS Config writes configuration snapshots and history to an S3 bucket.
  • When sending notifications (SNS) or invoking other services, verify that the SNS topic and downstream actions (Lambda, EventBridge, Systems Manager) have the required IAM permissions.
When using SNS, EventBridge, Lambda, or Systems Manager for notifications or remediation, ensure IAM policies and SNS publish permissions are configured correctly to avoid failed remediation attempts.
A simple diagram titled "Delivery Channel: S3" showing the AWS Config icon sending data to an S3 bucket. The bucket is labeled "Configuration Data" and lists Items, Snapshots, and History.
Common workflow
  • Resource changes → AWS Config records a CI → Config persists snapshots to S3 and emits events → EventBridge/SNS/Lambda/SSM handle notifications and remediation.
A diagram titled "How Config Works" showing AWS resource icons feeding into a central configuration component. The config component stores data to an S3 bucket and triggers a downstream workflow/event processor that invokes a Lambda action.
Rules and evaluations
  • AWS-managed rules: Prebuilt checks for common best practices (EBS encryption, VPC settings, Auto Scaling, etc.). Fast to deploy and require no code.
  • Custom rules: Implement business-specific logic using AWS Lambda functions (any supported runtime), or create custom remediation using Systems Manager Automation documents.
Rule evaluation statuses
A slide titled "How AWS Config Rules Work" showing four status boxes: COMPLIANT (blue check), NON_COMPLIANT (orange X), ERROR (green warning triangle), and NOT_APPLICABLE (purple "NA") with corresponding colored icons.
Managed rules are ideal for broad, standard checks and are often enabled via AWS Control Tower. Custom rules are for niche or business-specific validations.
A presentation slide titled "AWS Managed Config Rules" showing a screenshot of the AWS Managed Rules console with a list of rules (EC2, ELB, AutoScaling, etc.). To the right are three highlighted benefits: built-in logic/no code required, evaluates best practices and compliance frameworks, and quick to deploy.
Remediation and enforcement
  • When a resource is NON_COMPLIANT, AWS Config can:
    • Trigger managed remediation actions (predefined by AWS).
    • Invoke custom remediation via Lambda functions or Systems Manager Automation runbooks.
  • Trigger types:
    • Configuration change trigger — evaluate when the resource changes.
    • Periodic trigger — evaluate on a schedule.
    • Hybrid trigger — combination of change-based and periodic evaluations.
  • Typical remediation paths: EventBridge → Systems Manager Automation, or EventBridge/SNS → Lambda → call AWS APIs to remediate.
A presentation slide titled "AWS Config Workflow" showing four sequential steps—Enable AWS Config, Define AWS Config rules, Check Compliance status, and Apply Automatic Remediation—each in a rounded box with icons and colored arrows between them. A small copyright note at the bottom reads "© Copyright KodeKloud."
Trigger types at a glance:
A presentation slide titled "AWS Config Trigger Types" showing three colored boxes—Configuration Changes Trigger, Periodic Trigger, and Hybrid Trigger—each with a short description of when evaluations occur.
What happens when a resource is non-compliant?
  • Notify operators using SNS, email integrations, or ticketing systems.
  • Route the evaluation event via EventBridge to automated remediation workflows: Systems Manager Automation runbooks or Lambda functions.
  • Use AWS-managed remediation actions where available, or implement custom remediations with Lambda/SSM.
A flow diagram titled "Remediating Noncompliant Resources" showing AWS resource icons on the left being monitored and checked for noncompliance. If noncompliant, it triggers remediation actions on the right such as AWS Systems Manager Automation runbooks and AWS Lambda functions.
Remediation options
A presentation slide titled "Remediating Noncompliant Resources" showing two options: Managed Remediation Actions (predefined by AWS) and Custom Remediation Actions (define your own using AWS Lambda or AWS Systems Manager).
Benefits of automated remediation
  • Self-healing infrastructure and faster mean time to repair (MTTR).
  • Improved consistency and reduced operational risk.
  • Scales across accounts and regions when combined with Aggregators and Conformance Packs.
  • Can include business logic or safety checks (for example, require manual approval before applying disruptive changes).
Conformance Packs
  • Conformance Packs are YAML bundles that group multiple AWS Config rules and remediation actions.
  • Use Conformance Packs to apply consistent control sets across accounts, regions, or an entire AWS Organization.
A slide titled "Conformance Pack" showing a document icon on the left. The icon is shown as equal to a box labeled "AWS Config managed or custom rules" plus another box labeled "Remediation actions."
Aggregators for multi-account, multi-region visibility
  • AWS Config Aggregator centralizes Config data from multiple accounts and regions into a single aggregated view for centralized governance and auditing.
  • Aggregators simplify tracking trends and metrics (resource counts, compliance rates) across an enterprise.
A diagram titled "AWS Config Aggregator" showing data flow from Accounts and Regions into AWS Config Data, then into an Aggregator, and finally to an Aggregated View. Icons represent users/globe sources, analytics/data, filtering/aggregation, and a dashboard view.
Aggregators are especially useful for centralized reporting and for feeding downstream analytics or SIEM tools.
A presentation slide titled "AWS Config Aggregator – Benefits" showing four colorful icons with labels: Centralized compliance view, Efficient governance, Scalable, and Cross-account and cross-region management. The icons are arranged in two columns with gradient squares and brief descriptive text beside each.
Best practices
  • Enable AWS Config organization-wide (AWS Control Tower can help bootstrap this).
  • Persist configuration history and snapshots to S3 for auditability; apply proper bucket access controls and lifecycle rules.
  • Use Config Aggregators for cross-account and cross-region visibility.
  • Start with managed rules for standard checks, and add custom rules for business-specific controls.
  • Automate safe remediation where appropriate, and include approvals or scoped execution for risky changes.
  • Integrate AWS Config findings with Security Hub and ticketing/alerting systems for centralized incident handling.
A slide titled "AWS Config Architecture – Best Practices" showing a checklist of recommendations, including enabling AWS Config organization-wide, automating remediation with SSM and Lambda, using Config aggregators, storing history in S3, and integrating with Security Hub.
Summary
  • AWS Config delivers continuous configuration monitoring, versioned history, and rule-based evaluations to support governance and compliance.
  • Use managed rules for common checks, custom rules for specialized logic, Conformance Packs to package policies, and Aggregators to centralize data across accounts and regions.
  • Combine Config with EventBridge, SNS, Lambda, and Systems Manager Automation for notifications and automated remediation to achieve self-healing infrastructure.
A demonstration follows to show AWS Config setup, rules, and an automated remediation example.

Watch Video

Practice Lab