On this page
On this page
- What Is AWS Config
- Core Components
- CloudTrail vs. AWS Config
- Rule Trigger Types
- Custom Rules (Lambda-Backed)
- Common Managed Rules
- Automatic Remediation
- Multi-Account Management
- Auto-Enabling Config in New Accounts
- Centralized Management: Delegated Administrator
- Protecting the Config Baseline from Deletion
- Conformance Packs vs. CloudFormation StackSets for Rules
- Aggregators
- Notification and Event Flow
- Formatting Notifications with EventBridge Input Transformer
- AWS Config vs. AWS Firewall Manager
- AWS Config vs. CloudFormation Drift Detection
- Bridging the gap: cloudformation-stack-drift-detection-check
- Key Exam Scenarios
- CloudWatch Integration
- Automatically Published
- Requires Setup
AWS Config
AWS Config continuously records the configuration of your AWS resources and evaluates them against rules you define. It answers two questions: "What does my infrastructure look like right now?" and "Has anything changed, and does it comply with my policies?"
Configuration as a Timeline
Every time a resource changes β a security group rule is added, an S3 bucket's public-access setting is modified, an EC2 instance type is changed β AWS Config records the new configuration alongside the previous one. This creates a timeline for every resource in your account. You can go back to any point in time and see exactly what a resource's configuration looked like.
This makes Config invaluable for security investigations. When you discover a breach or a misconfiguration, you can reconstruct exactly who changed what and when, even if the person who made the change deleted it afterward.
Compliance Rules
Config rules evaluate your resources against policies you define. AWS provides hundreds of managed rules β "all S3 buckets must have server-side encryption enabled", "all RDS instances must have multi-AZ enabled", "no security groups should allow unrestricted SSH access from the internet". You can also write custom rules using Lambda functions for policies specific to your organization.
When a resource violates a rule, Config marks it non-compliant and can trigger a notification via SNS or an automated remediation action via Systems Manager Automation.
Config vs CloudTrail
These two services are complementary and often confused. CloudTrail records API calls β who called what operation. Config records resource state β what does the resource look like. CloudTrail tells you "who ran this command"; Config tells you "what did the result look like, and does it comply with policy?"
A complete audit picture uses both: CloudTrail for the who and the action, Config for the before and after state and ongoing compliance assessment.
CloudWatch = what is happening (high CPU) Β· Config = what changed in the setup (instance type modified) Β· CloudTrail = who did it (user "Admin_Bob" made the API call)
And remember: Config detects β it never prevents. Prevention is SCP / IAM / Firewall Manager territory.
Conformance Packs
A conformance pack is a collection of Config rules and remediation actions packaged together to address a specific compliance standard β PCI-DSS, HIPAA, CIS Benchmarks. You deploy a conformance pack and immediately get a compliance dashboard showing how your AWS environment measures up against that standard.