Module Overview
Estimated Time: 2-3 hours | Difficulty: Intermediate | Prerequisites: IAM, basic compliance concepts
- Config recorders and delivery channels
- Managed and custom rules
- Conformance packs for compliance
- Automatic remediation
- Advanced queries with Config Aggregator
How Config Works
Enabling AWS Config
Console or CLI
CloudFormation
Config Rules
Managed Rules
AWS provides 300+ managed rules. Think of managed rules as pre-built inspections — AWS maintains the evaluation logic and keeps it updated as services evolve. You only pay per evaluation (~$0.001 per rule evaluation per resource). Common mistake: enabling every managed rule on day one. Start with the 10-15 rules that map to your compliance framework (CIS, PCI, SOC2), then expand once your team builds the discipline to respond to findings. Fifty rules generating 200 NON_COMPLIANT findings that nobody investigates is worse than 10 rules with 100% follow-through.Create Managed Rule
Custom Rules (Lambda)
Conformance Packs
Deploy Conformance Pack
AWS Sample Conformance Packs
Automatic Remediation
Remediation with SSM
Custom Remediation Lambda
Config Aggregator
Multi-Account Aggregation
The Aggregator is like a central security desk that pulls compliance data from all your accounts and regions into one view. Without it, you would need to log into each account individually to check compliance — impractical beyond a handful of accounts. A senior engineer would say: “We use a Config Aggregator in our security account so the compliance team has a single pane of glass across all 50 accounts.” Cost tip: the Aggregator itself is free. You only pay for Config recordings and rule evaluations in each source account.Create Aggregator
Advanced Queries
Configuration Timeline
Best Practices
Enable All Resources
Record all resource types for complete visibility
Use Conformance Packs
Deploy rules as conformance packs for consistency
Automate Remediation
Use SSM automation for automatic fixes
Centralize with Aggregator
Use Config Aggregator for multi-account visibility
🎯 Interview Questions
Q1: How does AWS Config differ from CloudTrail?
Q1: How does AWS Config differ from CloudTrail?
CloudTrail = Who did what, when (the security camera footage)
- Records API calls
- Answers: “Who deleted the S3 bucket at 2 AM?”
- Focus: API activity auditing
- Records resource configurations over time
- Answers: “Is this S3 bucket public? When did it become public?”
- Focus: Configuration compliance and drift detection
Q2: How do you implement drift detection at scale?
Q2: How do you implement drift detection at scale?
- Enable Config in all accounts and regions
- Deploy conformance packs via Organizations
- Create aggregator for centralized view
- Set up notifications for non-compliant resources
- Automate remediation with SSM documents
- Track trends with compliance dashboards
Q3: How do you handle false positives in Config rules?
Q3: How do you handle false positives in Config rules?
Options:
- Scope rules: Limit to specific resource types or tags
- Suppression: Use resource exceptions in rule
- Custom rules: Write Lambda for nuanced evaluation
- Tags: Exclude resources with specific tags
- Document: Maintain exception registry
Hands-On Lab
1
Enable AWS Config
Set up Config recorder with S3 delivery channel
2
Deploy Managed Rules
Enable 5 common security rules
3
Create Custom Rule
Write Lambda-based rule for required tags
4
Set Up Remediation
Configure automatic remediation for S3 public access
5
Create Aggregator
Set up cross-account aggregator and run queries
Next Module
AWS Inspector
Automated vulnerability scanning for EC2, Lambda, and containers