Recording Resource Configuration with AWS Config
AWS Config records the configuration of AWS resources and how it changes over time. It is the foundation for compliance evaluation, auditing, troubleshooting and change tracking. This lesson explains the configuration recorder and delivery channel, configuration items and history, advanced queries and aggregators for multi-account visibility, and the cost implications of recording choices.
Learning outcomes
After completing this lesson, you will be able to:
- Describe the configuration recorder, the delivery channel and the recording strategy options.
- Explain configuration items, configuration history, snapshots and resource relationships.
- Explain how advanced queries and aggregators provide multi-account, multi-Region views.
- Identify recording choices that affect cost and coverage.
What AWS Config Records
AWS Config continuously records the configuration of supported resources in an account and Region. Each time a resource is created, changed or deleted, Config captures a configuration item (CI): a point-in-time record of the resource's attributes, its relationships to other resources, its tags and links to the CloudTrail events that caused the change. The sequence of CIs is the resource's configuration history, which answers questions such as "what did this security group allow last Tuesday?" and "who changed it?". Config is therefore both an audit tool and a troubleshooting tool: when an application broke after an unknown change, the configuration timeline shows what changed and when.
The Recorder and the Delivery Channel
Recording is controlled by a configuration recorder per Region. Its recording strategy can record all supported resource types (with optional exclusions) or only selected types. Recording frequency can be continuous, recording every change as it happens, or daily (periodic), recording at most one CI per resource per day for resources whose intermediate changes are not needed, which reduces cost. Frequency can be overridden per resource type. Global resources, such as IAM users, roles and policies, should be recorded in only one Region, otherwise they are recorded and charged in every Region.
The delivery channel delivers configuration snapshots and history files to an S3 bucket, often in a central log archive account, and can send notifications to an SNS topic. Config also emits events to EventBridge for configuration item changes and compliance changes, which is the preferred integration point for automation. Config requires a service-linked role to read resource configurations.
Recording configuration
Relationships, Timelines and Advanced Queries
Config understands relationships, such as an EC2 instance being attached to a security group, a subnet and an EBS volume. The resource timeline in the console shows configuration changes, related CloudTrail events and compliance results together, which makes it the fastest way to correlate a change with an incident.
Advanced queries use a subset of SQL to query the current configuration of resources, for example to list every EBS volume that is not encrypted or every EC2 instance of a given type, without writing scripts that call many APIs.
SELECT resourceId, accountId, awsRegion, configuration.volumeType, configuration.size
WHERE resourceType = 'AWS::EC2::Volume'
AND configuration.encrypted = falseAggregators
An aggregator collects configuration and compliance data from multiple accounts and Regions into one account, normally the security tooling account registered as a delegated administrator for Config. An organisation aggregator includes every account in the organisation automatically, including new ones; an individual-account aggregator requires each source account to authorise it. Aggregators are read-only views: advanced queries can run against the aggregator to search the whole organisation, and the aggregated compliance dashboard shows non-compliant resources everywhere. They do not deploy rules or recorders; those must be enabled in each account, for example by Control Tower, StackSets or organisation rules and conformance packs.
Cost and Coverage Considerations
AWS Config charges per configuration item recorded and per rule evaluation. Resources that change very often, such as network interfaces created by Lambda functions or containers, can generate large numbers of CIs. Excluding resource types that are not needed for compliance, recording such types daily, and recording global resources in one Region reduce cost without losing important coverage. Conversely, a recorder that is turned off or excludes required types creates a compliance blind spot, which is why landing zones protect the recorder with SCPs.
The table below summarises the recording choices and their effect.
| Choice | Effect |
|---|---|
| Record all resource types | Maximum coverage; highest cost |
| Exclude specific types | Removes noisy types that are not needed for compliance |
| Daily recording for selected types | One CI per day; intermediate changes are not captured |
| Global resources in one Region | Avoids duplicate IAM recording |
| Central S3 delivery and aggregator | Organisation-wide audit and visibility |
Answering an Audit Question
An auditor asks which security groups in the organisation allowed inbound access from 0.0.0.0/0 on port 3389 at any time in the past quarter, who changed them and when they were corrected.
The security team runs an advanced query against the organisation aggregator to find security groups that currently allow the access. For history, the team uses each security group's configuration timeline, which lists every CI with the linked CloudTrail event showing the IAM principal that made the change. Because Config delivers configuration history files to the central S3 bucket, the team can also query the history at scale with Amazon Athena. Going forward, the managed rule restricted-common-ports evaluates such changes as they happen.
An aggregator in the security account shows no data for a newly created account. The organisation aggregator is configured correctly. What is the most likely reason?
Show answer
AWS Config is not recording in the new account. Aggregators only collect data; the recorder and delivery channel must be enabled in each account and Region, for example by Control Tower or a StackSet.
Exam Tips
Remember for the exam
- AWS Config records configuration items with relationships and links to CloudTrail events; the timeline correlates changes with incidents.
- Record global (IAM) resources in one Region; use daily recording or exclusions for noisy resource types to control cost.
- Aggregators provide read-only multi-account, multi-Region views and advanced queries; they do not enable recording.
- Advanced queries use SQL to find resources by current configuration.