Skip to main content
AWS Config Architecture

Module Overview

Estimated Time: 2-3 hours | Difficulty: Intermediate | Prerequisites: IAM, basic compliance concepts
AWS Config provides a detailed view of the configuration of AWS resources in your account. It continuously monitors and records configuration changes, and evaluates them against desired configurations using rules. Think of CloudTrail as the security camera (who did what) and AWS Config as the building inspector (is the current state of the building up to code?). CloudTrail tells you “Alice modified security group sg-123 at 3 PM.” Config tells you “security group sg-123 currently allows SSH from 0.0.0.0/0, which violates rule restricted-ssh.” Together, they answer both the “who changed it” and “is it compliant” questions.
Cost awareness: Config charges per configuration item recorded (~0.003each)plusperruleevaluation( 0.003 each) plus per rule evaluation (~0.001 each). In a large account with 10,000+ resources and 50 rules, this can reach $500-1,000/month. Use resource type scoping to record only what you need, especially in development accounts.
What You’ll Learn:
  • 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

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
AWS Config = What is the configuration (the building inspector report)
  • Records resource configurations over time
  • Answers: “Is this S3 bucket public? When did it become public?”
  • Focus: Configuration compliance and drift detection
They complement each other: Config gives you the diff, CloudTrail gives you the git blame. In an incident, use Config to see what changed and CloudTrail to see who changed it.
  1. Enable Config in all accounts and regions
  2. Deploy conformance packs via Organizations
  3. Create aggregator for centralized view
  4. Set up notifications for non-compliant resources
  5. Automate remediation with SSM documents
  6. Track trends with compliance dashboards
Options:
  1. Scope rules: Limit to specific resource types or tags
  2. Suppression: Use resource exceptions in rule
  3. Custom rules: Write Lambda for nuanced evaluation
  4. Tags: Exclude resources with specific tags
  5. 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