AWS Config, Internals

AWS Config, Internals

A deep, engineer-level walkthrough of how AWS Config actually records, evaluates, and remediates configuration state across an entire organization — the recorder internals, the evaluation engine, aggregator topology, and the trade-offs that show up only at real production scale.

If you already know that AWS Config “tracks configuration changes and checks compliance,” you know the marketing description, not the system. Config is really two coupled subsystems wearing one name: a configuration-item recorder that produces an immutable, timestamped history of every tracked resource’s state, and a rules-evaluation engine that runs Lambda-backed or managed logic against that history to produce compliance verdicts. Everything interesting about operating Config at scale — cost, latency, aggregation topology, remediation safety — comes from understanding how those two subsystems actually work and where they diverge from what the console implies.

01

AAdvanced Core Concepts

Assuming you already know Config records resources and runs rules — here’s the model that matters once you’re operating it in production.

A Configuration Item (CI) is not a live snapshot — it’s an event record

Every time a tracked resource changes, Config’s recorder generates a Configuration Item: a point-in-time JSON representation of that resource’s attributes, relationships, and metadata, immutable once written. CIs are not deleted or overwritten — they accumulate into a full configuration history per resource, which is what powers the “configuration timeline” view. This is the architectural reason Config can answer “what did this security group look like three weeks ago” when CloudTrail alone can only tell you “someone called AuthorizeSecurityGroupIngress” without the resulting state.

Analogy

CloudTrail is your bank’s transaction log — it tells you every deposit and withdrawal. A Configuration Item is your bank statement’s running balance after each transaction. You need both: the log tells you what action happened, the CI tells you what state resulted from it.

Rules evaluate CIs, not live resources

A common misconception among engineers moving from ad-hoc scripts to Config is assuming rules query the live AWS API at evaluation time. They don’t — both managed and custom Config rules evaluate against the CI stream (for change-triggered rules) or against periodic snapshots (for periodic rules). A rule’s Lambda function receives the CI payload as its input event; it never calls DescribeSecurityGroups itself for the resource under evaluation. This matters because a resource can drift and revert within a single scheduling window in ways periodic rules may never observe, while change-triggered rules catch it because they fire per CI, not per clock tick.

Recorder scope, not rule scope, decides what’s even visible

Advanced teams learn to separate two independent configuration surfaces: the recorder decides which resource types generate CIs at all (configurable to “all supported types,” a specific list, or all-with-exclusions), while individual rules decide which of those recorded resource types they evaluate. A rule referencing a resource type the recorder isn’t tracking will simply never fire — silently, with no error — which is one of the most common “why isn’t this rule working” debugging dead ends in Config.

Concept

Configuration Item (CI)

An immutable, point-in-time JSON record of a resource’s attributes and relationships — the atomic unit Config is built on.

Concept

Configuration Recorder

The per-account, per-Region component that decides which resource types are tracked and generates CIs on change.

Concept

Conformance Pack

A YAML-defined bundle of Config rules and remediation actions, deployable as a single unit across accounts via StackSets.

Concept

Aggregator

A read-only, cross-account/cross-Region view that pulls compliance and configuration data without replicating recorder state itself.

02

IInternal Working

What happens between “someone modifies a security group” and “a rule marks it NON_COMPLIANT in your dashboard.”

The configuration recorder subscribes to change notifications for every resource type in its scope. When a supported resource changes, the recorder builds a new CI capturing the resource’s current configuration, tags, and relationships to other tracked resources (for example, an EC2 instance’s CI includes references to its attached security groups and subnet). This CI is written to the delivery channel, which persists it to an S3 bucket you designate and, if configured, publishes an SNS notification.

Separately, Config maintains a rule-evaluation queue. Change-triggered rules subscribe to CI delivery events for the resource types they care about; when a matching CI arrives, Config invokes the rule’s Lambda function (for custom rules) or its managed-rule equivalent, passing the CI as the evaluation event. The rule function returns a compliance verdict — COMPLIANT, NON_COMPLIANT, NOT_APPLICABLE, or INSUFFICIENT_DATA — which Config records against that resource and rule pair. Periodic rules instead run on a fixed schedule (as often as every 24 hours) regardless of change activity, evaluating the latest known CI at that time.

graph LR
    R[Tracked Resource Changes] --> REC[Configuration Recorder]
    REC --> CI[Configuration Item Generated]
    CI --> S3[(Delivery Channel - S3 Bucket)]
    CI --> SNS[SNS Notification]
    CI --> QUEUE[Rule Evaluation Trigger]
    QUEUE --> LAMBDA[Custom Rule Lambda / Managed Rule Logic]
    LAMBDA --> VERDICT[Compliance Verdict]
    VERDICT --> STORE[(Config Compliance Store)]
    STORE --> REMED[SSM Automation Remediation]
    STORE --> AGG[Aggregator]
        

