

# Local vault

A local vault is a type of backup vault that represents, in the AWS Cloud, the backup storage on a backup appliance that runs in your own environment. The recovery points in a local vault are stored on your appliance. The local vault itself holds only the cloud-side representation of those recovery points. You create and manage a local vault through the same AWS Backup console and APIs that you use for other vault types.

A local vault is always the backup target for resources that you protect through a backup appliance. To move those recovery points into cloud storage, you copy them to a cloud vault. For more information, see [Copy backups from a local vault to the cloud](copy-local-vault-cloud.md).

## How a local vault differs from other vault types
<a name="local-vault-differs"></a>

A local vault supports many of the same capabilities as a standard backup vault and a logically air-gapped vault. It differs in a few important ways, because AWS cannot enforce some controls on storage that lives in your own environment.

The following table compares a local vault with a backup vault and a logically air-gapped vault.


| Feature | Local vault | Backup vault | Logically air-gapped vault | 
| --- | --- | --- | --- | 
| Access policies | Supported | Supported | Supported | 
| Tagging | Supported | Supported | Supported | 
| Vault notifications | Supported | Supported | Supported | 
| Vault Lock | Not supported | Supported | Mandatory | 
| Legal Hold | Not supported | Supported | Supported | 
| Backup plan target | Not selectable (backups go to it automatically) | Supported | Supported | 
| Encryption key | Customer managed key only | Customer managed key or AWS managed key (aws/backup) | Customer managed key or AWS owned key | 
| Storage location | Your appliance | AWS Backup storage | AWS Backup storage | 

You can apply access policies, tags, and vault notifications to a local vault exactly as you do for other vaults.

## Vault Lock and Legal Hold are not supported
<a name="local-vault-no-vaultlock-legalhold"></a>

You cannot apply Vault Lock or Legal Hold to a local vault. Both features provide immutability guarantees for the recovery points in a vault, and AWS cannot enforce those guarantees on storage in your own environment.

## Encryption
<a name="local-vault-encryption"></a>

A local vault requires a customer managed key in AWS Key Management Service (AWS KMS). You cannot use an AWS managed key (`aws/backup`) or an AWS owned key. The encryption key is set when you create the local vault and cannot be changed afterward. To use a different key, create a new local vault. If you disable the key or schedule it for deletion, backups, copies, and restores that use this vault fail.

The backup appliance encrypts and decrypts local vault data by calling AWS KMS directly with its appliance IAM role. AWS Backup limits the credentials that it gives each appliance to the key of that appliance's local vault. The appliance role needs the following permissions on the key:
+ `kms:GenerateDataKey` and `kms:Decrypt`, for requests whose encryption context `aws:local-vault:vault-id` is the local vault's ARN.
+ `kms:DescribeKey`, to read the key's metadata.

The AWS managed policy [AWSBackupServiceRolePolicyForBackupAppliance](security-iam-awsmanpol.md#AWSBackupServiceRolePolicyForBackupAppliance) includes these permissions. The key policy must also allow the appliance role to use them, either directly or by allowing IAM policies in the key's account to grant access. If the key is in another account, the key policy must allow the appliance role directly. For how to create the role, see [Create the appliance IAM role](appliance-deploy.md#appliance-deploy-iam-role).

To create a local vault, you also need `kms:DescribeKey` on the key.

## One local vault for each appliance
<a name="local-vault-one-per-appliance"></a>

You can have one local vault for each backup appliance.

## Copy is the only path to cloud storage
<a name="local-vault-copy-only-path"></a>

You can copy recovery points from a local vault to a cloud vault. Copying to a cloud vault is the only way for a local recovery point to become a cloud recovery point. You can copy a recovery point from a cloud vault back into a local vault, for example to restore it on-premises or to run point-in-time recovery. You can't copy from one local vault to another. For more information, see [Copy backups from a local vault to the cloud](copy-local-vault-cloud.md).

## Create and manage a local vault
<a name="local-vault-create-manage"></a>

You create a local vault after you create an appliance, and you bind the local vault to that appliance and to a customer managed key. You manage a local vault through the same vault operations you use for other AWS Backup vaults: describe it, list it, update it, and delete it. When you list vaults, you can filter for local vaults by vault type.

Creating a local vault is asynchronous. The vault starts in the CREATING state and then becomes AVAILABLE or FAILED. If it fails, delete the vault and create it again. Deleting a local vault puts it in the DELETING state while the appliance removes its data, which can take some time. To check the state, call `DescribeBackupVault` or view the vault in the console.

You cannot delete a local vault while it still contains recovery points. Delete the recovery points or let them expire first, and then delete the vault.

For pricing, see [Pricing](https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html#pricing). For more information about how stored size is measured, see [Deduplication and storage size](local-vault-dedupe.md).