"Nobody knows what changed last night." If the security group that worked yesterday is broken today, guessing is not a plan. AWS Config keeps a history of how your resources are configured, change by change, so you can see what a resource looked like at any moment it was being recorded, and get told when a setting breaks your rules.
What AWS Config records
AWS Config records the configuration of supported resources: security groups, S3 buckets, IAM roles and policies, EC2 instances, VPCs and many more. Each recorded change becomes a configuration item: a snapshot of the resource's settings, its metadata and its relationships (which instances use this security group, which VPC a subnet belongs to).
Two things trip people up:
- Config is not on by default. You turn on the configuration recorder in each Region and choose which resource types to record.
- It is not free. You pay per configuration item recorded and per rule evaluation, so recording every resource type in a busy account deserves a quick cost check.
Rules flag the drift
AWS Config rules evaluate your resources against the settings you expect. AWS provides hundreds of managed rules, for example s3-bucket-public-read-prohibited, which marks a bucket that allows public reads as noncompliant. You can also write custom rules with Lambda or Guard.
Rules can run when a resource changes, on a schedule, or both. Conformance packs bundle many rules (and their remediation) into one unit you deploy across accounts, and an aggregator collects compliance and inventory from many accounts and Regions into one view.
Fixing what the rules find
Remediation attaches an action to a rule, using an AWS Systems Manager Automation document. It can run manually, when someone clicks, or automatically. A common pattern is auto-remediating the obvious cases (turning off public access on a bucket) and sending the rest to a human. Test automatic remediation carefully: a rule that "fixes" a resource your application depends on can cause an outage.
Config vs CloudTrail
They answer different questions and work best together:
- CloudTrail: who made which API call, and when.
- AWS Config: what the resource looks like now, what it looked like before, and whether it complies.
From a configuration change in Config you can jump to the CloudTrail events behind it, which turns "port 22 is open" into "this role opened port 22 at 02:14".
Where AI fits
AI projects create new resources fast, often outside the usual review: notebooks, training-data buckets, model endpoints. Config watches them like any other resource. If someone gives a SageMaker notebook direct internet access, the managed rule sagemaker-notebook-no-direct-internet-access flags it; if someone opens up the S3 bucket that holds training data, the S3 public-access rules flag that too. Combine those rules in a conformance pack for AI accounts, so the drift is caught even when the people creating resources are moving quickly.
Quick recap
- Config records every setting of supported resources, with history and relationships; turn on the recorder per Region.
- Rules flag drift, remediation fixes it, conformance packs bundle rules.
- CloudTrail says who, Config says what.
- Use rules to catch AI resources being opened up: notebooks with internet access, public training data.