Fig 1 — From resource change to recorded compliance verdict and optional auto-remediation

!
Gotcha

If auto-remediation is attached to a rule and the remediation action itself changes a tracked resource, that change generates a new CI, which can re-trigger evaluation. Poorly scoped remediation logic (fixing A by changing B, where B is also in scope) can create evaluation loops — always test remediation documents against a non-production account first.

03

DData Flow & Lifecycle

A resource’s compliance history in Config isn’t a single value — it’s a timeline of verdicts, each tied to the CI that triggered it. Understanding this timeline model is essential for anyone building dashboards or audit reports on top of Config data.

1

Discovery

Recorder detects an initial or changed resource state and generates the first CI for that resource.

2

Delivery

CI is persisted to the S3 delivery channel; optional SNS notification fires for downstream consumers.

3

Evaluation

Applicable change-triggered rules fire against the new CI; periodic rules wait for their next scheduled run.

4

Verdict Recording

Compliance status is written against the resource-rule pair, timestamped and queryable via GetComplianceDetailsByResource.

5

Remediation (optional)

If a remediation action is attached and the verdict is NON_COMPLIANT, an SSM Automation document executes, potentially generating a new CI and restarting the cycle.

Aggregators do not generate their own CIs or run their own evaluations — they pull already-computed compliance and configuration data from source accounts on a scheduled basis. This means an aggregator view can lag the source account’s true state by minutes, which matters when building near-real-time alerting on top of aggregated data versus per-account EventBridge triggers.

04

TAdvantages, Disadvantages & Trade-offs

Advantages

  • Full historical configuration timeline per resource — not just “current state,” which most native AWS consoles only show.
  • Change-triggered evaluation gives near-real-time compliance feedback for most rule types, not just periodic scans.
  • Conformance packs turn compliance baselines into deployable, versionable artifacts rather than manually clicked-through rule sets.
  • Native integration with Systems Manager Automation enables auto-remediation without a separate orchestration layer.

Disadvantages / Trade-offs

  • Recorder and rule evaluation costs scale with resource change frequency and count — a noisy, high-churn account (e.g., heavy auto-scaling) can generate significant CI volume and cost.
  • Aggregators introduce latency and are read-only summaries — they can’t be used to trigger real-time remediation the way per-account EventBridge events can.
  • Custom rule Lambda functions add operational surface area (cold starts, IAM permissions, error handling) compared to fully managed rules.
  • A rule silently not firing because the recorder excludes its resource type is a common, hard-to-diagnose failure mode.
“Config doesn’t just tell you a resource is misconfigured — it tells you exactly when it became misconfigured, which is the difference between a fix and a forensic investigation.”
05

PPerformance & Scalability

At organization scale, Config’s cost and performance profile is driven almost entirely by two variables: the number of configuration items recorded, and the number of rule evaluations run against them. Both scale with resource count and change frequency, not with account count directly — ten accounts with high resource churn can generate far more CIs than a hundred quiet accounts.

A frequent scaling mistake is recording “all supported resource types” by default across every account without considering churn-heavy resource types like Auto Scaling-managed EC2 instances or Lambda function versions, which can dominate CI volume without adding proportional compliance value. Mature deployments scope the recorder deliberately — often excluding high-churn, low-compliance-relevance resource types — while still capturing everything security- and cost-relevant.

24H
MAX PERIODIC RULE INTERVAL
1
AGGREGATOR PER ACCOUNT (TYPICAL SETUP)
N+1
CIs PER RESOURCE CHANGE (INCLUDING RELATIONSHIPS)

Uber’s infrastructure engineering team, describing large-scale configuration governance in public talks, has highlighted the same generalizable lesson that applies directly to Config: at high resource counts, the practical bottleneck shifts from “can the evaluation engine keep up” to “can your remediation and alerting pipeline downstream keep up with the resulting verdict volume” — which is why scoping the recorder and batching remediation logic matters more than any single API quota.

06

HHigh Availability & Reliability

Config is a Regional, managed service with standard multi-AZ resilience for its control plane — you don’t manage recorder or evaluation-engine redundancy directly. The reliability considerations that require actual design decisions sit at the delivery-channel and aggregator layers.

