AWS Config
Records resource configuration, evaluates it with rules and conformance packs, and remediates with SSM Automation.
Exam tasks: 1.1 (skill 1.1.5: automate recurring assessments)
The decision: how do you keep configuration compliance checked and corrected across every account without people remembering to run assessments?
Config records the configuration of supported resources and evaluates it against rules. It answers "is this resource configured the way policy says" and "what did it look like last Tuesday". It is Regional, and it detects. It does not block a change (except through proactive checks before deployment, which also do not block).
Rules
| Item | What to remember |
|---|---|
| Managed rules | Prebuilt by AWS. Examples approved-amis-by-id, restricted-ssh, encrypted-volumes, iam-password-policy, access-keys-rotated |
| Custom Lambda rules | Your function decides COMPLIANT or NON_COMPLIANT. Scope them to resource types or the function runs for every resource |
| Custom policy rules | Written in the Guard policy language, no Lambda to maintain |
| Results | COMPLIANT, NON_COMPLIANT, ERROR, NOT_APPLICABLE |
| Triggers | Configuration change (scoped by type, ID or tag), periodic (you choose the frequency), or both |
| Detective mode | Evaluates deployed resources |
| Proactive mode | Evaluates proposed resource properties before deployment. Does not prevent or fix anything |
| Organization rules | Deploy a rule across accounts from the management or delegated administrator account |
Remediation
- Config remediates with SSM Automation runbooks. Use an AWS runbook or your own.
- Manual or automatic per rule. Automatic can retry, for example 5 attempts within 300 seconds. Retries cost money.
- Automatic remediation works on the last compliance snapshot, so it can fire on a resource that was just fixed.
- Remediation cannot be attached to service-linked rules.
- Alternative path. Config compliance change events go to EventBridge, which starts Lambda, SNS or Step Functions.
Conformance packs
| Item | What to remember |
|---|---|
| What | A YAML template of rules plus remediation actions deployed as one unit |
| Scope | One account and Region, or an organization through the management or delegated administrator account |
| Templates | AWS sample packs for best practices and frameworks, or write your own. Can be stored as SSM documents |
| Dashboard | Compliance score is the share of compliant rule and resource pairs |
Recurring assessments and automation
Skill 1.1.5 asks you to keep assessments running without people remembering to run them.
| Need | Mechanism |
|---|---|
| Continuous configuration compliance across the organization | AWS Config rules and conformance packs deployed org-wide from a delegated admin |
| Benchmark against CIS, PCI DSS, NIST, FSBP | Security Hub CSPM standards via central configuration |
| Keep the SSM Agent, CloudWatch agent or a hardening baseline in place on every instance | Systems Manager State Manager associations on a schedule |
| Continuous vulnerability scanning | Inspector, activated org-wide |
| Weekly proof that buckets hold no sensitive data | Macie scheduled discovery job |
| Evidence collection for auditors | AWS Audit Manager (see Compliance evaluation) |
- Conformance packs bundle Config rules (and optional remediation actions) into one deployable unit, and give a compliance score per pack.
- A State Manager association re-applies its document on a schedule, so drift gets corrected rather than just reported. Pair it with Config for the reporting side.
Which one to use
| Need | Pick |
|---|---|
| Continuous check of your own resources against your rules, with history | Config |
| Predefined AWS best practice advice | Trusted Advisor |
| Benchmark scores such as CIS | Security Hub CSPM (it runs on Config rules) |
| Enforce guardrails before the API call | SCPs, IAM, or CloudFormation Guard and hooks |
Example. Every VPC needs flow logs to a central bucket. A Config rule flags VPCs without flow logs. Remediation is an SSM Automation runbook or an EventBridge rule calling Lambda that creates the flow log.
Exam trap
Config does not stop a noncompliant resource from being created. Pick SCPs or IAM conditions for prevention. Config is the detect-and-fix answer.
Exam signal
"Only approved AMIs may run": the managed rule approved-amis-by-id plus remediation. "Apply the same compliance rules to every account": organization conformance pack.
Related
Security Hub, Trusted Advisor and Health, Systems Manager. Security Hub CSPM controls show no data when Config is not recording, see Troubleshooting the monitoring pipeline. Config compliance covers the governance view.
Further reading
AWS Security Hub
Central place for findings, posture checks and automation. Know Security Hub versus Security Hub CSPM and what feeds it.
Alerting mechanisms and dashboards
Turning logs, metrics and findings into alerts with CloudWatch metric filters and alarms and EventBridge rules, plus resource health checks and dashboards in CloudWatch and Managed Grafana.