Access control - AWS Backup

Access control

You can have valid credentials to authenticate your requests, but unless you have the appropriate permissions, you can't access AWS Backup resources such as backup vaults. You also can't back up AWS resources such as Amazon Elastic Block Store (Amazon EBS) volumes.

Every AWS resource is owned by an AWS account, and permissions to create or access a resource are governed by permissions policies. An account administrator can attach permissions policies to AWS Identity and Access Management (IAM) identities (that is, users, groups, and roles). And some services also support attaching permissions policies to resources.

Note

An account administrator (or administrator user) is a user with administrator permissions. For more information, see IAM Best Practices in the IAM User Guide.

When granting permissions, you decide who is getting the permissions, the resources they get permissions for, and the specific actions that you want to allow on those resources.

The following sections cover how access policies work and how you use them to protect your backups.

Resources and operations

A resource is an object that exists within a service. AWS Backup resources include backup plans, backup vaults, and backups. Backup is a general term that refers to the various types of backup resources that exist in AWS. For example, Amazon EBS snapshots, Amazon Relational Database Service (Amazon RDS) snapshots, and Amazon DynamoDB backups are all types of backup resources.

In AWS Backup, backups are also referred to as recovery points. When using AWS Backup, you also work with the resources from other AWS services that you are trying to protect, such as Amazon EBS volumes or DynamoDB tables. These resources have unique Amazon Resource Names (ARNs) associated with them. ARNs uniquely identify AWS resources. You must have an ARN when you need to specify a resource unambiguously across all of AWS, such as in IAM policies or API calls.

The following table lists resources, subresources, and ARN format.