The delivery channel’s S3 bucket is a single point of dependency for historical CI storage: if that bucket’s lifecycle policy deletes objects prematurely, or cross-account bucket permissions break silently, you lose historical configuration data even though the recorder continues operating normally going forward — Config does not retroactively repair or re-deliver missing history. Similarly, if an aggregator’s source-account authorization is revoked (for example, during an account offboarding that isn’t fully cleaned up), that account’s data silently stops appearing in the aggregated view without an obvious error surfaced to the aggregator owner.

Reliability pattern used by mature teams

Treat the delivery-channel S3 bucket policy and aggregator source-account list as infrastructure-as-code with drift detection of their own — ironically, using Config rules to monitor the S3 bucket that Config itself depends on, and alerting if an expected source account disappears from aggregator authorization.

07

SSecurity of AWS Config Itself

Because Config’s CI history can include sensitive metadata about your infrastructure’s exact configuration — security group rules, IAM policy documents attached to roles, KMS key policies — the delivery-channel S3 bucket and the aggregator account both become high-value targets in their own right, deserving the same access-control rigor as the workloads they’re monitoring.

A frequently under-scoped permission is config:PutRemediationConfigurations combined with broad ssm:StartAutomationExecution rights — together, these let a principal define what “auto-fix” means for any non-compliant resource across the account, which is effectively a general-purpose remediation execution capability if the underlying SSM Automation document itself has broad permissions. Scoping the automation role’s own IAM permissions to only the specific actions each remediation document needs (rather than broad service-level access) limits the blast radius if the remediation configuration itself is ever manipulated by a compromised principal.

Best Practice

Encrypt the delivery-channel S3 bucket with a customer-managed KMS key, restrict config:PutRemediationConfigurations to a small, audited set of principals, and give each SSM Automation remediation role only the exact permissions its document executes — never a broad managed policy for convenience.

08

MMonitoring, Logging & Metrics

Config’s own control-plane calls — stopping the recorder, deleting a delivery channel, removing rules — are logged to CloudTrail, and monitoring for config:StopConfigurationRecorder or config:DeleteDeliveryChannel specifically is a well-known detection pattern, since disabling Config is a known technique used to blind an environment before making unauthorized changes.

For compliance-state observability, SNS notifications from the delivery channel (configuration item deliveries) and a separate optional notification stream for compliance-state changes are the standard integration points for near-real-time alerting, typically consumed by a Lambda function that fans out into a SIEM or ticketing system. Config also natively integrates with Security Hub — compliance findings can be forwarded automatically, letting teams standardize on Security Hub’s EventBridge pipeline rather than building a second bespoke Config-specific alerting path.

SignalSourcePrimary Use
Configuration item deliverySNS via delivery channelDownstream processing, custom dashboards
Compliance state changeSNS / Security Hub forwardingReal-time non-compliance alerting
Control-plane API callsAWS CloudTrailDetecting tampering with Config itself
Remediation execution resultsSystems Manager Automation logsConfirming auto-fix success/failure
09

DDeployment & Cloud Architecture

The production deployment pattern for Config across an organization mirrors other AWS governance services: designate a delegated administrator account (often the same security-tooling account used for Security Hub and GuardDuty), enable an organization-wide aggregator there, and deploy conformance packs and recorder configuration consistently to every member account via AWS CloudFormation StackSets rather than manual per-account setup.

graph TD
    subgraph Org["AWS Organization"]
        MEM1[Member Account 1 - Recorder + Rules]
        MEM2[Member Account 2 - Recorder + Rules]
        MEM3[Member Account N - Recorder + Rules]
    end
    MEM1 -->|compliance data pulled| AGG[Delegated Admin - Org Aggregator]
    MEM2 -->|compliance data pulled| AGG
    MEM3 -->|compliance data pulled| AGG
    AGG --> DASH[Aggregated Compliance Dashboard]
    AGG --> SECHUB[AWS Security Hub Forwarding]
    STACKSETS[CloudFormation StackSets] -->|deploys conformance packs| MEM1
    STACKSETS -->|deploys conformance packs| MEM2
    STACKSETS -->|deploys conformance packs| MEM3
        

Fig 2 — Org-wide Config deployment with centralized aggregation and StackSets-driven conformance packs

AWS Control Tower provisions much of this scaffolding automatically for accounts vended through its Account Factory, including a baseline set of mandatory and strongly recommended Config rules. Teams building beyond Control Tower’s defaults typically layer their own conformance packs for industry-specific baselines (PCI DSS, HIPAA-aligned controls) on top of that foundation rather than replacing it.

10

PDesign Patterns & Anti-patterns

PATTERN-01 Recommended
Pattern

Conformance packs as version-controlled infrastructure: define rule sets and remediation actions in YAML, store them in source control, and deploy via StackSets — treating compliance baselines with the same rigor as application infrastructure.

