NIST SP 800-53 Rev. 5 · Configuration Management
CM-6 / CM-3 on AWS
Configuration deviation without an approved change — a published SQL (Athena) + Lambda query you can run against Amazon Athena over AWS Config compliance history, with the evidence it needs, the settings you decide, and what a result does and does not establish.
Why this matters
A security setting quietly changed with no approval behind it
Organizations agree a standard configuration and a process for changing it. Under time pressure the setting gets changed directly and the paperwork never follows, and the change is indistinguishable from one that was properly approved. Many changes are entirely legitimate, so reporting every change produces a list nobody reads.
Why this check earns its place. It reports only changes with no approval record behind them, which is a far shorter and far more useful list than every change that occurred.
- What it reads
- The organization's current settings, compared against its agreed standard and its own record of approved changes.
- What it reports
- Settings that differ from the agreed standard with no matching approval on record.
See related public disclosures on the Signals page →
What this finds
Security-relevant configuration differs from the approved baseline with no matching approved change record.
The requirement
The organization must establish and document configuration settings that reflect the most restrictive mode consistent with operational requirements, identify and document any deviations, and approve and control changes under configuration change control.
NIST SP 800-53 Rev. 5 — CM-6 (Configuration Settings) and CM-3 (Configuration Change Control).
NIST requires documented settings and controlled change. The approved baseline values, in-scope resources, the tolerance window for matching a change to an approval, and pre-authorized automation identities are all organization-defined.
How this maps to the CISA performance goals
The Cross-Sector Cybersecurity Performance Goals are a voluntary baseline published by CISA — the U.S. federal agency for critical-infrastructure cybersecurity — written for organizations too small to employ security staff. This control speaks to:
- 3.N — Establish change management processes
The goal is a change management process; the pack finds configuration that moved without an approved change. - 3.P — Maintain hardware & software approval process (partial — see note)
Touches the approval process for what runs, but the pack checks configuration drift rather than the software approval list.
See the full coverage map, including the goals no query can answer →
Evidence this query needs
Change approval records change_approvals.csv
Lets a configuration deviation be matched to an authorisation. Without it, every drift event looks unauthorised — which is both wrong and unusable in volume.
Minimum fields: ticket_id, resource_id, approved_at
A ticket, a resource, and an approval time are enough to correlate. Adding the implementation window is what turns a coarse ±24-hour match into a precise one.
The query
Published as cm-6-config-deviation.aws.sql. Reads aws_config_compliance, change_approvals (supplied). Requires: athena:StartQueryExecution; s3:GetObject on the Config bucket.
Before this returns anything,
aws_config_compliance has to be reaching Amazon Athena over AWS Config compliance history, and change_approvals (supplied) has to be landed there. If not, the query reports nothing found — which looks
exactly like nothing wrong. What has to be switched on first →
-- CM-6 / CM-3 -- non-compliant resources with no matching approval
SELECT
c.resource_id, c.resource_type, c.config_rule_name,
c.compliance_type, c.result_recorded_time,
t.ticket_id, t.approver,
'AWS Config' AS source_system
FROM aws_config_compliance c
LEFT JOIN change_approvals t
ON c.resource_id = t.resource_id
AND (
(t.window_start IS NOT NULL AND t.window_end IS NOT NULL
AND c.result_recorded_time BETWEEN t.window_start AND t.window_end)
OR (t.window_start IS NULL
AND date_diff('hour', t.approved_at, c.result_recorded_time)
BETWEEN -24 AND 24)
)
WHERE c.compliance_type = 'NON_COMPLIANT'
AND t.ticket_id IS NULL
ORDER BY c.result_recorded_time DESC;
Open this pack on AWS to adjust the settings and download it →
The interactive version opens on AWS — the platform on this page — even if your environment profile does not list it.
Settings you decide
NIST states the objective and leaves these to your organization. The interactive version of this pack applies them to the query for you.
- Approval matching tolerance (hours) (default 24)
- How far either side of the approval timestamp a change may fall and still be treated as authorised.
- Limit to specific resources (optional)
- Paste resource identifiers, one per line.
Running it continuously
EventBridge rule → Lambda → Security Hub
Trigger: EventBridge rule on AWS Config
compliance-change events (near real time)
Compute: Lambda (Python 3.12), 60s timeout
Step 1: Receive NON_COMPLIANT compliance-change event
Step 2: Query change_approvals for a matching approval
Step 3: If no match, BatchImportFindings -> Security Hub
Severity label: MEDIUM
RelatedRequirements: NIST.800-53.r5 CM-6, CM-3
Idempotency: Id = sha256(resource_id + rule + timestamp)
Event-driven rather than scheduled: AWS Config emits a compliance-change event, so the Lambda evaluates the approval match within moments of the deviation rather than waiting for a daily run.
What a result does not prove
An unmatched deviation is not automatically unauthorized or harmful. Approval evidence usually lives outside the cloud platform, and correlation depends entirely on the completeness of the change feed.
Validation status for this platform: Not tenant-validated. Structure, query generation, and preflight are covered by the project's automated test suites. This pack has not been executed against a live tenant, account, or index. Validate it in a non-production scope before relying on any result.
Before you act on a result
- Does an approved change exist outside the matching window or in another system?
- Was the change made by a pre-authorized automation identity?
- Is there an approved, current exception for this resource and setting?
- Was post-change validation required, and was it completed?
Common questions
- How do I check for configuration deviation without an approved change in AWS?
- Run the published SQL (Athena) + Lambda query on this page against Amazon Athena over AWS Config compliance history. It reads aws_config_compliance, change_approvals (supplied) and reports: Security-relevant configuration differs from the approved baseline with no matching approved change record.
- What permissions are needed to run this AWS query?
- athena:StartQueryExecution; s3:GetObject on the Config bucket.
- What evidence does CM-6 / CM-3 need that AWS cannot produce?
- Change approval records (change_approvals.csv). Lets a configuration deviation be matched to an authorisation. Without it, every drift event looks unauthorised — which is both wrong and unusable in volume. At minimum it must carry: ticket_id, resource_id, approved_at.
- Does a result from this query mean the control has failed?
- An unmatched deviation is not automatically unauthorized or harmful. Approval evidence usually lives outside the cloud platform, and correlation depends entirely on the completeness of the change feed.
Terms used on this page
- NIST SP 800-53the U.S. federal catalogue of security requirements
- The catalogue of security and privacy requirements published by the National Institute of Standards and Technology, a U.S. federal agency. U.S. government systems are measured against it, and many private organizations adopt it voluntarily. Each requirement has an identifier such as AC-2. Official source →
- CISACybersecurity and Infrastructure Security Agency
- The U.S. federal agency responsible for national critical-infrastructure cybersecurity. Its publications are works of the U.S. government and are free to use. Official source →
- CPGCross-Sector Cybersecurity Performance Goals
- A voluntary baseline of security practices published by the U.S. Cybersecurity and Infrastructure Security Agency, written specifically for organizations too small to employ security staff. It is a short, plainly written starting list rather than a full standard. Official source →
- not tenant-validatednever executed against real data
- The check has passed the project's automated tests for structure and syntax, but has never been run against real data anywhere. Test it in a safe scope before relying on any result.