Sub topic 15
Managing backups across an AWS Organization
This chapter assumes you know how backup plans, vaults, and the service role work, and that you understand AWS Organizations basics (management account, organizational units, member accounts). It also assumes you have read the chapter on cross-Region and cross-account copies.
Why use organization backup policies
Creating the same plan by hand in every account drifts over time. A backup policy is an AWS Organizations policy type that holds a backup plan definition. You attach it to the organization root, an organizational unit (OU), or a single account. AWS Backup then creates the plan in each affected member account and keeps it in sync with the policy.
Members cannot edit or delete a plan created by a policy. They can still add their own local plans next to it.
Prerequisites in the management account
Before you create a policy, do these steps from the management account:
- Enable trusted access between AWS Backup and AWS Organizations.
- Enable the backup policy type in Organizations.
- Turn on cross-account management in AWS Backup settings if you want to view jobs from the management account.
Each target account also needs the resources the policy refers to. The policy does not create vaults or roles. A vault with the named key and a service role with the named role name must already exist in every target account.
What a backup policy contains
A policy is a JSON document. It looks like a plan, with two differences. Vault and role are given by name, not ARN, so each account uses its own. Resources are selected by tag, not by ARN list.
{
"plans": {
"OrgDaily": {
"regions": { "@@assign": ["us-east-1"] },
"rules": {
"Daily": {
"schedule_expression": { "@@assign": "cron(0 5 ? * * *)" },
"start_backup_window_minutes": { "@@assign": "60" },
"complete_backup_window_minutes": { "@@assign": "180" },
"target_backup_vault_name": { "@@assign": "app-vault" },
"lifecycle": {
"delete_after_days": { "@@assign": "35" }
}
}
},
"selections": {
"tags": {
"DailyTagged": {
"iam_role_arn": { "@@assign": "arn:aws:iam::$account:role/service-role/AWSBackupDefaultServiceRole" },
"tag_key": { "@@assign": "backup" },
"tag_value": { "@@assign": ["daily"] }
}
}
}
}
}
}The @@assign operator sets a value. Organizations also supports inheritance operators such as @@append and @@remove, so a policy on an OU can add to what the root policy sets. The $account variable expands to each member account's ID.
How it fits together
A common design adds a copy_actions block to each rule. It copies recovery points to a vault in a dedicated backup account. Protect that central vault with Vault Lock.
Common errors
- The plan never appears in a member account. Check that the policy type is enabled, the policy is attached to the right target, and the effective policy for that account shows the plan.
- Backups fail with a role error. The named role does not exist in that account. Create it with the same name everywhere.
- Jobs fail on a missing vault. Create the vault in each account before the first scheduled run.
- Resources are skipped. The tag key and value must match exactly, and the resource type must be supported.
Exercise
A backup policy names the vault "app-vault" and the role "AWSBackupDefaultServiceRole". Jobs fail in one member account only. What is the most likely cause, and why does the policy not fix it?
Show answer
That account lacks the vault or the role. A backup policy creates the plan, not the vaults or roles it refers to, so each member account must already have a vault and a role with those exact names.