Why It Works

Provides an auditable change history for the rules themselves, and guarantees consistency across every account without manual console configuration drift.

ANTI-PATTERN-01 Avoid
Anti-pattern

Attaching auto-remediation to every NON_COMPLIANT rule indiscriminately, including rules covering production-critical or stateful resources, without a manual-approval step.

Consequence

An overly aggressive or buggy remediation document can take unintended action on live production infrastructure faster than a human can intervene.

ANTI-PATTERN-02 Avoid
Anti-pattern

Recording every supported resource type in every account “just in case,” without scoping to what’s actually relevant to compliance or cost governance goals.

Consequence

Unnecessary CI volume drives up cost and clutters the configuration timeline with high-churn, low-signal resources, making genuinely important changes harder to find.

11

BBest Practices & Common Mistakes

Best Practice

Scope the recorder deliberately

Explicitly include security- and cost-relevant resource types, and exclude high-churn types that add cost without proportional compliance value.

Best Practice

Gate auto-remediation by environment

Enable automatic remediation freely in non-production accounts; require manual approval workflows for production-critical resource types.

Common Mistake

Assuming a rule fires because it’s “enabled”

A rule enabled but referencing a resource type excluded from the recorder’s scope will never evaluate — always verify recorder scope first when debugging a silent rule.

Common Mistake

Relying on aggregator data for real-time alerts

Aggregators are pull-based summaries with inherent lag — real-time automation should hook per-account SNS/EventBridge signals, not the aggregator view.

12

RReal-World & Industry Examples

Financial services firms operating under PCI DSS commonly point to Config’s historical CI timeline as the mechanism that turns “prove this control was in place for the entire audit period” from a manual evidence-gathering exercise into a queryable API call — auditors can be shown the exact compliance status of a resource on any past date, not just its current state.

Capital One has publicly discussed using AWS Config as a foundational piece of their cloud governance model, layering custom rules and conformance packs on top of Config’s managed rule library to encode organization-specific security baselines beyond AWS’s defaults — a pattern that generalizes to any regulated enterprise needing baselines stricter than the generic AWS Foundational Security Best Practices standard.

Large SaaS companies running Control Tower-vended multi-account environments typically extend the Control Tower default rule set with their own conformance packs targeting product-specific risks (for example, custom rules ensuring specific encryption settings on data stores unique to their architecture), illustrating how Config’s managed-rule library is treated as a floor, not a ceiling, in mature environments.

13

FFrequently Asked Questions

Q1Does Config prevent non-compliant resources from being created?
No, not by itself. Config is detective, not preventive — it records and evaluates after the fact. Preventing creation requires Service Control Policies or IAM permission boundaries; Config’s remediation actions run after a violation is detected, not before it occurs.
Q2Can I recover a deleted resource’s configuration history?
You can query the historical CIs recorded before deletion, since Config retains a “deleted” final CI state, but this depends entirely on your delivery-channel S3 bucket’s retention policy not having purged that history.
Q3Do periodic rules and change-triggered rules cost the same?
Evaluation costs are billed per rule evaluation, so a periodic rule on a fixed schedule and a change-triggered rule on a high-churn resource type can have very different cost profiles depending on evaluation frequency, not on which trigger type is used.
Q4What’s the difference between a Config aggregator and Security Hub’s cross-account aggregation?
They’re separate mechanisms serving different data: a Config aggregator centralizes configuration and compliance data from Config itself, while Security Hub aggregation centralizes ASFF-normalized findings from many products, one of which can be Config’s own compliance results forwarded into it.
Q5Can auto-remediation retry a failed fix automatically?
Yes — remediation configurations support a retry attempt count and interval, but excessive automatic retries against a persistently non-compliant resource can itself become a source of noise or unintended repeated action if not bounded carefully.
14

SSummary and Key Takeaways

Key Takeaways

  • A Configuration Item is an immutable historical record, not a live snapshot — this is what makes point-in-time forensic queries possible.
  • Rules evaluate the CI stream, not live resource state — a resource type excluded from the recorder means its rules silently never fire.
  • Recorder scope and rule scope are independent configuration surfaces — both must be verified when debugging.
  • Aggregators are pull-based and read-only — they introduce latency and are unsuitable as a trigger source for real-time automation.
  • Cost and performance scale with resource change frequency, not account count — scope the recorder deliberately to avoid high-churn, low-value CI volume.
  • Config is detective, not preventive — pair it with Service Control Policies for true prevention, and gate auto-remediation by environment criticality.
  • Treat conformance packs as version-controlled infrastructure, deployed via StackSets, for consistent org-wide compliance baselines.