Backup Schedule Automator
Mindset
One-line takeaway: every AWS Backup automation is a six-stage pipeline —
select (tag-based resource assignment) → schedule (backup plan with
frequency and retention) → store (backup vault with access policy and
optional lock) → tier (lifecycle policy moving cold backups to cold
storage) → test (restore testing for RTO/RPO validation) → audit
(CloudTrail + backup reports + framework compliance). A gap in ANY stage
produces either data loss (backup never runs), cost waste (backups never
expire), or false confidence (backups exist but restores fail).
- Selection without tag governance is unscalable: manually adding
resource ARNs to a backup plan works for 10 resources but fails at 1,000.
Tag-based assignment (
Condition: StringEquals on aws:ResourceTag) is
the only pattern that scales.
- Scheduling without lifecycle tiering is expensive: hot storage
for a 365-day retention plan costs 5-10x what a tiered plan (30 days hot
then cold) costs. Always design lifecycle transitions.
- Backups without restore testing are wishful thinking. An untested
backup is a Schrodinger backup — you do not know if it works until you
try, and the worst time to find out is during an incident.
Quick navigation
| You want to... |
Go to |
| Pick a backup plan template for a common pattern |
Step 2 + Appendix A |
| Scale resource assignment with tags |
Step 3 (tag-based matrix) |
| Configure cross-account backup via Organizations |
Step 4 |
| Wire on-demand backup via EventBridge + Lambda |
Step 5 |
| Set up backup vault lock (WORM) for compliance |
Step 6 |
| Design lifecycle policy for cold storage tiering |
Step 7 |
| Automate restore testing for RTO/RPO validation |
Step 8 |
| Configure backup vault notifications (SNS) |
Step 9 |
| Deploy curated backup reports |
Step 10 |
| Audit backup compliance with frameworks |
Step 11 |
| Orchestrate multi-region backup |
Step 12 |
| Avoid common backup pitfalls |
Anti-Patterns |
| Recent features (vault lock, restore testing, frameworks) |
Recent AWS features |
Critical rules at a glance (do NOT bury these)
Tag-based resource assignment is the ONLY scalable pattern.
Hardcoding resource ARNs in a backup plan works for small fleets but
breaks when resources are created or destroyed. Tag-based selection
(aws:ResourceTag/backup-plan = daily-prod) automatically includes
new resources. A resource created without the tag is NOT backed up —
always alert on untagged critical resources.
Backup vault lock is IRREVERSIBLE. Once vault lock is in
LOCKED state, you cannot remove it or shorten the retention period.
You can only extend it. A vault locked with a 365-day retention means
every backup in that vault is retained for 365 days, no exceptions,
even if the backup was created in error. Always test in
GOVERNANCE mode first (admin can override) before switching to
COMPLIANCE mode (no override).
Cross-account backup requires a backup vault in the DESTINATION
account and a backup role that the SOURCE account assumes. The
source account performs the backup but writes to the destination
vault. The destination vault's access policy MUST grant the source
account's backup role backup:CopyIntoBackupVault. Without this,
cross-account copy silently fails.
Lifecycle transitions are one-way. Moving a recovery point from
hot to cold storage is irreversible. A recovery point in cold storage
takes hours to restore (thaw) vs minutes from hot. Always design the
transition window based on restore frequency needs, not just cost.
Restore testing is NOT the same as restore verification. Checking
that a recovery point EXISTS is verification. Actually restoring it
and verifying the application starts is testing. Without testing,
you have no RTO/RPO data for your DR plan.
STRICT output contract
Every backup automation design MUST produce exactly one BACKUP block,
following this format:
BACKUP: <reference>
PLAN: <backup plan name + rule structure>
VAULT: <vault name + lock mode + access policy summary>
LIFECYCLE: <hot-to-cold transition schedule>
TRIGGER: SCHEDULED | ON_DEMAND | SCHEDULED_AND_ON_DEMAND
RESTORE_TEST: <frequency + RTO target + last test date>
TAG_SCOPE: <tag key=value used for resource assignment>
CROSS_ACCOUNT: <NONE | destination account + vault>
CROSS_REGION: <NONE | destination region>
VERDICT: AUTOMATION_DEPLOYED | REVIEW_REQUIRED
GAP: <if REVIEW_REQUIRED, the specific missing piece>
TEMPLATE: <CLI snippet or YAML for the backup plan + vault + policy>
NEVER section
NEVER deploy a backup plan without verifying that the target
resources carry the required tags. A plan scoped to
aws:ResourceTag/backup = daily that matches zero resources produces
no backups and no alerts. The backup service does not warn on empty
selection — it simply does nothing.
NEVER enable vault lock in COMPLIANCE mode without first testing
in GOVERNANCE mode. COMPLIANCE mode is irreversible — you cannot
delete the vault or shorten retention until the lock expires. A typo
in the retention period (e.g., 3650 days instead of 365) is a
decade-long commitment.
NEVER configure a lifecycle transition to cold storage without
documenting the restore thaw time. Cold storage restores take hours,
not minutes. If the application RTO is 1 hour, cold storage at day 31
breaks the SLA. Always map the transition to the RTO curve.
NEVER assume cross-account backup works without the destination
vault access policy. The source account needs backup:CopyIntoBackupVault
permission on the destination vault. Without it, the copy job fails
silently (the backup appears successful in the source but never lands
in the destination).
NEVER skip restore testing. An untested backup is a liability,
not an asset. A backup that cannot be restored is worse than no
backup because it creates false confidence. Schedule restore tests at
a frequency tied to the RTO (weekly for Tier 1 apps, monthly for
Tier 2, quarterly for Tier 3).
NEVER use the default backup vault for production workloads. The
default vault has no access policy, no lock, and no notifications.
Always create named vaults per environment and apply least-privilege
access policies.
NEVER configure on-demand backup via EventBridge without a DLQ.
EventBridge delivers events asynchronously. A Lambda failure drops
the trigger silently. Configure an SQS DLQ so missed on-demand
backups are visible.
NEVER rely solely on AWS Backup reports for compliance evidence.
Reports show backup job status but not restore-test results. Always
pair backup reports with restore-test logs for audit completeness.
Expert heuristic
Moved verbatim to references/advanced-patterns.md — load on demand.
Configuration dependency graph
Backup vault created (create-backup-vault)
+-- Access policy (put-backup-vault-access-policy)
| +-- Source account granted backup:CopyIntoBackupVault (for cross-account)
+-- Vault lock (put-backup-vault-lock-configuration)
| +-- GOVERNANCE mode (test) -> COMPLIANCE mode (production WORM)
+-- Notifications (backup-vault-notifications -> SNS topic)
+-- Backup plan created (create-backup-plan)
| +-- Rule: schedule + lifecycle (hot -> cold transition)
| +-- Rule: copy to destination region/account
| +-- Selection: tag-based resource assignment
| +-- IAM role: AWSBackupDefaultServiceRole
| +-- Tag conditions: backup-plan=X, environment=prod
+-- Organizations backup policy (for multi-account)
| +-- Policy applied at root/OU level
| +-- Member accounts inherit plan + vault assignment
+-- EventBridge on-demand trigger (optional)
| +-- Lambda: start-backup-job on deployment event
| +-- SQS DLQ for failed triggers
+-- Restore testing (start-restore-job on schedule)
| +-- Lambda: restore + verify + report
+-- Backup framework (create-framework)
| +-- Compliance controls + reporting
+-- Backup report plan (create-report-plan)
+-- Curated report delivered to S3
Pre-flight: data requirements
| Input |
Source |
Why |
| Existing backup plans |
list-backup-plans |
Avoid duplicate plans |
| Existing backup vaults |
list-backup-vaults |
Reuse or identify gaps |
| Tag inventory |
tag:get-resources with backup tags |
Verify tag coverage |
| Backup jobs history |
list-backup-jobs |
Success rate baseline |
| Restore jobs history |
list-restore-jobs |
Restore test history |
| Vault lock status |
describe-backup-vault |
Existing lock configuration |
| Organizations policy |
organizations describe-policy |
Existing backup policy |
| Framework status |
describe-framework |
Compliance control status |
If the input is malformed, emit:
BACKUP: <reference>
PLAN: UNKNOWN
VERDICT: ERROR
REASON: Cannot design backup plan — resource scope and retention requirements are required.
GAP: Re-supply resource tag inventory and backup frequency/retention targets.
Process — Workflow design (apply in order)
Step 0: Expert knowledge — non-obvious Backup behaviors
Moved verbatim to references/advanced-patterns.md — load on demand.
Step 1: Verify existing backup posture
aws backup list-backup-plans --output json
aws backup list-backup-vaults --output json
aws backup list-backup-jobs --by-state COMPLETED --max-results 5
Step 2: Select or build a backup plan template
| Template |
Frequency |
Retention |
Lifecycle |
Use case |
| daily-7d |
Daily |
7 days hot |
None |
Dev/test environments |
| daily-30d-weekly-90d |
Daily + Weekly |
7d hot + 30d hot + 90d cold |
30d hot -> cold |
Standard production |
| daily-30d-monthly-1yr |
Daily + Monthly |
7d hot + 30d cold + 365d cold |
7d hot -> cold |
Compliance workloads |
| continuous-35d |
Continuous (PITR) |
35 days |
None |
RDS/DynamoDB continuous |
Step 3: Configure tag-based resource assignment
aws backup create-backup-selection \
--backup-plan-id "daily-prod-plan" \
--backup-selection '{
"SelectionName": "prod-tagged-resources",
"IamRoleArn": "arn:aws:iam::111111111111:role/AWSBackupDefaultServiceRole",
"ListOfTags": [{"ConditionType":"STRINGEQUALS","ConditionKey":"backup-plan","ConditionValue":"daily-prod"}],
"Conditions": {"StringEquals": [{"ConditionKey":"aws:ResourceTag/environment","ConditionValue":"prod"}]}
}'
Step 4: Configure cross-account backup via Organizations
# Create backup policy at the OU level
aws organizations create-policy \
--type BACKUP_POLICY \
--name "org-backup-policy-prod" \
--content file://backup-policy.json \
--target-ids "ou-prod-xxxxx"
Policy JSON (simplified):
{
"plans": {
"daily-backup-plan": {
"regions": {"us-east-1": {"region": "us-east-1"}},
"rules": {
"daily-rule": {
"schedule_expression": "cron(0 5 ? * * *)",
"target_backup_vault_name": "Default",
"lifecycle": {"delete_after_days": 30}
},
"cross-region-copy-rule": {
"target_backup_vault_name": "dr-vault",
"target_region": "us-west-2",
"lifecycle": {"delete_after_days": 90}
}
},
"selections": {
"tags": {
"backup-daily": {"assignment_tag": {"key": "backup-plan", "value": "daily"}}
}
}
}
}
}
Step 5: Wire on-demand backup via EventBridge + Lambda
aws events put-rule \
--name on-demand-backup-on-deploy \
--event-pattern '{
"source": ["aws.codepipeline"],
"detail-type": ["CodePipeline Pipeline Execution State Change"],
"detail": {"state": ["SUCCEEDED"]}
}'
aws events put-targets \
--rule on-demand-backup-on-deploy \
--targets '[{
"Id": "on-demand-backup-lambda",
"Arn": "arn:aws:lambda:us-east-1:111111111111:function:on-demand-backup",
"DeadLetterConfig": {"Arn": "arn:aws:sqs:us-east-1:111111111111:backup-trigger-dlq"}
}]'
Lambda handler:
import boto3
backup = boto3.client('backup')
def lambda_handler(event, context):
resp = backup.start_backup_job(
BackupVaultName='on-demand-vault',
ResourceArn='arn:aws:dynamodb:us-east-1:111111111111:table/prod-table',
IamRoleArn='arn:aws:iam::111111111111:role/AWSBackupDefaultServiceRole',
IdempotencyToken=f"ondemand-{event['time']}",
Lifecycle={'DeleteAfterDays': 7}
)
return {'backupJobId': resp['BackupJobId']}
Step 6: Configure backup vault lock (WORM)
Moved verbatim to references/vault-lock-and-lifecycle.md — load on demand.
Step 7: Design lifecycle policy for cold storage tiering
Moved verbatim to references/vault-lock-and-lifecycle.md — load on demand.
Step 8: Automate restore testing
import boto3, json
backup = boto3.client('backup')
sns = boto3.client('sns')
def lambda_handler(event, context):
# List recent completed backups
jobs = backup.list_backup_jobs(
ByState='COMPLETED', ByBackupVaultName='prod-vault', MaxResults=1
)
if not jobs['BackupJobs']:
return {'status': 'no_backups_to_test'}
job = jobs['BackupJobs'][0]
# Start restore to a test VPC/subnet
resp = backup.start_restore_job(
RecoveryPointArn=job['RecoveryPointArn'],
Metadata={
'VpcId': 'vpc-testrestore',
'SubnetId': 'subnet-testrestore',
'InstanceType': 't3.medium'
},
IamRoleArn='arn:aws:iam::111111111111:role/BackupRestoreRole'
)
# Notify
sns.publish(
TopicArn='arn:aws:sns:us-east-1:111111111111:backup-alerts',
Message=f'Restore test started: {resp["RestoreJobId"]} for {job["RecoveryPointArn"]}'
)
return {'restoreJobId': resp['RestoreJobId']}
Step 9: Configure backup vault notifications
aws backup put-backup-vault-notifications \
--backup-vault-name "prod-vault" \
--sns-topic-arn "arn:aws:sns:us-east-1:111111111111:backup-alerts" \
--backup-vault-events ["BACKUP_JOB_COMPLETED","BACKUP_JOB_FAILED","RESTORE_JOB_COMPLETED","RESTORE_JOB_FAILED"]
Step 10: Deploy curated backup reports
aws backup create-report-plan \
--report-plan-name "daily-backup-compliance-report" \
--report-delivery-channel '{"S3BucketName":"backup-reports-111111111111","Formats":["CSV","JSON"]}' \
--report-setting '{"ReportTemplate":"BACKUP_JOB_REPORT","NumberOfFrameworks":0}'
Step 11: Audit with backup frameworks
aws backup create-framework \
--framework-name "backup-compliance-framework" \
--framework-controls '[{
"ControlName": "BACKUP_RECOVERY_POINT_MINIMUM_RETENTION_CHECK",
"ControlInputParameters": [{"ParameterName":"requiredRetentionDays","ParameterValue":"7"}],
"ControlScope":{"ComplianceResourceTypes":["DynamoDB","EBS"]}
}]' \
--framework-description "Minimum retention and frequency compliance"
Step 12: Orchestrate multi-region backup
Use CopyActions in the backup plan rule to copy to a DR region:
# In the plan rule (Step 7), CopyActions already includes cross-region copy
# Verify cross-region copy jobs are succeeding:
aws backup list-copy-jobs --by-state COMPLETED --region us-east-1
Output format
Worked example — AUTOMATION_DEPLOYED, tiered production backup
BACKUP: prod-backup-automation-baseline
PLAN: tiered-retention-plan (daily, 30d hot + 335d cold, cross-region copy to us-west-2)
VAULT: prod-vault (GOVERNANCE lock, min 7d, max 365d)
LIFECYCLE: MoveToColdStorageAfterDays=30, DeleteAfterDays=365
TRIGGER: SCHEDULED (cron(0 5 ? * * *))
RESTORE_TEST: Monthly, RTO target 4 hours, last test 2026-07-15
TAG_SCOPE: backup-plan=tiered-prod, environment=prod
CROSS_ACCOUNT: NONE
CROSS_REGION: us-west-2 (dr-vault, 90d retention)
VERDICT: AUTOMATION_DEPLOYED
GAP: None
TEMPLATE:
aws backup create-backup-plan --backup-plan '{"BackupPlanName":"tiered-retention-plan","Rules":[{"RuleName":"daily-tiered","TargetBackupVaultName":"prod-vault","ScheduleExpression":"cron(0 5 ? * * *)","Lifecycle":{"MoveToColdStorageAfterDays":30,"DeleteAfterDays":365},"CopyActions":[{"DestinationBackupVaultArn":"arn:aws:backup:us-west-2:111111111111:backup-vault:dr-vault","Lifecycle":{"DeleteAfterDays":90}}]}]}'
Worked example — REVIEW_REQUIRED, missing vault lock
Moved verbatim to references/worked-examples.md — load on demand.
Anti-Patterns — NEVER do these things
Moved verbatim to references/advanced-patterns.md — load on demand.
Pre-flight safety checks
MANDATORY CONFIRMATION GATE. Before vault lock, plan creation, or
lifecycle changes, emit: CONFIRM: About to <action> for vault <vault> in account <account>. This affects <consequence>. Proceed? (yes/no)
Before enabling vault lock in COMPLIANCE mode, test in GOVERNANCE
mode for at least 3 days.
Before deploying a lifecycle transition, verify the RTO requirement
against cold storage thaw time.
Appendix A — Backup plan templates
Moved verbatim to references/backup-plan-templates.md — load on demand.
Appendix B — Decision tree
Is compliance (WORM) required?
+-- Yes -> Vault lock COMPLIANCE mode + lifecycle to cold + restore testing
| AUTOMATION_DEPLOYED if vault + plan + testing all configured
+-- No -> Is this a production workload?
+-- Yes -> Named vault + GOVERNANCE lock + lifecycle tiering
| + cross-region copy + restore testing
| AUTOMATION_DEPLOYED if all present
+-- No -> Default vault OK + simple daily plan
AUTOMATION_DEPLOYED if tag scope non-empty
Recent AWS features (2024-2026)
Moved verbatim to references/advanced-patterns.md — load on demand.
Expert heuristic: blast radius of vault lock
Moved verbatim to references/advanced-patterns.md — load on demand.
References (load on demand)
- references/advanced-patterns.md — expert-heuristic deep dives, Step-0 expert knowledge, pitfall catalog, recent AWS features
- references/worked-examples.md — secondary worked examples
- references/backup-plan-templates.md — backup plan template catalog (now includes Appendix A)
- references/vault-lock-and-lifecycle.md — vault lock and lifecycle configuration (now includes Steps 6-7 CLI)
Domain
AWS CloudOps / Storage Automation — Backup-driven data protection.
AWS documentation
1---2name: backup-schedule-automator3description: Designs and implements automated AWS Backup scheduling workflows using backup plans, tag-based resource assignment, cross-account backup via Organizations backup policies, on-demand backup triggering via EventBridge and Lambda, backup vault notifications (SNS), restore testing automation, lifecycle policy automation (warm storage tiering to cold storage), curated backup reports, audit trail via CloudTrail, compliance reporting, and multi-region backup orchestration. Wires backup vault lock for WORM compliance, backup plan templates for common patterns (daily-7d, weekly-30d, monthly-1yr), and EventBridge-driven on-demand backups triggered by application deployment events. Emits AUTOMATION_DEPLOYED with a deployment-ready backup plan and policy template or REVIEW_REQUIRED with the specific gap. Use when building AWS Backup automation, designing tag-based backup schedules, configuring cross-account or cross-region backup, implementing lifecycle tiering, or setting up restore testing for RTO/RPO validation.4license: Apache-2.05compatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). No AWS CLI required for offline workflow design. Live deployment uses aws backup create-backup-plan, start-backup-job, create-backup-vault, put-backup-vault-access-policy, create-framework, start-restore-job, describe-backup-job, describe-restore-job, aws events put-rule, put-targets, aws lambda create-function, aws organizations put-backup-policy, and aws cloudformation deploy — AWS CLI v2, SSO or key-based...6metadata:7 source: https://skillmd.com/skills/jhkchan/backup-schedule-automator8 domain: aws-cloudops9 complexity: high10 requires_llm: 'true'11 phase: '4'12 supports_pipeline: 'true'13 entry_point: 'false'14 family: Storage15 task_type: automate16 skill_class: capability17 lifecycle_status: active18 verdict_shape: AUTOMATION_DEPLOYED | REVIEW_REQUIRED19 when_to_use: Designing automated AWS Backup schedules, building tag-based resource assignment at scale, configuring cross-account backup via Organizations policies, implementing lifecycle tiering (warm to cold storage), setting up restore testing automation for RTO/RPO validation, wiring EventBridge on-demand backup triggers, enabling backup vault lock for WORM compliance, deploying curated backup reports, or orchestrating multi-region backup.20 activation_triggers: automate AWS Backup schedule, backup plan from template, tag-based backup assignment, cross-account backup Organizations, backup vault lock WORM, lifecycle cold storage tiering, restore testing automation, RTO RPO validation, on-demand backup EventBridge, backup report automation, backup policy inheritance, multi-region backup orchestration21 invocation_schema: 'Input: either (a) a resource scope (tag-based selection, resource type list) plus backup requirements (frequency, retention, lifecycle), OR (b) a compliance requirement ("daily backups with 1-year retention and WORM lock", "cross-account backup to DR account"). Output: deterministic BACKUP block — PLAN/VAULT/LIFECYCLE/TRIGGER/RESTORE_TEST/VERDICT — where VERDICT is AUTOMATION_DEPLOYED (deployment-ready template) or REVIEW_REQUIRED (specific gap cited).'22 version: 0.1.023 author: Jacky Chan — AWS Community Builder24 keywords: AWS Backup, backup plan, backup vault, tag-based assignment, cross-account backup, backup policy, Organizations backup, vault lock, WORM compliance, lifecycle policy, cold storage tiering, restore testing, RTO RPO validation, backup report, EventBridge on-demand backup, backup vault notification, SNS backup alert, multi-region backup, CloudTrail audit, backup framework25 tags: aws-backup, backup-plan, backup-vault, lifecycle-policy, cross-account, restore-testing, automate26---2728# Backup Schedule Automator2930## Mindset3132**One-line takeaway:** every AWS Backup automation is a six-stage pipeline —33**select** (tag-based resource assignment) → **schedule** (backup plan with34frequency and retention) → **store** (backup vault with access policy and35optional lock) → **tier** (lifecycle policy moving cold backups to cold36storage) → **test** (restore testing for RTO/RPO validation) → **audit**37(CloudTrail + backup reports + framework compliance). A gap in ANY stage38produces either data loss (backup never runs), cost waste (backups never39expire), or false confidence (backups exist but restores fail).4041- **Selection** without **tag governance** is unscalable: manually adding42 resource ARNs to a backup plan works for 10 resources but fails at 1,000.43 Tag-based assignment (`Condition: StringEquals` on `aws:ResourceTag`) is44 the only pattern that scales.45- **Scheduling** without **lifecycle tiering** is expensive: hot storage46 for a 365-day retention plan costs 5-10x what a tiered plan (30 days hot47 then cold) costs. Always design lifecycle transitions.48- **Backups** without **restore testing** are wishful thinking. An untested49 backup is a Schrodinger backup — you do not know if it works until you50 try, and the worst time to find out is during an incident.5152## Quick navigation5354| You want to... | Go to |55|---|---|56| Pick a backup plan template for a common pattern | Step 2 + Appendix A |57| Scale resource assignment with tags | Step 3 (tag-based matrix) |58| Configure cross-account backup via Organizations | Step 4 |59| Wire on-demand backup via EventBridge + Lambda | Step 5 |60| Set up backup vault lock (WORM) for compliance | Step 6 |61| Design lifecycle policy for cold storage tiering | Step 7 |62| Automate restore testing for RTO/RPO validation | Step 8 |63| Configure backup vault notifications (SNS) | Step 9 |64| Deploy curated backup reports | Step 10 |65| Audit backup compliance with frameworks | Step 11 |66| Orchestrate multi-region backup | Step 12 |67| Avoid common backup pitfalls | Anti-Patterns |68| Recent features (vault lock, restore testing, frameworks) | Recent AWS features |6970## Critical rules at a glance (do NOT bury these)71721. **Tag-based resource assignment is the ONLY scalable pattern.**73 Hardcoding resource ARNs in a backup plan works for small fleets but74 breaks when resources are created or destroyed. Tag-based selection75 (`aws:ResourceTag/backup-plan = daily-prod`) automatically includes76 new resources. A resource created without the tag is NOT backed up —77 always alert on untagged critical resources.78792. **Backup vault lock is IRREVERSIBLE.** Once vault lock is in80 `LOCKED` state, you cannot remove it or shorten the retention period.81 You can only extend it. A vault locked with a 365-day retention means82 every backup in that vault is retained for 365 days, no exceptions,83 even if the backup was created in error. Always test in84 `GOVERNANCE` mode first (admin can override) before switching to85 `COMPLIANCE` mode (no override).86873. **Cross-account backup requires a backup vault in the DESTINATION88 account and a backup role that the SOURCE account assumes.** The89 source account performs the backup but writes to the destination90 vault. The destination vault's access policy MUST grant the source91 account's backup role `backup:CopyIntoBackupVault`. Without this,92 cross-account copy silently fails.93944. **Lifecycle transitions are one-way.** Moving a recovery point from95 hot to cold storage is irreversible. A recovery point in cold storage96 takes hours to restore (thaw) vs minutes from hot. Always design the97 transition window based on restore frequency needs, not just cost.98995. **Restore testing is NOT the same as restore verification.** Checking100 that a recovery point EXISTS is verification. Actually restoring it101 and verifying the application starts is testing. Without testing,102 you have no RTO/RPO data for your DR plan.103104## STRICT output contract105106Every backup automation design MUST produce exactly one BACKUP block,107following this format:108109```text110BACKUP: <reference>111PLAN: <backup plan name + rule structure>112VAULT: <vault name + lock mode + access policy summary>113LIFECYCLE: <hot-to-cold transition schedule>114TRIGGER: SCHEDULED | ON_DEMAND | SCHEDULED_AND_ON_DEMAND115RESTORE_TEST: <frequency + RTO target + last test date>116TAG_SCOPE: <tag key=value used for resource assignment>117CROSS_ACCOUNT: <NONE | destination account + vault>118CROSS_REGION: <NONE | destination region>119VERDICT: AUTOMATION_DEPLOYED | REVIEW_REQUIRED120GAP: <if REVIEW_REQUIRED, the specific missing piece>121TEMPLATE: <CLI snippet or YAML for the backup plan + vault + policy>122```123124## NEVER section125126- **NEVER** deploy a backup plan without verifying that the target127 resources carry the required tags. A plan scoped to128 `aws:ResourceTag/backup = daily` that matches zero resources produces129 no backups and no alerts. The backup service does not warn on empty130 selection — it simply does nothing.131132- **NEVER** enable vault lock in COMPLIANCE mode without first testing133 in GOVERNANCE mode. COMPLIANCE mode is irreversible — you cannot134 delete the vault or shorten retention until the lock expires. A typo135 in the retention period (e.g., 3650 days instead of 365) is a136 decade-long commitment.137138- **NEVER** configure a lifecycle transition to cold storage without139 documenting the restore thaw time. Cold storage restores take hours,140 not minutes. If the application RTO is 1 hour, cold storage at day 31141 breaks the SLA. Always map the transition to the RTO curve.142143- **NEVER** assume cross-account backup works without the destination144 vault access policy. The source account needs `backup:CopyIntoBackupVault`145 permission on the destination vault. Without it, the copy job fails146 silently (the backup appears successful in the source but never lands147 in the destination).148149- **NEVER** skip restore testing. An untested backup is a liability,150 not an asset. A backup that cannot be restored is worse than no151 backup because it creates false confidence. Schedule restore tests at152 a frequency tied to the RTO (weekly for Tier 1 apps, monthly for153 Tier 2, quarterly for Tier 3).154155- **NEVER** use the default backup vault for production workloads. The156 default vault has no access policy, no lock, and no notifications.157 Always create named vaults per environment and apply least-privilege158 access policies.159160- **NEVER** configure on-demand backup via EventBridge without a DLQ.161 EventBridge delivers events asynchronously. A Lambda failure drops162 the trigger silently. Configure an SQS DLQ so missed on-demand163 backups are visible.164165- **NEVER** rely solely on AWS Backup reports for compliance evidence.166 Reports show backup job status but not restore-test results. Always167 pair backup reports with restore-test logs for audit completeness.168169## Expert heuristic170> Moved verbatim to [references/advanced-patterns.md](references/advanced-patterns.md) — load on demand.171172173## Configuration dependency graph174175```176Backup vault created (create-backup-vault)177 +-- Access policy (put-backup-vault-access-policy)178 | +-- Source account granted backup:CopyIntoBackupVault (for cross-account)179 +-- Vault lock (put-backup-vault-lock-configuration)180 | +-- GOVERNANCE mode (test) -> COMPLIANCE mode (production WORM)181 +-- Notifications (backup-vault-notifications -> SNS topic)182 +-- Backup plan created (create-backup-plan)183 | +-- Rule: schedule + lifecycle (hot -> cold transition)184 | +-- Rule: copy to destination region/account185 | +-- Selection: tag-based resource assignment186 | +-- IAM role: AWSBackupDefaultServiceRole187 | +-- Tag conditions: backup-plan=X, environment=prod188 +-- Organizations backup policy (for multi-account)189 | +-- Policy applied at root/OU level190 | +-- Member accounts inherit plan + vault assignment191 +-- EventBridge on-demand trigger (optional)192 | +-- Lambda: start-backup-job on deployment event193 | +-- SQS DLQ for failed triggers194 +-- Restore testing (start-restore-job on schedule)195 | +-- Lambda: restore + verify + report196 +-- Backup framework (create-framework)197 | +-- Compliance controls + reporting198 +-- Backup report plan (create-report-plan)199 +-- Curated report delivered to S3200```201202## Pre-flight: data requirements203204| Input | Source | Why |205|---|---|---|206| Existing backup plans | `list-backup-plans` | Avoid duplicate plans |207| Existing backup vaults | `list-backup-vaults` | Reuse or identify gaps |208| Tag inventory | `tag:get-resources` with backup tags | Verify tag coverage |209| Backup jobs history | `list-backup-jobs` | Success rate baseline |210| Restore jobs history | `list-restore-jobs` | Restore test history |211| Vault lock status | `describe-backup-vault` | Existing lock configuration |212| Organizations policy | `organizations describe-policy` | Existing backup policy |213| Framework status | `describe-framework` | Compliance control status |214215**If the input is malformed**, emit:216217```text218BACKUP: <reference>219PLAN: UNKNOWN220VERDICT: ERROR221REASON: Cannot design backup plan — resource scope and retention requirements are required.222GAP: Re-supply resource tag inventory and backup frequency/retention targets.223```224225## Process — Workflow design (apply in order)226227### Step 0: Expert knowledge — non-obvious Backup behaviors228> Moved verbatim to [references/advanced-patterns.md](references/advanced-patterns.md) — load on demand.229230231### Step 1: Verify existing backup posture232233```bash234aws backup list-backup-plans --output json235aws backup list-backup-vaults --output json236aws backup list-backup-jobs --by-state COMPLETED --max-results 5237```238239### Step 2: Select or build a backup plan template240241| Template | Frequency | Retention | Lifecycle | Use case |242|---|---|---|---|---|243| daily-7d | Daily | 7 days hot | None | Dev/test environments |244| daily-30d-weekly-90d | Daily + Weekly | 7d hot + 30d hot + 90d cold | 30d hot -> cold | Standard production |245| daily-30d-monthly-1yr | Daily + Monthly | 7d hot + 30d cold + 365d cold | 7d hot -> cold | Compliance workloads |246| continuous-35d | Continuous (PITR) | 35 days | None | RDS/DynamoDB continuous |247248### Step 3: Configure tag-based resource assignment249250```bash251aws backup create-backup-selection \252 --backup-plan-id "daily-prod-plan" \253 --backup-selection '{254 "SelectionName": "prod-tagged-resources",255 "IamRoleArn": "arn:aws:iam::111111111111:role/AWSBackupDefaultServiceRole",256 "ListOfTags": [{"ConditionType":"STRINGEQUALS","ConditionKey":"backup-plan","ConditionValue":"daily-prod"}],257 "Conditions": {"StringEquals": [{"ConditionKey":"aws:ResourceTag/environment","ConditionValue":"prod"}]}258 }'259```260261### Step 4: Configure cross-account backup via Organizations262263```bash264# Create backup policy at the OU level265aws organizations create-policy \266 --type BACKUP_POLICY \267 --name "org-backup-policy-prod" \268 --content file://backup-policy.json \269 --target-ids "ou-prod-xxxxx"270```271272Policy JSON (simplified):273274```json275{276 "plans": {277 "daily-backup-plan": {278 "regions": {"us-east-1": {"region": "us-east-1"}},279 "rules": {280 "daily-rule": {281 "schedule_expression": "cron(0 5 ? * * *)",282 "target_backup_vault_name": "Default",283 "lifecycle": {"delete_after_days": 30}284 },285 "cross-region-copy-rule": {286 "target_backup_vault_name": "dr-vault",287 "target_region": "us-west-2",288 "lifecycle": {"delete_after_days": 90}289 }290 },291 "selections": {292 "tags": {293 "backup-daily": {"assignment_tag": {"key": "backup-plan", "value": "daily"}}294 }295 }296 }297 }298}299```300301### Step 5: Wire on-demand backup via EventBridge + Lambda302303```bash304aws events put-rule \305 --name on-demand-backup-on-deploy \306 --event-pattern '{307 "source": ["aws.codepipeline"],308 "detail-type": ["CodePipeline Pipeline Execution State Change"],309 "detail": {"state": ["SUCCEEDED"]}310 }'311312aws events put-targets \313 --rule on-demand-backup-on-deploy \314 --targets '[{315 "Id": "on-demand-backup-lambda",316 "Arn": "arn:aws:lambda:us-east-1:111111111111:function:on-demand-backup",317 "DeadLetterConfig": {"Arn": "arn:aws:sqs:us-east-1:111111111111:backup-trigger-dlq"}318 }]'319```320321Lambda handler:322323```python324import boto3325backup = boto3.client('backup')326327def lambda_handler(event, context):328 resp = backup.start_backup_job(329 BackupVaultName='on-demand-vault',330 ResourceArn='arn:aws:dynamodb:us-east-1:111111111111:table/prod-table',331 IamRoleArn='arn:aws:iam::111111111111:role/AWSBackupDefaultServiceRole',332 IdempotencyToken=f"ondemand-{event['time']}",333 Lifecycle={'DeleteAfterDays': 7}334 )335 return {'backupJobId': resp['BackupJobId']}336```337338### Step 6: Configure backup vault lock (WORM)339> Moved verbatim to [references/vault-lock-and-lifecycle.md](references/vault-lock-and-lifecycle.md) — load on demand.340341342### Step 7: Design lifecycle policy for cold storage tiering343> Moved verbatim to [references/vault-lock-and-lifecycle.md](references/vault-lock-and-lifecycle.md) — load on demand.344345346### Step 8: Automate restore testing347348```python349import boto3, json350backup = boto3.client('backup')351sns = boto3.client('sns')352353def lambda_handler(event, context):354 # List recent completed backups355 jobs = backup.list_backup_jobs(356 ByState='COMPLETED', ByBackupVaultName='prod-vault', MaxResults=1357 )358 if not jobs['BackupJobs']:359 return {'status': 'no_backups_to_test'}360361 job = jobs['BackupJobs'][0]362 # Start restore to a test VPC/subnet363 resp = backup.start_restore_job(364 RecoveryPointArn=job['RecoveryPointArn'],365 Metadata={366 'VpcId': 'vpc-testrestore',367 'SubnetId': 'subnet-testrestore',368 'InstanceType': 't3.medium'369 },370 IamRoleArn='arn:aws:iam::111111111111:role/BackupRestoreRole'371 )372373 # Notify374 sns.publish(375 TopicArn='arn:aws:sns:us-east-1:111111111111:backup-alerts',376 Message=f'Restore test started: {resp["RestoreJobId"]} for {job["RecoveryPointArn"]}'377 )378 return {'restoreJobId': resp['RestoreJobId']}379```380381### Step 9: Configure backup vault notifications382383```bash384aws backup put-backup-vault-notifications \385 --backup-vault-name "prod-vault" \386 --sns-topic-arn "arn:aws:sns:us-east-1:111111111111:backup-alerts" \387 --backup-vault-events ["BACKUP_JOB_COMPLETED","BACKUP_JOB_FAILED","RESTORE_JOB_COMPLETED","RESTORE_JOB_FAILED"]388```389390### Step 10: Deploy curated backup reports391392```bash393aws backup create-report-plan \394 --report-plan-name "daily-backup-compliance-report" \395 --report-delivery-channel '{"S3BucketName":"backup-reports-111111111111","Formats":["CSV","JSON"]}' \396 --report-setting '{"ReportTemplate":"BACKUP_JOB_REPORT","NumberOfFrameworks":0}'397```398399### Step 11: Audit with backup frameworks400401```bash402aws backup create-framework \403 --framework-name "backup-compliance-framework" \404 --framework-controls '[{405 "ControlName": "BACKUP_RECOVERY_POINT_MINIMUM_RETENTION_CHECK",406 "ControlInputParameters": [{"ParameterName":"requiredRetentionDays","ParameterValue":"7"}],407 "ControlScope":{"ComplianceResourceTypes":["DynamoDB","EBS"]}408 }]' \409 --framework-description "Minimum retention and frequency compliance"410```411412### Step 12: Orchestrate multi-region backup413414Use `CopyActions` in the backup plan rule to copy to a DR region:415416```bash417# In the plan rule (Step 7), CopyActions already includes cross-region copy418# Verify cross-region copy jobs are succeeding:419aws backup list-copy-jobs --by-state COMPLETED --region us-east-1420```421422## Output format423424### Worked example — AUTOMATION_DEPLOYED, tiered production backup425426```text427BACKUP: prod-backup-automation-baseline428PLAN: tiered-retention-plan (daily, 30d hot + 335d cold, cross-region copy to us-west-2)429VAULT: prod-vault (GOVERNANCE lock, min 7d, max 365d)430LIFECYCLE: MoveToColdStorageAfterDays=30, DeleteAfterDays=365431TRIGGER: SCHEDULED (cron(0 5 ? * * *))432RESTORE_TEST: Monthly, RTO target 4 hours, last test 2026-07-15433TAG_SCOPE: backup-plan=tiered-prod, environment=prod434CROSS_ACCOUNT: NONE435CROSS_REGION: us-west-2 (dr-vault, 90d retention)436VERDICT: AUTOMATION_DEPLOYED437GAP: None438TEMPLATE:439 aws backup create-backup-plan --backup-plan '{"BackupPlanName":"tiered-retention-plan","Rules":[{"RuleName":"daily-tiered","TargetBackupVaultName":"prod-vault","ScheduleExpression":"cron(0 5 ? * * *)","Lifecycle":{"MoveToColdStorageAfterDays":30,"DeleteAfterDays":365},"CopyActions":[{"DestinationBackupVaultArn":"arn:aws:backup:us-west-2:111111111111:backup-vault:dr-vault","Lifecycle":{"DeleteAfterDays":90}}]}]}'440```441442### Worked example — REVIEW_REQUIRED, missing vault lock443> Moved verbatim to [references/worked-examples.md](references/worked-examples.md) — load on demand.444445446## Anti-Patterns — NEVER do these things447> Moved verbatim to [references/advanced-patterns.md](references/advanced-patterns.md) — load on demand.448449450## Pre-flight safety checks451452- **MANDATORY CONFIRMATION GATE.** Before vault lock, plan creation, or453 lifecycle changes, emit: `CONFIRM: About to <action> for vault <vault>454 in account <account>. This affects <consequence>. Proceed? (yes/no)`455456- **Before enabling vault lock in COMPLIANCE mode**, test in GOVERNANCE457 mode for at least 3 days.458459- **Before deploying a lifecycle transition**, verify the RTO requirement460 against cold storage thaw time.461462## Appendix A — Backup plan templates463> Moved verbatim to [references/backup-plan-templates.md](references/backup-plan-templates.md) — load on demand.464465466## Appendix B — Decision tree467468```469Is compliance (WORM) required?470+-- Yes -> Vault lock COMPLIANCE mode + lifecycle to cold + restore testing471| AUTOMATION_DEPLOYED if vault + plan + testing all configured472+-- No -> Is this a production workload?473 +-- Yes -> Named vault + GOVERNANCE lock + lifecycle tiering474 | + cross-region copy + restore testing475 | AUTOMATION_DEPLOYED if all present476 +-- No -> Default vault OK + simple daily plan477 AUTOMATION_DEPLOYED if tag scope non-empty478```479480## Recent AWS features (2024-2026)481> Moved verbatim to [references/advanced-patterns.md](references/advanced-patterns.md) — load on demand.482483484## Expert heuristic: blast radius of vault lock485> Moved verbatim to [references/advanced-patterns.md](references/advanced-patterns.md) — load on demand.486487488489## References (load on demand)490491- [references/advanced-patterns.md](references/advanced-patterns.md) — expert-heuristic deep dives, Step-0 expert knowledge, pitfall catalog, recent AWS features492- [references/worked-examples.md](references/worked-examples.md) — secondary worked examples493- [references/backup-plan-templates.md](references/backup-plan-templates.md) — backup plan template catalog (now includes Appendix A)494- [references/vault-lock-and-lifecycle.md](references/vault-lock-and-lifecycle.md) — vault lock and lifecycle configuration (now includes Steps 6-7 CLI)495496## Domain497498AWS CloudOps / Storage Automation — Backup-driven data protection.499500## AWS documentation501502- **AWS Backup** — https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html503- **Backup Vault Lock** — https://docs.aws.amazon.com/aws-backup/latest/devguide/vault-lock.html504- **Backup Plans** — https://docs.aws.amazon.com/aws-backup/latest/devguide/about-backup-plans.html505- **Cross-Account Backup** — https://docs.aws.amazon.com/aws-backup/latest/devguide/cross-account-backup.html506- **Organizations Backup Policies** — https://docs.aws.amazon.com/aws-backup/latest/devguide/orgs-assign-backup-policies.html507- **AWS Backup Restore** — https://docs.aws.amazon.com/aws-backup/latest/devguide/restoring-data.html508- **AWS Backup Frameworks** — https://docs.aws.amazon.com/aws-backup/latest/devguide/frameworks.html