Xoxoftware - XOXO Creative Studio | Web & Mobile App Development | Fred Cheung | Hong Kong
AWSMonitoring

AWS Config

Configuration compliance — continuously record, assess, and audit AWS resource configurations against desired rules and conformance packs.

Overview

AWS Config is a service that continuously records AWS resource configurations and evaluates them against desired rules — it provides a configuration history, compliance auditing, and automated remediation for resources that drift from policy.


Core Concepts

ConceptDescription
Configuration ItemA point-in-time record of a resource's configuration attributes
Configuration RecorderDiscovers and records configuration changes for supported resource types
Config RuleEvaluates whether a resource configuration complies with a desired state
Managed RulePre-built rule maintained by AWS (150+ available)
Custom RuleUser-defined rule backed by a Lambda function
Conformance PackCollection of Config rules + remediation actions deployed as a single unit
Remediation ActionAn SSM Automation document triggered to fix non-compliant resources
AggregatorCollects Config data from multiple accounts and regions into a central view
Configuration SnapshotComplete set of configuration items at a point in time (delivered to S3)

How AWS Config Works

Resource Change (EC2, S3, IAM, etc.)
    → Configuration Recorder (detects change)
        → Configuration Item (stored)
            → Config Rules (evaluate compliance)
                ├── COMPLIANT → No action
                └── NON_COMPLIANT → SNS notification
                                  → Remediation Action (SSM Automation)

Config Rules

Rule Types

TypeDescriptionExample
AWS Managed RulePre-built by AWS; covers common compliance checkss3-bucket-versioning-enabled
Custom Rule (Lambda)Custom evaluation logic in a Lambda functionCheck naming conventions
Custom Rule (Guard)Policy-as-code using CloudFormation Guard DSLDeclarative compliance rules

Trigger Types

TriggerWhen It Evaluates
Configuration changesWhen a monitored resource's configuration changes
PeriodicOn a schedule (1h, 3h, 6h, 12h, 24h)

Common Managed Rules

RuleChecks
s3-bucket-versioning-enabledS3 bucket has versioning enabled
encrypted-volumesEBS volumes are encrypted
restricted-sshSecurity groups do not allow unrestricted SSH
rds-instance-public-access-checkRDS instances are not publicly accessible
required-tagsResources have specific required tags
root-account-mfa-enabledRoot account has MFA enabled
cloudtrail-enabledCloudTrail is enabled in the account

Conformance Packs

  • Bundle of Config rules + remediation actions deployed as a single unit
  • AWS provides sample packs for common frameworks (PCI DSS, CIS, HIPAA, NIST)
  • Custom packs defined in YAML templates
  • Deployed at organization level via Organizations integration

Remediation

Non-Compliant Resource
    → Config Rule (detects violation)
        → Remediation Action
            → SSM Automation Document
                → Fix: enable encryption, add tag, restrict SG, etc.
Remediation TypeDescription
Manual remediationNotification via SNS; human goes and fixes the resource
Automatic remediationSSM Automation runs when non-compliance is detected
RetryConfigurable retry attempts for failed remediations

Multi-Account Aggregation

  • Aggregator collects compliance data from multiple accounts and regions
  • Provides a single-pane view of compliance posture across the organization
  • Does not enforce rules — only aggregates results
  • Deploy rules at scale using Organizations integration or conformance packs

Config vs CloudTrail vs CloudWatch

AspectAWS ConfigCloudTrailCloudWatch
FocusResource configuration stateAPI call history (who did what)Performance metrics and logs
Question answered"Is this resource compliant?""Who changed this resource?""How is this resource performing?"
Data typeConfiguration itemsAPI event logsMetrics, logs, traces
TriggerConfiguration change / periodicEvery API callThreshold breach / schedule

Common Use Cases

  • Compliance auditing — Evaluate all resources against regulatory frameworks (PCI DSS, HIPAA) using conformance packs.
  • Security posture — Detect unencrypted EBS volumes, public S3 buckets, or unrestricted security groups.
  • Configuration history — Track how a resource's configuration has changed over time for root cause analysis.
  • Automated remediation — Automatically fix non-compliant resources (e.g., enable S3 versioning, restrict open security groups).
  • Organization-wide governance — Aggregate compliance data from all accounts into a central view using Config Aggregator.

SAA/SAP Exam Tips

SAA Tip: "Ensure resources comply with company policies" or "detect configuration drift" → AWS Config rules. "Track who made changes" → CloudTrail (different service).

Exam Trap: AWS Config records WHAT the resource configuration IS (and whether it is compliant). CloudTrail records WHO made API calls. Both are needed together for a complete audit trail.

SAP Tip: For organization-wide compliance, deploy Config rules via conformance packs through AWS Organizations — not by configuring rules individually in each account.


Cross-Cloud Equivalents

ProviderService / SolutionNotes
AWSAWS ConfigBaseline
AzureAzure Policy + Azure Resource GraphPolicy enforces; Resource Graph queries state
GCPGoogle Cloud Asset Inventory + Policy AnalyzerAsset history + policy compliance
On-PremisesChef InSpec, Puppet, Ansible (compliance modules)Configuration management with compliance checks

Pricing Model

DimensionUnitNotes
Configuration items recordedPer itemCharged when a change is detected
Config rule evaluationsPer evaluationPer rule × per resource evaluation
Conformance pack evaluationsPer evaluationSame rate as individual rule evaluations
Advanced queriesPer queryFor Config advanced query API

Built by Fred Cheung @CookedRicer · Powered by Fumadocs & Github Copilot

On this page