AWS Backup resource ARNs
Resource type ARN format
Backup plan arn:aws:backup:region:account-id:backup-plan:*
Backup vault arn:aws:backup:region:account-id:backup-vault:*
Recovery point for Amazon EBS arn:aws:ec2:region::snapshot/*
Recovery point for Amazon EFS arn:aws:backup:region:account-id:recovery-point:*
Recovery point for Amazon RDS arn:aws:rds:region:account-id:snapshot:awsbackup:*
Recovery point for Amazon Aurora arn:aws:rds:region:account-id:cluster-snapshot:awsbackup:*
Recovery point for Storage Gateway arn:aws:ec2:region::snapshot/*
Recovery point for DynamoDB arn:aws:dynamodb:region:account-id::table/*/backup/*

AWS Backup provides a set of operations to work with AWS Backup resources. For a list of available operations, see AWS Backup Actions.

Resource ownership

The AWS account owns the resources that are created in the account, regardless of who created the resources. Specifically, the resource owner is the AWS account of the principal entity (that is, the AWS account root user, an IAM user, or an IAM role) that authenticates the resource creation request. The following examples illustrate how this works:

  • If you use the AWS account root user credentials of your AWS account to create a backup vault, your AWS account is the owner of the vault.

  • If you create an IAM user in your AWS account and grant permissions to create a backup vault to that user, the user can create a backup vault. However, your AWS account, to which the user belongs, owns the backup vault resource.

  • If you create an IAM role in your AWS account with permissions to create a backup vault, anyone who can assume the role can create a vault. Your AWS account, to which the role belongs, owns the backup vault resource.

Specifying policy elements: actions, effects, and principals

For each AWS Backup resource (see Resources and operations), the service defines a set of API operations (see Actions). To grant permissions for these API operations, AWS Backup defines a set of actions that you can specify in a policy. Performing an API operation can require permissions for more than one action.

The following are the most basic policy elements:

  • Resource – In a policy, you use an Amazon Resource Name (ARN) to identify the resource to which the policy applies. For more information, see Resources and operations.

  • Action – You use action keywords to identify resource operations that you want to allow or deny.

  • Effect – You specify the effect when the user requests the specific action—this can be either allow or deny. If you don't explicitly grant access to (allow) a resource, access is implicitly denied. You can also explicitly deny access to a resource, which you might do to make sure that a user cannot access it, even if a different policy grants access.

  • Principal – In identity-based policies (IAM policies), the user that the policy is attached to is the implicit principal. For resource-based policies, you specify the user, account, service, or other entity that you want to receive permissions (applies to resource-based policies only).

To learn more about IAM policy syntax and descriptions, see IAM JSON Policy Reference in the IAM User Guide.

For a table showing all of the AWS Backup API actions, see API permissions: actions, resources, and conditions reference.

Specifying conditions in a policy

When you grant permissions, you can use the IAM policy language to specify the conditions when a policy should take effect. For example, you might want a policy to be applied only after a specific date. For more information about specifying conditions in a policy language, see Condition in the IAM User Guide.

To express conditions, you use predefined condition keys. There are no condition keys specific to AWS Backup. However, there are AWS-wide condition keys that you can use as appropriate. For a complete list of AWS-wide keys, see AWS Global Condition Context Keys in the IAM User Guide.

Note

AWS Backup does not support tag or context key conditions in access policies for any of its actions.

API permissions: actions, resources, and conditions reference

When you are setting up Access control and writing a permissions policy that you can attach to an IAM identity (identity-based policies), you can use the following table as a reference. The table lists each AWS Backup API operation, the corresponding actions for which you can grant permissions to perform the action, and the AWS resource for which you can grant the permissions. You specify the actions in the policy's Action field, and you specify the resource value in the policy's Resource field.

You can use AWS-wide condition keys in your AWS Backup policies to express conditions. For a complete list of AWS-wide keys, see Available Keys in the IAM User Guide.

Use the scroll bars to see the rest of the table.

AWS Backup API and required permissions for actions
AWS Backup API operations Required permissions (API actions) Resources

CreateBackupPlan

backup:CreateBackupPlan

arn:aws:backup:region:account-id:backup-plan:*

CreateBackupSelection

backup:CreateBackupSelection

arn:aws:backup:region:account-id:backup-plan:*

CreateBackupVault

backup:CreateBackupVault

backup-storage:MountCapsule

kms:CreateGrant

kms:GenerateDataKey

kms:Decrypt

kms:RetireGrant

kms:DescribeKey

arn:aws:backup:region:account-id:backup-vault:*

For backup-storage: *

For kms:

arn:aws:backup:region:account-id:key:*

DeleteBackupPlan

backup:DeleteBackupPlan

arn:aws:backup:region:account-id:backup-plan:*

DeleteBackupSelection

backup:DeleteBackupSelection

arn:aws:backup:region:account-id:backup-plan:*

DeleteBackupVault

backup:DeleteBackupVault

Uses existing vault access policy.

arn:aws:backup:region:account-id:backup-vault:*

DeleteBackupVaultAccessPolicy

backup:DeleteBackupVaultAccessPolicy

arn:aws:backup:region:account-id:backup-vault:*

DeleteBackupVaultNotifications

backup:DeleteBackupVaultNotification

Uses existing vault access policy.

arn:aws:backup:region:account-id:backup-vault:*

DeleteRecoveryPoint

backup:DeleteRecoveryPoint

Uses existing vault access policy.

See AWS Backup resource ARNs for resource-specific recovery point ARNs.

DescribeBackupJob

backup:DescribeBackupJob

DescribeBackupVault

backup:DescribeBackupVault

Uses existing vault access policy.

arn:aws:backup:region:account-id:backup-vault:*

DescribeProtectedResource

backup:DescribeProtectedResource

DescribeRecoveryPoint

backup:DescribeRecoveryPoint

Uses existing vault access policy.

arn:aws:backup:region:account-id:backup-vault:*

See AWS Backup resource ARNs for resource-specific recovery point ARNs.

DescribeRestoreJob

backup:DescribeRestoreJob

arn:aws:backup:region:account-id:recovery-point:*

DescribeRegionSettings

backup:DescribeRegionSettings

ExportBackupPlanTemplate

backup:ExportBackupPlanTemplate

GetBackupPlan

backup:GetBackupPlan

arn:aws:backup:region:account-id:backup-plan:*

GetBackupPlanFromJSON

backup:GetBackupPlanFromJSON

GetBackupPlanFromTemplate

backup:GetBackupPlanFromTemplate

arn:aws:backup:region:account-id:backup-plan:*

GetBackupSelection

backup:GetBackupSelection

arn:aws:backup:region:account-id:backup-plan:*

GetBackupVaultAccessPolicy

backup:GetBackupVaultAccessPolicy

Uses existing vault access policy.

arn:aws:backup:region:account-id:backup-vault:*

GetBackupVaultNotifications

backup:GetBackupVaultNotification

Uses existing vault access policy.

arn:aws:backup:region:account-id:backup-vault:*

GetRecoveryPointRestoreMetadata

backup:GetRecoveryPointRestoreMetadata

Uses existing vault access policy.

arn:aws:backup:region:account-id:backup-vault:*

GetSupportedResourceTypes

backup:GetSupportedResourceTypes

ListBackupJobs

backup:ListBackupJobs

ListBackupPlans

backup:ListBackupPlans

ListBackupPlanTemplates

backup:ListBackupPlanTemplates

ListBackupPlanVersions

backup:ListBackupPlanVersions

arn:aws:backup:region:account-id:backup-plan:*

ListBackupSelections

backup:ListBackupSelections

arn:aws:backup:region:account-id:backup-plan:*

ListBackupVaults

backup:ListBackupVaults

arn:aws:backup:region:account-id:backup-vault:*

ListProtectedResources

backup:ListProtectedResources

ListRecoveryPointsByBackupVault

backup:ListRecoveryPointsByBackupVault

Uses existing vault access policy.

arn:aws:backup:region:account-id:backup-vault:*

ListRecoveryPointsByResource

backup:ListRecoveryPointsByResource

ListRestoreJobs

backup:ListRestoreJobs

ListTags

backup:ListTags

PutBackupVaultAccessPolicy

backup:PutBackupVaultAccessPolicy

Uses existing vault access policy.

arn:aws:backup:region:account-id:backup-vault:*

PutBackupVaultNotifications

backup:PutBackupVaultNotifications

Uses existing vault access policy.

arn:aws:backup:region:account-id:backup-vault:*

StartBackupJob

backup:StartBackupJob

arn:aws:backup:region:account-id:backup-vault:*

StartRestoreJob

backup:StartRestoreJob

arn:aws:backup:region:account-id:backup-vault:*

arn:aws:backup:region:account-id:recovery-point:*

Note

StartRestoreJob also needs to have the key-value pair in the metadata for the resource. To get the metadata of the resource, call the GetRecoveryPointRestoreMetadata API.

StopBackupJob

backup:StopBackupJob

TagResource

backup:TagResource

UntagResource

backup:UntagResource

UpdateBackupPlan

backup:UpdateBackupPlan

arn:aws:backup:region:account-id:backup-plan:*

UpdateRecoveryPointLifecycle

backup:UpdateRecoveryPointLifecycle

Uses existing vault access policy.

arn:aws:backup:region:account-id:backup-vault:*

See AWS Backup resource ARNs for resource-specific recovery point ARNs.

UpdateRegionSettings

backup:UpdateRegionSettings

backup:DescribeRegionSettings

Copy tags permissions

When AWS Backup performs a backup or copy job, it attempts to copy the tags from your source resource (or recovery point in the case of copy) to your recovery point.

Note

AWS Backup does not copy tags during restore jobs.

During a backup or copy job, AWS Backup aggregates the tags you specify in your backup plan (or copy plan, or on-demand backup) with the tags from your source resource. However, AWS enforces a limit of 50 tags per resource, which AWS Backup cannot exceed. When a backup or copy job aggregates tags from the plan and the source resource, it might discover more than 50 total tags, it will be unable to complete the job, and will fail the job. This is consistent with AWS-wide tagging best practices. To learn more, see Tag limits in the AWS General Reference Guide.

  • Your resource has more than 50 tags after aggregating your backup job tags with your source resource tags. AWS supports up to 50 tags per resource. For more information, see .

  • The IAM role you provide to AWS Backup lacks permissions to read the source tags or set the destination tags. For more information and sample IAM role policies, see Managed Policies.

You can use your backup plan to create tags that contradict your source resource tags. When the two conflict, the tags from your backup plan take precedence. Use this technique if you prefer not to copy a tag value from your source resource. Specify the same tag key, but different or empty value, using your backup plan.

Permissions Required to assign tags to backups
Resource type Required permission
Amazon EFS file system

elasticfilesystem:DescribeTags

Amazon FSx file system

fsx:ListTagsForResource

Amazon RDS database and Amazon Aurora cluster

rds:AddTagsToResource

rds:ListTagsForResource

Storage Gateway volume

storagegateway:ListTagsForResource

Amazon EC2 instance and Amazon EBS volume

EC2:CreateTags

EC2:DescribeTags

DynamoDB does not support assigning tags to backups. AWS Backup does not copy tags from tables.

When an Amazon EC2 backup creates an Image Recovery Point and a set of snapshots, AWS Backup copies tags to the resulting AMI. AWS Backup also copies the tags from the volumes associated with the Amazon EC2 instance to the resulting snapshots.

Access policies

A permissions policy describes who has access to what. Policies attached to an IAM identity are referred to as identity-based policies (IAM policies). Policies attached to a resource are referred to as resource-based policies. AWS Backup supports both identity-based policies and resource-based policies.

Note

This section discusses using IAM in the context of AWS Backup. It doesn't provide detailed information about the IAM service. For complete IAM documentation, see What Is IAM? in the IAM User Guide. For information about IAM policy syntax and descriptions, see IAM JSON Policy Reference in the IAM User Guide.

Identity-based policies (IAM policies)

Identity-based policies are policies that you can attach to IAM identities, such as users or roles. For example, you can define a policy that allows a user to view and back up AWS resources, but prevents them from restoring backups.

For more information about users, groups, roles, and permissions, see Identities (Users, Groups, and Roles) in the IAM User Guide.

For information about how to use IAM policies to control access to backups, see Managed policies.

Resource-based policies

AWS Backup supports resource-based access policies for backup vaults. This enables you to define an access policy that can control which users have what kind of access to any of the backups organized in a backup vault. Resource-based access policies for backup vaults provide an easy way to control access to your backups.

Backup vault access policies control user access when you use AWS Backup APIs. Some backup types, such as Amazon Elastic Block Store (Amazon EBS) and Amazon Relational Database Service (Amazon RDS) snapshots, can also be accessed using those services' APIs. You can create separate access policies in IAM that control access to those APIs in order to fully control access to backups.

To learn how to create an access policy for backup vaults, see Setting access policies on backup vaults and recovery points.