DLM Lifecycle Policy Auditor
Mindset
One-line takeaway: a DLM policy with State: ENABLED proves nothing
about whether backups are actually running — three layers can fail silently
beneath it (empty tag targets, broken service role, invalid Cron), and the
policy object surfaces none of them.
DLM automates EBS snapshot creation, retention, and cross-region copy on a
schedule. It looks deceptively simple in the console. The danger is that
DLM has no native health indicator in the policy object: State: ENABLED
means "the policy is registered", not "it has ever executed successfully."
The three silent-failure modes that every auditor must check:
- Disabled policy.
State: DISABLED — the policy is registered but
creates zero snapshots. Operators disable a policy to "pause for
maintenance" and forget to re-enable. No alert fires.
- Empty/broken target set.
TargetTags: [] or ResourceTypes: [] means
zero volumes match. The policy runs on schedule and snapshots nothing.
- Service-role breakage. DLM assumes
AWSDataLifecycleManagerServiceRole
to call ec2:CreateSnapshot. If that role is deleted, its trust policy is
revoked, or it lacks kms:Decrypt on the source key, the policy stays
ENABLED but CloudTrail logs AccessDenied on every scheduled run. The
policy object never reflects this.
The only ground-truth signal that a policy actually created snapshots is
aws ec2 describe-snapshots --filters "Name=tag:aws:dlm:lifecycle-policy-id,Values=<id>"
— the aws:dlm:lifecycle-policy-id tag is auto-applied by DLM to every
snapshot it creates. A policy that has never produced a tagged snapshot has
either never run or has been silently failing since creation.
Quick reference — verdict thresholds
| Condition |
Verdict |
Step |
| Account has zero enabled DLM policies covering the workload's volumes |
NO_POLICY |
Step 1 |
State: DISABLED (policy registered but not running) |
MISCONFIGURED |
Step 2 |
TargetTags: [] or ResourceTypes: [] (zero targets) |
MISCONFIGURED |
Step 3 |
Any Schedule.CreateRule missing or invalid (no Cron, no Interval, 5-field cron) |
MISCONFIGURED |
Step 4 |
Any Schedule.RetainRule entirely absent (unbounded retention) |
MISCONFIGURED |
Step 5 |
RetainRule.Count: 1 or RetainRule.Interval < 7 days (no recovery history) |
CONFIG_GAP |
Step 6 |
No CrossRegionCopyTargets for any schedule (no DR) |
CONFIG_GAP |
Step 7 |
CopyTags: false or absent (metadata/automation loss) |
CONFIG_GAP |
Step 8 |
RetainRule.Count >= 1000 (per-volume snapshot quota risk) |
CONFIG_GAP |
Step 9 |
| Enabled + valid schedule + sensible retention + DR + CopyTags |
OK |
Step 10 |
See the ordered steps below for edge cases. Deep DLM internals (service-role
flow, snapshot-tag conventions, Cron syntax quirks) are in the
Deep reference section at the end.
Pre-flight: data collection gate (run before classification)
Full pre-flight command listings (coverage audit, per-policy execution
verification, live-account checks) moved to references/diagnostic-commands.md.
Process — Classification logic (apply in order, aggregate worst)
Step 0: Expert knowledge — non-obvious DLM behaviors that change classification
Expert-knowledge deep dive (cron quirks, cross-region KMS flow, quota,
IAM drift, observability limits) moved to references/advanced-patterns.md.
Step 1: Workload coverage — does ANY enabled policy protect these volumes?
Scope: apply this step when the input is an account or workload (not a
single policy document). When auditing a single policy object, skip to Step 2.
- If
get-lifecycle-policies returns [] (zero policies in the account) AND
the account hosts EBS volumes tagged for production → NO_POLICY. This is
the most severe finding: zero automated backup exists. The verdict is
NO_POLICY regardless of any other consideration.
- If policies exist but NONE is
State: ENABLED AND targets tags that
intersect the workload's volume tags → NO_POLICY for that workload. A
disabled policy targeting the workload's tags does not cover it; an enabled
policy targeting unrelated tags does not cover it.
- Verify intersection: list the workload's volumes
(
describe-volumes --filters "Name=tag-key,Values=<tag>"), collect their
tag sets, and confirm at least one ENABLED policy's TargetTags is a
subset of (or matches) those tag sets. Case-sensitive exact match.
NO_POLICY is the highest-severity verdict — it means a workload has no
automated EBS backup at all, and every volume is one misconfiguration away
from permanent data loss on deletion.
Step 2: State check — is the policy actually running?
State: DISABLED → MISCONFIGURED. The policy is registered but creates
zero snapshots. Operators disable policies for maintenance and forget to
re-enable; console-driven workflows sometimes leave a policy DISABLED after
a tag edit. No CloudWatch alarm fires on this transition.
State: ENABLED → proceed. Note: ENABLED proves registration only — it
does NOT prove execution. Continue to Step 3.
Step 3: Target coverage — can the policy match any volume?
PolicyDetails.TargetTags: [] (empty array) → MISCONFIGURED. With no
tag filters, no volumes match (DLM does NOT default to "all volumes"). The
policy runs on schedule and snapshots nothing.
PolicyDetails.ResourceTypes: [] (empty) → MISCONFIGURED. For an
EBS_SNAPSHOT_POLICY, ResourceTypes must include VOLUME and/or INSTANCE.
TargetTags present but matches zero volumes in the account (verify via
describe-volumes --filters) → MISCONFIGURED with a note that the tags
may be case-mismatched. A valid-looking tag set that matches nothing is
functionally identical to empty TargetTags.
Step 4: Schedule validity — can the policy create snapshots on schedule?
For each entry in PolicyDetails.Schedules[]:
CreateRule entirely absent → MISCONFIGURED. No creation trigger.
CreateRule.CronExpression is 5-field (e.g., 0 5 * * ?) →
MISCONFIGURED. DLM requires 6-field cron (with year). A 5-field cron
is rejected at creation but may persist if the policy was edited via an
older tool that did not validate.
CreateRule has neither CronExpression nor Interval + IntervalUnit
→ MISCONFIGURED. At least one creation trigger is required.
CreateRule.Interval < 12 with IntervalUnit: HOURS → MISCONFIGURED
(minimum 12-hour interval enforced by API).
Step 5: Retention validity — is retention bounded?
For each Schedule:
RetainRule entirely absent → MISCONFIGURED. Without a RetainRule,
DLM never deletes snapshots — retention is unbounded. This is not "keep
forever" (a deliberate choice); it is a missing field that will hit the
per-volume snapshot quota (1,000) and then silently stop creating new
snapshots. The oldest is NOT deleted to make room.
RetainRule present but both Count and Interval/IntervalUnit are
null/absent → MISCONFIGURED. The rule exists but specifies no bound.
Step 6: Retention strength — is recovery history adequate?
RetainRule.Count: 1 → CONFIG_GAP. A single snapshot means zero
recovery history — any corruption in the most recent snapshot is
unrecoverable. Minimum recommended Count is 7 (one week of daily snapshots)
for production volumes.
RetainRule.Interval < 7 with IntervalUnit: DAYS → CONFIG_GAP. Less
than 7 days of retention is inadequate for most RPO/RTO targets. Note the
workload's actual RPO requirement before flagging — a test environment may
legitimately retain 3 days.
Step 7: DR coverage — is there a cross-region copy?
- No
CrossRegionCopyTargets on any schedule (or the array is empty) →
CONFIG_GAP. Single-region snapshots mean a regional outage or the
loss of the primary region destroys all backups along with the primary.
Cross-region copy is the minimum DR posture for any production volume.
CrossRegionCopyTargets present but EncryptionConfiguration absent AND
the destination region's default EBS encryption is false → CONFIG_GAP
(unencrypted DR snapshots). This requires knowing the destination region's
encryption default — if unknown, flag as a verification item.
Step 8: Metadata preservation — are tags copied?
CopyTags: false OR CopyTags absent (the default) → CONFIG_GAP.
Source volume tags are dropped from the snapshot except Name and
aws:dlm:*. This breaks cost-allocation, cleanup, and restore automation
that filters snapshots by tag. CopyTags: true is the correct default for
production.
Step 9: Quota and cost risks
RetainRule.Count >= 1000 → CONFIG_GAP. Approaching the per-volume
snapshot quota (1,000). When the quota is hit, DLM stops creating new
snapshots silently — the oldest is NOT deleted. This is a recovery-coverage
cliff.
FastRestoreRule present on a policy whose TargetTags suggest non-boot
volumes (e.g., data volumes, not OS volumes) → CONFIG_GAP (cost risk).
FastRestore is ~$0.75/AZ-hour/snapshot and should be reserved for
rapidly-attached snapshots.
Step 10: Aggregation — worst finding wins
The final verdict is the worst finding across all steps, where
NO_POLICY > MISCONFIGURED > CONFIG_GAP > OK:
verdict = max(step1_finding, step2_finding, ..., step9_finding)
If no findings (all dimensions pass), the verdict is OK. Note that OK
requires verification that the policy has actually produced snapshots
(Step 1 execution check) — a policy that is structurally clean but has never
executed should be flagged as a verification item, not a clean OK.
Output format (per policy)
POLICY: <policy-id, or "ACCOUNT/<workload>" for coverage audits>
VERDICT: NO_POLICY | MISCONFIGURED | CONFIG_GAP | OK
REASON: <1-2 sentences citing the worst finding and its step number>
FINDINGS:
- [MISCONFIGURED] <finding description (Step N)>
- [CONFIG_GAP] <finding description (Step N)>
REMEDIATION: <specific action per finding, or "None required" if OK>
Worked example — disabled policy with no cross-region copy
POLICY: policy-0abc123456 (production-ebs-daily)
VERDICT: MISCONFIGURED
REASON: Policy State is DISABLED — zero snapshots are being created
regardless of how well-formed the schedules are (Step 2). Additionally, no
cross-region copy is configured (Step 7).
FINDINGS:
- [MISCONFIGURED] State: DISABLED — policy registered but not running (Step 2)
- [CONFIG_GAP] No CrossRegionCopyTargets on schedule daily-6am — no DR (Step 7)
- [CONFIG_GAP] CopyTags absent — source volume tags dropped from snapshots (Step 8)
REMEDIATION:
1. Re-enable: aws dlm update-lifecycle-policy --policy-id policy-0abc123456 --state ENABLED.
2. Add a cross-region copy target to the schedule (see Deep reference for
EncryptionConfiguration syntax).
3. Set CopyTags: true on the schedule to preserve volume attribution.
4. Verify execution after re-enabling:
aws ec2 describe-snapshots --filters "Name=tag:aws:dlm:lifecycle-policy-id,Values=policy-0abc123456".
Edge-case handling
Edge-case catalog (multi-schedule, malformed fields, share-as-DR, zero
execution history) moved to references/advanced-patterns.md.
Anti-Patterns — NEVER
NEVER classify a State: DISABLED policy as anything other than
MISCONFIGURED (or NO_POLICY for the workload it was supposed to cover).
A disabled policy creates zero snapshots — "the policy exists" is not
coverage. This is the most common false-OK in DLM audits.
NEVER declare a policy OK based on State: ENABLED alone. ENABLED proves
registration, not execution. The policy object has no "last run" field.
Always cross-check with describe-snapshots --filters "Name=tag:aws:dlm:lifecycle-policy-id,Values=<id>"
before OK. A policy that has never produced a tagged snapshot is either
brand-new or silently failing — neither is OK.
NEVER treat empty TargetTags as "all volumes". DLM does NOT default to
all volumes when TargetTags is empty — it matches ZERO volumes. A policy
with TargetTags: [] is a no-op, not a catch-all. Classify as
MISCONFIGURED (Step 3).
NEVER accept a 5-field CronExpression. DLM requires 6-field cron
(min hour day month weekday YEAR). A 5-field cron is rejected at creation
but may persist from older tooling. Treat any 5-field cron as
MISCONFIGURED (Step 4). The year field is mandatory.
NEVER treat ShareRules as a substitute for CrossRegionCopyTargets.
Shared snapshots stay in the source region. Only cross-region copy
provides DR. A policy with ShareRules but no CrossRegionCopyTargets still
has the Step 7 CONFIG_GAP finding.
NEVER assume CrossRegionCopyTargets encrypts with the source KMS key.
KMS keys are regional — DLM cannot copy the source CMK. Without an
explicit EncryptionConfiguration.EncryptedKeyId, the DR snapshot uses
the destination region's default EBS encryption setting (often false).
Verify the destination region's encryption default before declaring DR
snapshots encrypted.
NEVER flag RetainRule absence as "intentional keep-forever policy."
Missing RetainRule is a field omission, not a deliberate retention
strategy. DLM will hit the per-volume snapshot quota (1,000) and then
silently stop creating new snapshots — the oldest is NOT deleted. This is
MISCONFIGURED, not OK.
NEVER recommend deleting a DLM policy as remediation without first
confirming what snapshots it manages. Deleting a policy does NOT delete
its existing snapshots — they become orphaned (still billed, no longer
rotated). Use aws dlm delete-lifecycle-policy --policy-id <id> only
after confirming no workload depends on the policy's snapshot stream.
NEVER conflate ResourceTypes: ["VOLUME", "INSTANCE"] with comprehensive
coverage. Mixing both double-snapshots instance-attached volumes (once
as a VOLUME target, once as an INSTANCE target), doubling cost and
accelerating quota exhaustion. This is a CONFIG_GAP cost finding.
NEVER treat the absence of ExecutionHandler / ExecutionHandlerRole
as a misconfiguration. These are legacy fields from 2018-era DLM and are
NOT in the modern API. The modern API uses implicit service-role
assumption. Flagging their absence is a false positive.
NEVER assume the service role's permissions are stable across audits. IAM
policy drift — from least-privilege sweeps, CloudFormation drift
detection, or Terraform applies that narrow ec2:*/kms:* scopes — can
silently strip kms:Decrypt or ec2:CreateSnapshot from the role's
policy without any change to the DLM policy itself. DLM continues to show
State: ENABLED but every encrypted-volume snapshot fails with
AccessDenied in CloudTrail. Check role permissions
(aws iam get-role-policy, aws iam list-attached-role-policies) as part
of every audit — not just role existence.
NEVER assume TargetTags matching is case-insensitive. DLM tag matching
is EXACT and case-SENSITIVE. Environment: production does not match
Environment: Production. A policy with valid-looking tags that match
zero volumes (case mismatch) is functionally identical to empty TargetTags.
NEVER enable FastRestoreRule on every snapshot as a "just in case."
FastRestore costs ~$0.75 per AZ-hour per snapshot. A policy with
FastRestore on a 3-AZ deployment retaining 30 snapshots costs
~$1,600/month. Reserve FastRestore for boot volumes that must attach in
seconds (autoscaling, rapid DB restore).
Pre-flight safety checks (run before any remediation CLI)
- MANDATORY CONFIRMATION GATE. Before any state-changing operation
(update-lifecycle-policy, delete-lifecycle-policy), the auditor MUST emit:
CONFIRM: About to <action> on policy <id> in account <account>. This affects <consequence>. Proceed? (yes/no) Do NOT execute the CLI command
until the operator confirms.
- Capture the current policy for rollback:
aws dlm get-lifecycle-policy --policy-id <id> --output json > /tmp/<id>-backup-$(date +%s).json
BEFORE any modification. DLM policies are not versioned — there is no
undo without a backup.
- Before re-enabling a DISABLED policy, confirm the service role still
exists:
aws iam get-role --role-name AWSDataLifecycleManagerServiceRole.
Re-enabling a policy whose role was deleted produces a silently-failing
ENABLED policy — worse than the original DISABLED state because it looks
healthy.
- Before adding a
CrossRegionCopyTarget, confirm the destination region
has default EBS encryption enabled
(aws ec2 get-ebs-encryption-by-default --region <dr-region>) OR specify
an explicit EncryptionConfiguration.EncryptedKeyId. Unencrypted DR
snapshots are a data-at-rest gap.
- Before tightening
RetainRule.Count downward, confirm no downstream
automation depends on the older snapshots being present (restore scripts,
compliance archives). Reducing Count triggers immediate deletion of
snapshots beyond the new bound — this is irreversible.
- Prefer additive changes (add a schedule, add a CrossRegionCopyTarget,
enable CopyTags) over destructive changes (remove a schedule, lower
retention). Additive changes are reversible and do not risk breaking
existing snapshot streams.
Remediation guidance
Remediation ordering principle: always prefer additive changes over
destructive changes. Add a CrossRegionCopyTarget (reversible by removing it)
BEFORE reducing retention (which deletes snapshots irreversibly). The safe
sequence for any finding is: (1) back up the policy, (2) apply the additive
fix, (3) verify execution via describe-snapshots, (4) only then apply any
destructive change.
For NO_POLICY — workload has no enabled DLM coverage
- Identify the workload's volume tag set
(
describe-volumes --filters "Name=tag-key,Values=<tag>").
- Create a policy targeting those tags:
aws dlm create-lifecycle-policy --description "<workload>-ebs-backup" --state ENABLED --execution-role-arn arn:aws:iam::<acct>:role/AWSDataLifecycleManagerServiceRole --policy-details file://policy.json.
The policy.json must include PolicyType: EBS_SNAPSHOT_POLICY,
ResourceTypes: ["VOLUME"], TargetTags: [...], and at least one
Schedule with CreateRule + RetainRule.
- Verify the service role exists before creating the policy (see Pre-flight).
- After creation, verify execution within the first schedule window via
describe-snapshots --filters "Name=tag:aws:dlm:lifecycle-policy-id,Values=<new-id>".
For MISCONFIGURED — State: DISABLED (Step 2)
- Confirm the service role exists (see Pre-flight).
- Re-enable:
aws dlm update-lifecycle-policy --policy-id <id> --state ENABLED.
- Verify execution after the next schedule window via
describe-snapshots.
For MISCONFIGURED — empty TargetTags / ResourceTypes (Step 3)
- Identify the correct tag set from the workload's volumes.
- Update the policy details:
aws dlm update-lifecycle-policy --policy-id <id> --policy-details file://updated-details.json.
- Verify volume matching:
aws ec2 describe-volumes --filters "Name=tag:<key>,Values=<value>" —
the count must be > 0.
For MISCONFIGURED — invalid Cron / CreateRule (Step 4)
- Replace the 5-field cron with a 6-field cron (append the year field), OR
switch to
Interval + IntervalUnit
(e.g., Interval: 24, IntervalUnit: HOURS).
- Update via
update-lifecycle-policy --policy-details.
For MISCONFIGURED — missing RetainRule (Step 5)
- Add a
RetainRule with a sensible Count (7-30 for daily snapshots) or
Interval + IntervalUnit (e.g., Interval: 30, IntervalUnit: DAYS).
- Update via
update-lifecycle-policy --policy-details.
For CONFIG_GAP — short retention (Step 6)
- Increase
RetainRule.Count to at least 7 (daily) or match the workload's
RPO/RTO requirement. For compliance-driven workloads, 30-90 days is common.
- Update via
update-lifecycle-policy --policy-details.
For CONFIG_GAP — no cross-region copy (Step 7)
- Add a
CrossRegionCopyTarget to each schedule:"CrossRegionCopyTargets": [{
"TargetRegion": "us-west-2",
"EncryptionConfiguration": {"Encrypted": true, "CmkArn": "arn:aws:kms:us-west-2:<acct>:key/<dr-cmk-id>"}
}]
- Specify an explicit
CmkArn — do NOT rely on the destination region's
default encryption.
- Verify DR snapshots after the next copy window:
aws ec2 describe-snapshots --region us-west-2 --filters "Name=tag:aws:dlm:lifecycle-policy-id,Values=<id>".
For CONFIG_GAP — CopyTags false/absent (Step 8)
- Set
CopyTags: true on each schedule.
- Update via
update-lifecycle-policy --policy-details.
For CONFIG_GAP — quota risk (Count >= 1000) (Step 9)
- Reduce
RetainRule.Count below 1000 (e.g., 90-365 depending on RPO).
- Confirm no other policies or manual snapshots are targeting the same
volumes (cumulative snapshot count per volume across all sources).
For OK
- No remediation required for the current posture.
- Recommend verifying execution quarterly via
describe-snapshots (DLM
silent-failure modes can appear at any time if the service role is edited).
- For compliance-driven workloads, recommend a periodic CloudTrail alarm on
ec2:CreateSnapshot AccessDenied events sourced from the DLM service
role — this is the earliest signal of service-role breakage.
Deep reference: DLM internals
Deep internals (silent-failure modes, cron syntax, cross-region copy
encryption flow, quota, service-role trust) moved to references/advanced-patterns.md.
Recent AWS features (2024-2026)
2024-2026 DLM feature notes moved to
references/advanced-patterns.md.
References (load on demand)
- references/diagnostic-commands.md — pre-flight data-collection commands (moved out of the Pre-flight section)
- references/advanced-patterns.md — Step 0 expert knowledge, edge-case catalog, DLM internals deep reference, recent features
Domain
AWS CloudOps / Storage & Backup Resilience (DLM EBS Snapshot Lifecycle).
AWS documentation
1---2name: dlm-lifecycle-policy-auditor3description: 'Audits AWS Data Lifecycle Manager (DLM) EBS snapshot lifecycle policies for coverage gaps and silent-failure modes: disabled policies, empty tag/resource targets, invalid Cron schedules, weak or missing retention rules, absent cross-region copy (DR gap), CopyTags metadata loss, per-volume snapshot quota risk, and the DLM service-role breakage that silently halts backups. Emits a deterministic verdict (NO_POLICY | MISCONFIGURED | CONFIG_GAP | OK) per policy or workload with enumerated findings and specific CLI remediation. Use when reviewing DLM EBS snapshot policies, checking backup coverage, validating retention/DR posture, or diagnosing why snapshots stopped appearing.'4license: Apache-2.05compatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline policy-document classification. Live-account audits use aws dlm get-lifecycle-policies, aws dlm get-lifecycle-policy, aws ec2 describe-snapshots, and aws ec2 describe-volumes (AWS CLI v2, SSO or key-based credentials).6metadata:7 source: https://skillmd.com/skills/jhkchan/dlm-lifecycle-policy-auditor8 domain: aws-cloudops9 complexity: medium10 requires_llm: 'true'11 phase: '2'12 supports_pipeline: 'true'13 entry_point: 'false'14 family: Storage15 verdict_shape: NO_POLICY | MISCONFIGURED | CONFIG_GAP | OK16 when_to_use: Auditing DLM EBS snapshot lifecycle policies for coverage and correctness, diagnosing why snapshots stopped appearing, validating retention/DR posture, checking cross-region copy configuration, or confirming a workload has automated EBS backup coverage before production deployment.17 activation_triggers: audit this DLM lifecycle policy, why did my EBS snapshots stop, is my backup policy enabled, check DLM retention, DLM cross-region copy gap, is DLM working, EBS snapshot coverage, lifecycle policy disabled, DLM silent failure, audit EBS backup posture18 invocation_schema: 'Input: either (a) a DLM lifecycle policy JSON document (from get-lifecycle-policy), optionally paired with account-level context (list of volumes, list of all policies), OR (b) a workload/account identifier for live-account coverage audit. Output: deterministic POLICY/VERDICT/REASON/FINDINGS/REMEDIATION block per policy or workload, where VERDICT ∈ {NO_POLICY, MISCONFIGURED, CONFIG_GAP, OK}.'19 version: 0.1.020 author: Jacky Chan — AWS Community Builder21 keywords: DLM, Data Lifecycle Manager, EBS snapshot, lifecycle policy, backup, retention, cross-region copy, disaster recovery, snapshot policy, CronExpression, RetainRule, CreateRule, TargetTags, CopyTags, FastRestoreRule, CrossRegionCopyTargets, AWSDataLifecycleManagerServiceRole, snapshot quota, backup audit, DR gap22 tags: dlm, storage, ebs, snapshots, backup, retention, disaster-recovery, lifecycle, audit23---2425# DLM Lifecycle Policy Auditor2627## Mindset2829**One-line takeaway:** a DLM policy with `State: ENABLED` proves nothing30about whether backups are actually running — three layers can fail silently31beneath it (empty tag targets, broken service role, invalid Cron), and the32policy object surfaces none of them.3334DLM automates EBS snapshot creation, retention, and cross-region copy on a35schedule. It looks deceptively simple in the console. The danger is that36**DLM has no native health indicator in the policy object**: `State: ENABLED`37means "the policy is registered", not "it has ever executed successfully."38The three silent-failure modes that every auditor must check:3940- **Disabled policy.** `State: DISABLED` — the policy is registered but41 creates zero snapshots. Operators disable a policy to "pause for42 maintenance" and forget to re-enable. No alert fires.43- **Empty/broken target set.** `TargetTags: []` or `ResourceTypes: []` means44 zero volumes match. The policy runs on schedule and snapshots nothing.45- **Service-role breakage.** DLM assumes `AWSDataLifecycleManagerServiceRole`46 to call `ec2:CreateSnapshot`. If that role is deleted, its trust policy is47 revoked, or it lacks `kms:Decrypt` on the source key, the policy stays48 `ENABLED` but CloudTrail logs `AccessDenied` on every scheduled run. The49 policy object never reflects this.5051The only ground-truth signal that a policy actually created snapshots is52`aws ec2 describe-snapshots --filters "Name=tag:aws:dlm:lifecycle-policy-id,Values=<id>"`53— the `aws:dlm:lifecycle-policy-id` tag is auto-applied by DLM to every54snapshot it creates. A policy that has never produced a tagged snapshot has55either never run or has been silently failing since creation.5657## Quick reference — verdict thresholds5859| Condition | Verdict | Step |60|---|---|---|61| Account has zero enabled DLM policies covering the workload's volumes | **NO_POLICY** | Step 1 |62| `State: DISABLED` (policy registered but not running) | **MISCONFIGURED** | Step 2 |63| `TargetTags: []` or `ResourceTypes: []` (zero targets) | **MISCONFIGURED** | Step 3 |64| Any `Schedule.CreateRule` missing or invalid (no Cron, no Interval, 5-field cron) | **MISCONFIGURED** | Step 4 |65| Any `Schedule.RetainRule` entirely absent (unbounded retention) | **MISCONFIGURED** | Step 5 |66| `RetainRule.Count: 1` or `RetainRule.Interval < 7 days` (no recovery history) | **CONFIG_GAP** | Step 6 |67| No `CrossRegionCopyTargets` for any schedule (no DR) | **CONFIG_GAP** | Step 7 |68| `CopyTags: false` or absent (metadata/automation loss) | **CONFIG_GAP** | Step 8 |69| `RetainRule.Count >= 1000` (per-volume snapshot quota risk) | **CONFIG_GAP** | Step 9 |70| Enabled + valid schedule + sensible retention + DR + CopyTags | **OK** | Step 10 |7172See the ordered steps below for edge cases. Deep DLM internals (service-role73flow, snapshot-tag conventions, Cron syntax quirks) are in the74[Deep reference](#deep-reference-dlm-internals) section at the end.7576## Pre-flight: data collection gate (run before classification)77Full pre-flight command listings (coverage audit, per-policy execution78verification, live-account checks) moved to [references/diagnostic-commands.md](references/diagnostic-commands.md).7980## Process — Classification logic (apply in order, aggregate worst)8182### Step 0: Expert knowledge — non-obvious DLM behaviors that change classification83Expert-knowledge deep dive (cron quirks, cross-region KMS flow, quota,84IAM drift, observability limits) moved to [references/advanced-patterns.md](references/advanced-patterns.md).8586### Step 1: Workload coverage — does ANY enabled policy protect these volumes?8788**Scope:** apply this step when the input is an account or workload (not a89single policy document). When auditing a single policy object, skip to Step 2.9091- If `get-lifecycle-policies` returns `[]` (zero policies in the account) AND92 the account hosts EBS volumes tagged for production → **NO_POLICY**. This is93 the most severe finding: zero automated backup exists. The verdict is94 NO_POLICY regardless of any other consideration.95- If policies exist but NONE is `State: ENABLED` AND targets tags that96 intersect the workload's volume tags → **NO_POLICY** for that workload. A97 disabled policy targeting the workload's tags does not cover it; an enabled98 policy targeting unrelated tags does not cover it.99- Verify intersection: list the workload's volumes100 (`describe-volumes --filters "Name=tag-key,Values=<tag>"`), collect their101 tag sets, and confirm at least one ENABLED policy's `TargetTags` is a102 subset of (or matches) those tag sets. Case-sensitive exact match.103104NO_POLICY is the highest-severity verdict — it means a workload has no105automated EBS backup at all, and every volume is one misconfiguration away106from permanent data loss on deletion.107108### Step 2: State check — is the policy actually running?109110- `State: DISABLED` → **MISCONFIGURED**. The policy is registered but creates111 zero snapshots. Operators disable policies for maintenance and forget to112 re-enable; console-driven workflows sometimes leave a policy DISABLED after113 a tag edit. No CloudWatch alarm fires on this transition.114- `State: ENABLED` → proceed. Note: ENABLED proves registration only — it115 does NOT prove execution. Continue to Step 3.116117### Step 3: Target coverage — can the policy match any volume?118119- `PolicyDetails.TargetTags: []` (empty array) → **MISCONFIGURED**. With no120 tag filters, no volumes match (DLM does NOT default to "all volumes"). The121 policy runs on schedule and snapshots nothing.122- `PolicyDetails.ResourceTypes: []` (empty) → **MISCONFIGURED**. For an123 EBS_SNAPSHOT_POLICY, ResourceTypes must include `VOLUME` and/or `INSTANCE`.124- `TargetTags` present but matches zero volumes in the account (verify via125 `describe-volumes --filters`) → **MISCONFIGURED** with a note that the tags126 may be case-mismatched. A valid-looking tag set that matches nothing is127 functionally identical to empty TargetTags.128129### Step 4: Schedule validity — can the policy create snapshots on schedule?130131For each entry in `PolicyDetails.Schedules[]`:132133- `CreateRule` entirely absent → **MISCONFIGURED**. No creation trigger.134- `CreateRule.CronExpression` is 5-field (e.g., `0 5 * * ?`) →135 **MISCONFIGURED**. DLM requires 6-field cron (with year). A 5-field cron136 is rejected at creation but may persist if the policy was edited via an137 older tool that did not validate.138- `CreateRule` has neither `CronExpression` nor `Interval` + `IntervalUnit`139 → **MISCONFIGURED**. At least one creation trigger is required.140- `CreateRule.Interval < 12` with `IntervalUnit: HOURS` → MISCONFIGURED141 (minimum 12-hour interval enforced by API).142143### Step 5: Retention validity — is retention bounded?144145For each `Schedule`:146147- `RetainRule` entirely absent → **MISCONFIGURED**. Without a RetainRule,148 DLM never deletes snapshots — retention is unbounded. This is not "keep149 forever" (a deliberate choice); it is a missing field that will hit the150 per-volume snapshot quota (1,000) and then silently stop creating new151 snapshots. The oldest is NOT deleted to make room.152- `RetainRule` present but both `Count` and `Interval`/`IntervalUnit` are153 null/absent → **MISCONFIGURED**. The rule exists but specifies no bound.154155### Step 6: Retention strength — is recovery history adequate?156157- `RetainRule.Count: 1` → **CONFIG_GAP**. A single snapshot means zero158 recovery history — any corruption in the most recent snapshot is159 unrecoverable. Minimum recommended Count is 7 (one week of daily snapshots)160 for production volumes.161- `RetainRule.Interval < 7` with `IntervalUnit: DAYS` → **CONFIG_GAP**. Less162 than 7 days of retention is inadequate for most RPO/RTO targets. Note the163 workload's actual RPO requirement before flagging — a test environment may164 legitimately retain 3 days.165166### Step 7: DR coverage — is there a cross-region copy?167168- No `CrossRegionCopyTargets` on any schedule (or the array is empty) →169 **CONFIG_GAP**. Single-region snapshots mean a regional outage or the170 loss of the primary region destroys all backups along with the primary.171 Cross-region copy is the minimum DR posture for any production volume.172- `CrossRegionCopyTargets` present but `EncryptionConfiguration` absent AND173 the destination region's default EBS encryption is `false` → CONFIG_GAP174 (unencrypted DR snapshots). This requires knowing the destination region's175 encryption default — if unknown, flag as a verification item.176177### Step 8: Metadata preservation — are tags copied?178179- `CopyTags: false` OR `CopyTags` absent (the default) → **CONFIG_GAP**.180 Source volume tags are dropped from the snapshot except `Name` and181 `aws:dlm:*`. This breaks cost-allocation, cleanup, and restore automation182 that filters snapshots by tag. `CopyTags: true` is the correct default for183 production.184185### Step 9: Quota and cost risks186187- `RetainRule.Count >= 1000` → **CONFIG_GAP**. Approaching the per-volume188 snapshot quota (1,000). When the quota is hit, DLM stops creating new189 snapshots silently — the oldest is NOT deleted. This is a recovery-coverage190 cliff.191- `FastRestoreRule` present on a policy whose TargetTags suggest non-boot192 volumes (e.g., data volumes, not OS volumes) → **CONFIG_GAP** (cost risk).193 FastRestore is ~$0.75/AZ-hour/snapshot and should be reserved for194 rapidly-attached snapshots.195196### Step 10: Aggregation — worst finding wins197198The final verdict is the **worst** finding across all steps, where199NO_POLICY > MISCONFIGURED > CONFIG_GAP > OK:200201```text202verdict = max(step1_finding, step2_finding, ..., step9_finding)203```204205If no findings (all dimensions pass), the verdict is **OK**. Note that OK206requires verification that the policy has actually produced snapshots207(Step 1 execution check) — a policy that is structurally clean but has never208executed should be flagged as a verification item, not a clean OK.209210## Output format (per policy)211212```text213POLICY: <policy-id, or "ACCOUNT/<workload>" for coverage audits>214VERDICT: NO_POLICY | MISCONFIGURED | CONFIG_GAP | OK215REASON: <1-2 sentences citing the worst finding and its step number>216FINDINGS:217 - [MISCONFIGURED] <finding description (Step N)>218 - [CONFIG_GAP] <finding description (Step N)>219REMEDIATION: <specific action per finding, or "None required" if OK>220```221222### Worked example — disabled policy with no cross-region copy223224```text225POLICY: policy-0abc123456 (production-ebs-daily)226VERDICT: MISCONFIGURED227REASON: Policy State is DISABLED — zero snapshots are being created228regardless of how well-formed the schedules are (Step 2). Additionally, no229cross-region copy is configured (Step 7).230FINDINGS:231 - [MISCONFIGURED] State: DISABLED — policy registered but not running (Step 2)232 - [CONFIG_GAP] No CrossRegionCopyTargets on schedule daily-6am — no DR (Step 7)233 - [CONFIG_GAP] CopyTags absent — source volume tags dropped from snapshots (Step 8)234REMEDIATION:235 1. Re-enable: aws dlm update-lifecycle-policy --policy-id policy-0abc123456 --state ENABLED.236 2. Add a cross-region copy target to the schedule (see Deep reference for237 EncryptionConfiguration syntax).238 3. Set CopyTags: true on the schedule to preserve volume attribution.239 4. Verify execution after re-enabling:240 aws ec2 describe-snapshots --filters "Name=tag:aws:dlm:lifecycle-policy-id,Values=policy-0abc123456".241```242243## Edge-case handling244Edge-case catalog (multi-schedule, malformed fields, share-as-DR, zero245execution history) moved to [references/advanced-patterns.md](references/advanced-patterns.md).246247## Anti-Patterns — NEVER248249- NEVER classify a `State: DISABLED` policy as anything other than250 MISCONFIGURED (or NO_POLICY for the workload it was supposed to cover).251 A disabled policy creates zero snapshots — "the policy exists" is not252 coverage. This is the most common false-OK in DLM audits.253254- NEVER declare a policy OK based on `State: ENABLED` alone. ENABLED proves255 registration, not execution. The policy object has no "last run" field.256 Always cross-check with `describe-snapshots --filters "Name=tag:aws:dlm:lifecycle-policy-id,Values=<id>"`257 before OK. A policy that has never produced a tagged snapshot is either258 brand-new or silently failing — neither is OK.259260- NEVER treat empty `TargetTags` as "all volumes". DLM does NOT default to261 all volumes when TargetTags is empty — it matches ZERO volumes. A policy262 with `TargetTags: []` is a no-op, not a catch-all. Classify as263 MISCONFIGURED (Step 3).264265- NEVER accept a 5-field `CronExpression`. DLM requires 6-field cron266 (min hour day month weekday YEAR). A 5-field cron is rejected at creation267 but may persist from older tooling. Treat any 5-field cron as268 MISCONFIGURED (Step 4). The year field is mandatory.269270- NEVER treat `ShareRules` as a substitute for `CrossRegionCopyTargets`.271 Shared snapshots stay in the source region. Only cross-region copy272 provides DR. A policy with ShareRules but no CrossRegionCopyTargets still273 has the Step 7 CONFIG_GAP finding.274275- NEVER assume `CrossRegionCopyTargets` encrypts with the source KMS key.276 KMS keys are regional — DLM cannot copy the source CMK. Without an277 explicit `EncryptionConfiguration.EncryptedKeyId`, the DR snapshot uses278 the destination region's default EBS encryption setting (often `false`).279 Verify the destination region's encryption default before declaring DR280 snapshots encrypted.281282- NEVER flag `RetainRule` absence as "intentional keep-forever policy."283 Missing RetainRule is a field omission, not a deliberate retention284 strategy. DLM will hit the per-volume snapshot quota (1,000) and then285 silently stop creating new snapshots — the oldest is NOT deleted. This is286 MISCONFIGURED, not OK.287288- NEVER recommend deleting a DLM policy as remediation without first289 confirming what snapshots it manages. Deleting a policy does NOT delete290 its existing snapshots — they become orphaned (still billed, no longer291 rotated). Use `aws dlm delete-lifecycle-policy --policy-id <id>` only292 after confirming no workload depends on the policy's snapshot stream.293294- NEVER conflate `ResourceTypes: ["VOLUME", "INSTANCE"]` with comprehensive295 coverage. Mixing both double-snapshots instance-attached volumes (once296 as a VOLUME target, once as an INSTANCE target), doubling cost and297 accelerating quota exhaustion. This is a CONFIG_GAP cost finding.298299- NEVER treat the absence of `ExecutionHandler` / `ExecutionHandlerRole`300 as a misconfiguration. These are legacy fields from 2018-era DLM and are301 NOT in the modern API. The modern API uses implicit service-role302 assumption. Flagging their absence is a false positive.303304- NEVER assume the service role's permissions are stable across audits. IAM305 policy drift — from least-privilege sweeps, CloudFormation drift306 detection, or Terraform applies that narrow `ec2:*`/`kms:*` scopes — can307 silently strip `kms:Decrypt` or `ec2:CreateSnapshot` from the role's308 policy without any change to the DLM policy itself. DLM continues to show309 `State: ENABLED` but every encrypted-volume snapshot fails with310 `AccessDenied` in CloudTrail. Check role permissions311 (`aws iam get-role-policy`, `aws iam list-attached-role-policies`) as part312 of every audit — not just role existence.313314- NEVER assume `TargetTags` matching is case-insensitive. DLM tag matching315 is EXACT and case-SENSITIVE. `Environment: production` does not match316 `Environment: Production`. A policy with valid-looking tags that match317 zero volumes (case mismatch) is functionally identical to empty TargetTags.318319- NEVER enable `FastRestoreRule` on every snapshot as a "just in case."320 FastRestore costs ~$0.75 per AZ-hour per snapshot. A policy with321 FastRestore on a 3-AZ deployment retaining 30 snapshots costs322 ~$1,600/month. Reserve FastRestore for boot volumes that must attach in323 seconds (autoscaling, rapid DB restore).324325## Pre-flight safety checks (run before any remediation CLI)326327- **MANDATORY CONFIRMATION GATE.** Before any state-changing operation328 (update-lifecycle-policy, delete-lifecycle-policy), the auditor MUST emit:329 `CONFIRM: About to <action> on policy <id> in account <account>. This330 affects <consequence>. Proceed? (yes/no)` Do NOT execute the CLI command331 until the operator confirms.332- Capture the current policy for rollback:333 `aws dlm get-lifecycle-policy --policy-id <id> --output json > /tmp/<id>-backup-$(date +%s).json`334 BEFORE any modification. DLM policies are not versioned — there is no335 undo without a backup.336- Before re-enabling a DISABLED policy, confirm the service role still337 exists: `aws iam get-role --role-name AWSDataLifecycleManagerServiceRole`.338 Re-enabling a policy whose role was deleted produces a silently-failing339 ENABLED policy — worse than the original DISABLED state because it looks340 healthy.341- Before adding a `CrossRegionCopyTarget`, confirm the destination region342 has default EBS encryption enabled343 (`aws ec2 get-ebs-encryption-by-default --region <dr-region>`) OR specify344 an explicit `EncryptionConfiguration.EncryptedKeyId`. Unencrypted DR345 snapshots are a data-at-rest gap.346- Before tightening `RetainRule.Count` downward, confirm no downstream347 automation depends on the older snapshots being present (restore scripts,348 compliance archives). Reducing Count triggers immediate deletion of349 snapshots beyond the new bound — this is irreversible.350- Prefer additive changes (add a schedule, add a CrossRegionCopyTarget,351 enable CopyTags) over destructive changes (remove a schedule, lower352 retention). Additive changes are reversible and do not risk breaking353 existing snapshot streams.354355## Remediation guidance356357**Remediation ordering principle:** always prefer additive changes over358destructive changes. Add a CrossRegionCopyTarget (reversible by removing it)359BEFORE reducing retention (which deletes snapshots irreversibly). The safe360sequence for any finding is: (1) back up the policy, (2) apply the additive361fix, (3) verify execution via `describe-snapshots`, (4) only then apply any362destructive change.363364### For NO_POLICY — workload has no enabled DLM coverage3653661. Identify the workload's volume tag set367 (`describe-volumes --filters "Name=tag-key,Values=<tag>"`).3682. Create a policy targeting those tags:369 `aws dlm create-lifecycle-policy --description "<workload>-ebs-backup" --state ENABLED --execution-role-arn arn:aws:iam::<acct>:role/AWSDataLifecycleManagerServiceRole --policy-details file://policy.json`.370 The `policy.json` must include `PolicyType: EBS_SNAPSHOT_POLICY`,371 `ResourceTypes: ["VOLUME"]`, `TargetTags: [...]`, and at least one372 `Schedule` with `CreateRule` + `RetainRule`.3733. Verify the service role exists before creating the policy (see Pre-flight).3744. After creation, verify execution within the first schedule window via375 `describe-snapshots --filters "Name=tag:aws:dlm:lifecycle-policy-id,Values=<new-id>"`.376377### For MISCONFIGURED — State: DISABLED (Step 2)3783791. Confirm the service role exists (see Pre-flight).3802. Re-enable:381 `aws dlm update-lifecycle-policy --policy-id <id> --state ENABLED`.3823. Verify execution after the next schedule window via `describe-snapshots`.383384### For MISCONFIGURED — empty TargetTags / ResourceTypes (Step 3)3853861. Identify the correct tag set from the workload's volumes.3872. Update the policy details:388 `aws dlm update-lifecycle-policy --policy-id <id> --policy-details file://updated-details.json`.3893. Verify volume matching:390 `aws ec2 describe-volumes --filters "Name=tag:<key>,Values=<value>"` —391 the count must be > 0.392393### For MISCONFIGURED — invalid Cron / CreateRule (Step 4)3943951. Replace the 5-field cron with a 6-field cron (append the year field), OR396 switch to `Interval` + `IntervalUnit`397 (e.g., `Interval: 24, IntervalUnit: HOURS`).3982. Update via `update-lifecycle-policy --policy-details`.399400### For MISCONFIGURED — missing RetainRule (Step 5)4014021. Add a `RetainRule` with a sensible `Count` (7-30 for daily snapshots) or403 `Interval` + `IntervalUnit` (e.g., `Interval: 30, IntervalUnit: DAYS`).4042. Update via `update-lifecycle-policy --policy-details`.405406### For CONFIG_GAP — short retention (Step 6)4074081. Increase `RetainRule.Count` to at least 7 (daily) or match the workload's409 RPO/RTO requirement. For compliance-driven workloads, 30-90 days is common.4102. Update via `update-lifecycle-policy --policy-details`.411412### For CONFIG_GAP — no cross-region copy (Step 7)4134141. Add a `CrossRegionCopyTarget` to each schedule:415 ```json416 "CrossRegionCopyTargets": [{417 "TargetRegion": "us-west-2",418 "EncryptionConfiguration": {"Encrypted": true, "CmkArn": "arn:aws:kms:us-west-2:<acct>:key/<dr-cmk-id>"}419 }]420 ```4212. Specify an explicit `CmkArn` — do NOT rely on the destination region's422 default encryption.4233. Verify DR snapshots after the next copy window:424 `aws ec2 describe-snapshots --region us-west-2 --filters "Name=tag:aws:dlm:lifecycle-policy-id,Values=<id>"`.425426### For CONFIG_GAP — CopyTags false/absent (Step 8)4274281. Set `CopyTags: true` on each schedule.4292. Update via `update-lifecycle-policy --policy-details`.430431### For CONFIG_GAP — quota risk (Count >= 1000) (Step 9)4324331. Reduce `RetainRule.Count` below 1000 (e.g., 90-365 depending on RPO).4342. Confirm no other policies or manual snapshots are targeting the same435 volumes (cumulative snapshot count per volume across all sources).436437### For OK4384391. No remediation required for the current posture.4402. Recommend verifying execution quarterly via `describe-snapshots` (DLM441 silent-failure modes can appear at any time if the service role is edited).4423. For compliance-driven workloads, recommend a periodic CloudTrail alarm on443 `ec2:CreateSnapshot` `AccessDenied` events sourced from the DLM service444 role — this is the earliest signal of service-role breakage.445446## Deep reference: DLM internals447Deep internals (silent-failure modes, cron syntax, cross-region copy448encryption flow, quota, service-role trust) moved to [references/advanced-patterns.md](references/advanced-patterns.md).449450## Recent AWS features (2024-2026)4512024-2026 DLM feature notes moved to452[references/advanced-patterns.md](references/advanced-patterns.md).453454## References (load on demand)455456- [references/diagnostic-commands.md](references/diagnostic-commands.md) — pre-flight data-collection commands (moved out of the Pre-flight section)457- [references/advanced-patterns.md](references/advanced-patterns.md) — Step 0 expert knowledge, edge-case catalog, DLM internals deep reference, recent features458459## Domain460461AWS CloudOps / Storage & Backup Resilience (DLM EBS Snapshot Lifecycle).462463## AWS documentation464465- **Amazon Data Lifecycle Manager User Guide** — https://docs.aws.amazon.com/dlm/latest/ug/what-is-dlm.html466- **DLM Security** — https://docs.aws.amazon.com/dlm/latest/ug/security.html467- **DLM API Reference** — https://docs.aws.amazon.com/dlm/latest/APIReference/468- **DLM CLI Reference** — https://docs.aws.amazon.com/cli/latest/reference/dlm/