
How AWS Config and CloudTrail work together
Think of AWS Config as the source of truth for resource configuration state (snapshots and timelines), and CloudTrail as the accountability/audit service (API activity and actor identity). CloudTrail records API calls (including AWS Config API calls) and identifies who performed them; Config stores the configuration items (CIs), timelines, and resource relationships. When used together:- CloudTrail shows who made a change and when.
- AWS Config shows what changed, the before/after snapshots, and resource relationships.

Config Rules — automated compliance monitoring
Config Rules are the core mechanism for continuous compliance checks. AWS ships a library of managed rules and you can author custom rules (Lambda-backed or AWS-managed). Rules evaluate either:- Change-triggered (near real-time) — triggered when a relevant resource changes.
- Periodic — scheduled scans across resources.
Choose evaluation modes by balancing risk, detection speed, and cost.

Conformance packs — package rules and remediations
Conformance packs bundle multiple Config rules and remediation actions into a single packaged representation of a compliance framework (for example, HIPAA or FedRAMP). They are ideal for repeatable, organization-wide policy enforcement.- Deploy conformance packs from a central delegated account to all member accounts in an AWS Organization.
- Obtain aggregated compliance reporting and centrally manage exceptions.
- Integrate conformance packs with Security Hub for consolidated findings and prioritization.
Conformance packs let you deploy a tested, auditable compliance posture across accounts. Use them to reduce operational overhead by packaging rules and automation into a single, repeatable unit.

Change history, relationships, and remediation workflows
AWS Config records the full configuration history for supported resources, including timestamps and before/after snapshots. When CloudTrail data is available, Config timelines can be correlated with API actors to answer who changed what and when. Config also maps relationships between resources (for example, which EC2 instances or Lambda functions are associated with a security group), which helps with blast-radius analysis during investigations. When a rule detects non-compliance, it can trigger automated remediation. Typical remediation patterns include:- Systems Manager (SSM) Automation runbooks.
- Lambda functions to perform custom fixes.
- Built-in managed remediation actions for common fixes (e.g., enable S3/EBS encryption, revoke permissive security group rules).
- Orchestration via EventBridge to integrate manual approval workflows or third-party ticketing systems.


Aggregators — centralized compliance visibility
Config Aggregators centralize visibility across accounts and regions by aggregating configuration and compliance data into a single view. For organization-wide monitoring:- Enable Config recording in each member account and relevant regions.
- Create an aggregator in a central audit/accounting account.
- Ensure proper cross-account IAM roles/policy permissions so the aggregator can read Config data.
- Use aggregated queries and compliance scoring to prioritize remediation activities.

Drift detection — keep IaC as the source of truth
Detecting configuration drift helps keep infrastructure-as-code (IaC) authoritative. AWS CloudFormation has native drift detection to compare live resources against stack templates. Combine CloudFormation drift detection with AWS Config’s continuous recordings to:- Identify resources modified outside IaC (e.g., security group rule changes).
- Trigger remediation or alerting when drift is detected.
- Ensure your CloudFormation/Terraform state remains the source of truth.

Common use cases
AWS Config supports several production-focused scenarios:
Relationship mapping is especially helpful when answering “who or what is using this resource?” during impact analysis.

Exam and operational mapping
Understanding how Config Rules, remediation, aggregators, and drift detection operate together is useful both for real-world operations and for certification exam preparation. Focus on the integration patterns and decision trade-offs (cost vs. detection speed vs. coverage).
Integration patterns
Common production integration patterns include:- Config + CloudTrail: correlate configuration timelines with API activity to identify actors.
- Config + EventBridge: route rule evaluations to remediation pipelines or external systems.
- Config + Systems Manager (SSM): execute automation documents for remediation.
- Config + Security Hub: aggregate compliance findings for security operations.
- Config + Organizations: deploy and aggregate at scale across accounts.

Cost considerations and optimization
AWS Config billing factors you should plan for:- Charges per configuration item recorded.
- Charges for rule evaluations (frequency and number of resources affect cost).
- Continuous (real-time) evaluations cost more than periodic checks.
- Conformance packs can be more cost-effective than many individual, frequently-evaluated rules.
- Use conformance packs to group and reuse rules.
- Reduce evaluation frequency for stable, low-risk resources.
- Filter which resources are recorded by Config to limit data volume.
- Use S3 lifecycle policies to transition older snapshots to cheaper storage classes.
Balance detection speed against cost: reserve continuous evaluations for high-risk, production-critical resources and use periodic checks for less critical assets.


Next steps — hands-on practice
To prepare for the exam and to operate effectively in production, follow hands-on exercises that demonstrate:- Creating and evaluating Config Rules (managed and custom).
- Implementing automated remediation (SSM, Lambda, EventBridge).
- Deploying conformance packs across accounts.
- Building an aggregator and running cross-account queries.
- Performing drift detection and reconciling IaC with live state.