Skip to Content

AWS Config

AWS Config for recording resource configurations and compliance, managed and custom Config rules, pricing, resource timelines, automatic remediation with SSM Automation, and notifications.

What it is

AWS Config helps with auditing and recording compliance of AWS resources.

  • It records configurations and changes over time.
  • Questions AWS Config can answer:
    • Is there unrestricted SSH access to my security groups?
    • Do my buckets have any public access?
    • How has my ALB configuration changed over time?
  • Alerts (SNS notifications) can be sent for any changes.
  • AWS Config is a per-Region service.
  • It can be aggregated across Regions and accounts (an aggregator).
  • The configuration data can be stored in S3 (and analyse it with Athena).

Config rules

  • Use AWS managed Config rules (hundreds of them; the slides say over 75).
  • Make custom Config rules, defined in AWS Lambda (or with the Guard policy language):
    • for example, evaluate whether each EBS disk is of type gp2;
    • or whether each EC2 instance is a t2.micro.
  • Rules can be evaluated or triggered:
    • for each configuration change;
    • and/or at regular time intervals.
  • AWS Config rules do not prevent actions from happening (no deny).
  • Pricing: no free tier; about $0.003 per configuration item recorded per Region, and $0.001 per rule evaluation per Region.

Config resource view

For each resource, AWS Config shows:

  • its compliance over time (compliant, non-compliant);
  • its configuration over time (each change, field by field);
  • the CloudTrail API calls made on it over time.

Remediations

AWS Config auto remediation: a Config rule finds an unused IAM access key NON_COMPLIANT and triggers an SSM Automation runbook that deactivates the key, retrying if the resource is still non-compliant AWS Config auto remediation: a Config rule finds an unused IAM access key NON_COMPLIANT and triggers an SSM Automation runbook that deactivates the key, retrying if the resource is still non-compliant

Find the problem, then fix it automatically.
  • Automate remediation of non-compliant resources with SSM Automation documents.
  • Use AWS-managed Automation documents, or create custom ones. Tip: a custom Automation document can invoke a Lambda function.
  • Set remediation retries if the resource is still non-compliant after auto remediation.

For example, a rule finds IAM access keys older than 90 days (NON_COMPLIANT) and triggers the AWSConfigRemediation-RevokeUnusedIAMUserCredentials document, which deactivates them.

Notifications

  • Use EventBridge to trigger notifications when AWS resources become non-compliant, and send them to Lambda, SNS, SQS…
  • Send configuration changes and compliance state notifications to SNS (all events; use SNS filtering, or filter on the client side), for example to email an admin.

Real-world examples

  • A security team uses the managed rule restricted-ssh to find every security group open to 0.0.0.0/0 on port 22, and an auto remediation removes the rule.
  • An auditor asks how a load balancer was configured on 3 March. The Config timeline shows its listeners, security groups and certificate on that day.

Exam tips

  • "Is this resource compliant?", "track configuration changes over time" → AWS Config.
  • "Automatically fix non-compliant resources" → Config rule + remediation with SSM Automation.
  • "Notify when a resource becomes non-compliant" → Config + EventBridge (or SNS).
  • "Compliance across accounts and Regions" → Config aggregator.
  • "Custom compliance check" → custom Config rule with Lambda.

Common traps

  • "Config prevents non-compliant changes." It only detects (and can remediate after the fact). To prevent, use IAM policies or SCPs.
  • "Config is global." It's per Region; aggregate for one view.

Check yourself

Config charges for every configuration item it records as soon as it is turned on, so instead:

AWS documentation

On this page

Open notes

Spotted a mistake?

These notes are open source. Suggest a fix, or star the repo if they helped you.

Suggest an edit

For AI agents: llms.txt · llms-full.txt