

# Deploy a backup appliance

You deploy the appliance to the target you selected: on-premises on VMware, or in-cloud on Amazon EC2. Deploy every node from the same appliance artifact and the same software version.

When you create the appliance, AWS returns the appliance artifact and an activation token. For on-premises deployments, the `Image` value in the response is a pre-signed URL that you use to download the OVA template. For in-cloud deployments, the `Image` value is the ID of the AMI that you launch instances from.

The activation token is the credential that connects each deployed node to AWS Backup. You can pass the token to each node when you deploy it, or enter it later on the node's local console. For details, see [Choose how to activate](#appliance-deploy-activate-choose).

**Node fault tolerance.** Node fault tolerance is the number of nodes in a backup appliance that can fail at the same time without the appliance losing data or stopping backups and restores. You can choose a node fault tolerance of 1 or 2, and that choice sets the minimum number of nodes the appliance needs:
+ Node fault tolerance of 1: at least 3 nodes, 4 recommended for production workloads.
+ Node fault tolerance of 2: at least 6 nodes, 8 recommended for production workloads.

## Prerequisites
<a name="appliance-deploy-prerequisites"></a>
+ A completed sizer recommendation (number of nodes, data disk size, metadata disk size). An appliance needs at least 3 nodes for a node fault tolerance of 1, or 6 nodes for a node fault tolerance of 2. For high availability for production workloads, we recommend at least 4 nodes for a node fault tolerance of 1, or 8 nodes for a node fault tolerance of 2.
+ An IAM role for the appliance to use. AWS provides the `AWSBackupServiceRolePolicyForBackupAppliance` managed policy for this role. For the trust policy and the other setup the role needs, see [Create the appliance IAM role](#appliance-deploy-iam-role).
+ Network inputs. For more information, see [Network requirements and ports](appliance-network.md).

For on-premises (OVA) deployments, you download and install the appliance image before you activate the appliance. This applies to OVA deployments only, because in-cloud deployments have no download.

The OVA download URL is valid for 15 minutes. The `ActivationTokenExpiresAt` value returned with the activation token shows when the token expires. If either expires, get new ones from the AWS Backup console or by calling `GetActivationCredentials`.

**Important**  
The appliance stores some of its secrets on its disks. If the disks aren't encrypted, anyone who gets a copy of them can use it to read your backups, even though the vault's AWS KMS key encrypts them. Encrypt every appliance disk, and limit who can copy them. For details, see [Protect the appliance disks](#appliance-deploy-protect-disks).

### Node and disk requirements
<a name="appliance-deploy-node-disk"></a>

**On-premises (VMware) nodes.** Each node VM needs:
+ 16 vCPUs and 64 GiB of memory, reserved for the VM
+ A 10 Gbps network connection
+ A 245 GiB system disk, included in the OVA template
+ One VMXNET3 network adapter
+ EFI firmware with Secure Boot turned off

For in-cloud node requirements, see [Deploy in-cloud (EC2 AMI)](#appliance-deploy-incloud).

**Disks for every node.** In addition to the system disk, attach at least two raw, unpartitioned disks of different sizes to each node: one or two data disks and one or two metadata disks. The appliance uses the smaller disks as metadata disks. We recommend two data disks and two metadata disks per node, sized as the sizer recommends.

Each disk must meet the following requirements.


|  | Metadata disk | Data disk | 
| --- | --- | --- | 
| Size per disk | At least 150 GiB, up to 1 TiB | At least 151 GiB, up to 16 TiB | 
| Size per node, with two disks | At least 300 GiB, up to 2 TiB | At least 302 GiB, up to 32 TiB | 
| Performance per disk (VMware) | At least 5,000 IOPS, latency under 0.2 ms, and 50 MiB/s throughput | At least 2,000 IOPS, latency under 20 ms, and 125 MiB/s throughput | 
| Volume type (Amazon EC2) | gp3, provisioned with 4,000 IOPS (125 MiB/s throughput) | gp3 with the default 3,000 IOPS and 125 MiB/s throughput | 

Make every metadata disk smaller than every data disk. If the data and metadata disks are the same size, the node can't be added to the appliance. Its management status changes to FAILED, and its notification says that the data and metadata disks are the same size.

To fix it, delete the failed node, then deploy a new node with a metadata disk that is smaller than its data disk, and verify it. You can't fix a failed node by changing its disks. If this happens while the appliance is being created, the appliance stays PENDING until enough nodes are verified, and then creation continues.

**Verifying the OVA template.** To verify the OVA template's signature, you need permission to add trusted root certificates in vCenter.

## Create the appliance IAM role
<a name="appliance-deploy-iam-role"></a>

Each appliance uses an IAM role in your account. AWS assumes the role and gives the appliance short-lived credentials to call AWS, and also uses the role to publish the appliance's metrics to CloudWatch. Each set of credentials is limited to what that appliance or job needs. You can use one role for all appliances in your account, or a separate role for each appliance.

1. Create an IAM role with the following trust policy. Replace `{{account-id}}` with your AWS account ID.

   ```
   {
       "Version": "2012-10-17",
       "Statement": [
           {
               "Effect": "Allow",
               "Principal": {
                   "Service": "backup-external.amazonaws.com"
               },
               "Action": [
                   "sts:AssumeRole",
                   "sts:TagSession"
               ],
               "Condition": {
                   "StringEquals": {
                       "aws:SourceAccount": "{{account-id}}"
                   },
                   "ArnLike": {
                       "aws:SourceArn": "arn:aws:backup-external:*:{{account-id}}:appliance:*"
                   }
               }
           }
       ]
   }
   ```

1. Attach the `AWSBackupServiceRolePolicyForBackupAppliance` AWS managed policy to the role.

1. Make sure that whoever calls `CreateAppliance` or `UpdateAppliance` has `iam:PassRole` permission for the role.

1. Tag each Secrets Manager secret that holds credentials for your resources with the key `aws-backup-external-appliance` and the value `true`. The appliance can read only tagged secrets. If a secret is in another account, its resource policy and the policy of the AWS KMS key that encrypts it must also allow the role. Resources that use a secret are VMware vCenter Server and ESXi hosts (see [Prepare VMware](prepare-vmware.md)) and SMB file shares (see [Prepare NAS](prepare-nas.md)).

1. Make sure the AWS KMS key for your local vault allows the role to use it. The default key policy allows this through IAM. If your key policy doesn't delegate to IAM, add the role to it.

1. If you send job reports to Amazon S3, use a bucket in the same account as the role or in the same organization.

The conditions in the trust policy make sure that AWS can assume the role only on behalf of appliances in your account. To limit the Region, replace the `*` after `backup-external:` with your Region.

To limit the role to one appliance, replace `appliance:*` with the appliance's ARN after you create the appliance. The role must allow `appliance:*` when you call `CreateAppliance`, because the appliance's ARN doesn't exist until then. If you pin a role to one appliance, use a different role for each new appliance.

### Change the appliance role
<a name="appliance-deploy-iam-role-change"></a>

To use a different role for an existing appliance, call `UpdateAppliance` with the new role's ARN in `ApplianceIamRoleArn`. You need `iam:PassRole` permission for the new role.

Before you change it, set up the new role the same way as the original: the trust policy, the `AWSBackupServiceRolePolicyForBackupAppliance` policy, access to your tagged secrets, and access to the local vault's AWS KMS key. If the new role's trust policy is pinned to one appliance, use that appliance's ARN. AWS checks that it can assume the new role before it makes the change, and the update fails if it can't. Keep the original role until the update completes.

## Network inputs
<a name="appliance-deploy-network-inputs"></a>

You provide the following network inputs when you create the appliance:
+ Subnet gateway
+ Subnet mask
+ DNS servers
+ Domain name (optional)
+ Search domains (optional)
+ NTP servers (required). On Amazon EC2, you can use the Amazon Time Sync Service at `169.254.169.123`.

If you use an HTTP proxy or AWS PrivateLink endpoints, you set them on each node when you deploy or activate it, not when you create the appliance. You can't change them after the node is activated. Use the same values on every node in the appliance. If you use PrivateLink, create the appliance before you create the VPC endpoints for the activation and edge endpoint services. For details, see [Private connectivity](appliance-network.md#appliance-network-private).

## Choose how to activate
<a name="appliance-deploy-activate-choose"></a>

You can activate each node in one of two ways:

1. Pass the activation token, Region, and any HTTP proxy and PrivateLink settings when you deploy the node: in the OVA **Customize template** step, or as Amazon EC2 user data. The node activates when it starts.

1. Deploy the node without a token, then enter the token and settings on the **Activation** tab of the node's [local console](appliance-local-console.md). Use the local console when you want to test connectivity to AWS before you activate, because you can't change the proxy or PrivateLink settings afterward.

**Important**  
Enter all activation settings in one place. If you put HTTP proxy or PrivateLink settings in the OVA template or user data but enter the token and Region in the local console, the node uses only what you enter in the local console. Enter the proxy and PrivateLink settings in the local console too.

## Protect the appliance disks
<a name="appliance-deploy-protect-disks"></a>

The appliance stores some of its secrets on its disks. If the disks aren't encrypted, anyone who gets a copy of them can use it to read your backups, even though the vault's AWS KMS key encrypts them. Encrypt every appliance disk, including the system disk and every data and metadata disk, and limit who can copy them.


|  | Amazon EC2 | VMware | 
| --- | --- | --- | 
| Encrypt the disks | Encrypt every Amazon EBS volume of every node, including the root volume, with a AWS KMS key. To make sure new volumes are encrypted, turn on Amazon EBS encryption by default in the Region. | Encrypt each node VM with vSphere VM Encryption, which requires a key provider in vCenter, or store the VMs on an encrypted datastore. | 
| Limit who can copy the disks | Limit who can create snapshots or AMIs of the appliance's instances and volumes, copy, share or export them, and attach the volumes to other instances. Don't share snapshots of the appliance's volumes. | Limit who can clone, export, snapshot or download the appliance VMs, and who can browse their datastore files. Protect any backups of the appliance VMs themselves. | 

Encrypt every disk that you add to the appliance later in the same way.

### Using a customer managed key on Amazon EC2
<a name="appliance-deploy-protect-disks-cmk"></a>
+ Whoever launches the appliance's instances or adds disks to them needs permission to use the key: `kms:CreateGrant`, `kms:Decrypt`, `kms:DescribeKey`, `kms:GenerateDataKeyWithoutPlaintext` and `kms:ReEncrypt*`. To limit `kms:CreateGrant`, use the `kms:GrantIsForAWSResource` condition. If the key is in another account, its key policy must also allow this.
+ If a key policy or service control policy denies access based on network location, such as `aws:SourceVpc` or `aws:SourceIp`, make sure it doesn't apply to the role that Amazon EC2 uses for the instance. Otherwise the instances can't start or attach their volumes. For details, see Requirements for Amazon EBS encryption in the *Amazon EBS User Guide*.
+ Keep the key enabled. If you disable or delete it, running nodes keep working, but a node that restarts can't attach its disks until the key is usable again.

Use the encryption that Amazon EBS or your VMware environment provides. The appliance doesn't support disks that it has to decrypt itself.

## Deploy on-premises (VMware OVA)
<a name="appliance-deploy-onprem"></a>

1. In the AWS Backup console, create the appliance and choose the on-premises target.

1. Download the OVA template from the pre-signed URL that AWS provides. The URL is valid for 15 minutes.

1. (Optional) To verify that the OVA template comes from AWS and hasn't been modified, import the AWS root certificate into vCenter before you deploy. Download the root certificate from the link on the deploy page of the AWS Backup console, or from the `AwsOvaImageRootCertificateDownloadUrl` value returned by `CreateAppliance` or `GetActivationCredentials`. The root certificate download link doesn't expire. Then add it to vCenter as a trusted root certificate. For the steps, see Add a Trusted Root Certificate to the Certificate Store in the VMware vSphere documentation. When you deploy the template, vCenter then shows it as signed by AWS with a trusted certificate. If you skip this step, vCenter shows the certificate as not trusted, and you can still deploy the template. The root certificate is valid for 10 years. If AWS replaces it, import the new certificate the same way.

1. In vCenter, deploy the OVF on each node by using the Deploy OVF Template wizard. In the wizard's **Customize template** step, enter the node's settings. For the fields, see [Customize template fields](#appliance-deploy-customize-fields).

1. Attach the data and metadata disks to the node, sized as the sizer recommends. We recommend two of each. Make each metadata disk smaller than each data disk. For details, see [Node and disk requirements](#appliance-deploy-node-disk).

1. Power on each node.

1. Verify each node. See [Verify nodes](#appliance-deploy-verify-nodes).

As nodes power on, AWS discovers them and holds them for verification.

### Customize template fields
<a name="appliance-deploy-customize-fields"></a>

The OVA template's **Customize template** step has the following fields. Each node needs its own static IP address. You can't change a node's IP address after the node is deployed. Changing it disconnects the node from the cluster. The appliance doesn't support DHCP. If your network assigns addresses with DHCP, reserve a fixed address for each node. Use the same Region, HTTP proxy and PrivateLink values on every node.


| Category | Field | Required | Description | 
| --- | --- | --- | --- | 
| Activation | Activation token | No | The activation token for the appliance. Leave it empty to activate later from the local console. | 
| Activation | Region | Yes, if you enter a token | The AWS Region where you created the appliance, for example us-east-1. | 
| Network | HTTP proxy | No | Your HTTP proxy, in the form http://host:port. | 
| Primary network interface | Interface name | Yes | The guest interface name. Enter ens192 unless you changed the VM's network adapter. | 
| Primary network interface | IP addresses | Yes | Static IP addresses with subnet prefix, separated by commas, for example 10.0.0.5/24. | 
| Primary network interface | Gateway | Yes | The default gateway, for example 10.0.0.1. | 
| Primary network interface | DNS servers | Yes | DNS server addresses, separated by commas. | 
| Primary network interface | MTU | No | The interface MTU, for example 1500. | 
| PrivateLink endpoints | activation, edge, kms, s3, secretsmanager, sqs, backup-storage, backup-external | No | The Regional VPC endpoint DNS name for each endpoint you use. Leave a field empty to use the public endpoint. For the endpoints, see [Network requirements and ports](appliance-network.md). | 

### VM and storage requirements
<a name="appliance-deploy-onprem-requirements"></a>

For the node VM and disk requirements, see [Node and disk requirements](#appliance-deploy-node-disk). To add storage to a node later, see [Add storage capacity](appliance-storage.md).

To prevent data loss if a host loses power or resets, turn off write caching between the appliance VMs and their storage:
+ Turn off write caching on the physical drives. On most RAID controllers, set Disk Cache Policy to Disabled.
+ Set the storage controller's write policy to Write Through. Use Write Back only if the controller has a working battery-backed (BBU) or flash-backed (FBWC) write cache that keeps its contents through an unexpected power loss.
+ On vSphere, set `backing.writeThrough = true` on every VMDK of the appliance VMs, so that writes bypass the hypervisor's write cache.
+ Don't add caching software or hardware between the appliance VMs and their storage.
+ Keep the appliance VMs on the hosts where you deployed them. In vSphere, set the DRS automation level for these VMs to Disabled or Manual so that vMotion doesn't move them, and don't use Storage vMotion on them.

## Deploy in-cloud (EC2 AMI)
<a name="appliance-deploy-incloud"></a>

1. In the AWS Backup console, create the appliance and choose the in-cloud target.

1. Launch Amazon EC2 instances from the appliance AMI, one per node. The AMI includes a 245 GiB root volume. Use the `m6a.4xlarge` instance type (16 vCPUs, 64 GiB memory) for each node. If `m6a.4xlarge` isn't available in your Region or Availability Zone, use a similar x86\_64 instance type with 16 vCPUs and at least 64 GiB of memory, such as `m7a.4xlarge`, `m7i.4xlarge`, `m6i.4xlarge`, or `m5.4xlarge`. The sizer bases its recommendation on `m6a.4xlarge`.

1. Configure networking: VPC, subnet, and security group. The security group must allow the traffic listed in [Network requirements and ports](appliance-network.md), including all traffic between the appliance's nodes.

1. Attach the data and metadata Amazon EBS volumes to the instance, sized as the sizer recommends. We recommend two of each. Use gp3 volumes, and provision the metadata volumes with 4,000 IOPS. Make each metadata volume smaller than each data volume. For details, see [Node and disk requirements](#appliance-deploy-node-disk).

1. In **Advanced details**, under **User data**, enter the node's activation settings. For the format, see [Activate with Amazon EC2 user data](#appliance-deploy-activate-userdata). To activate later from the local console instead, leave the activation token out.

1. Verify each node. See [Verify nodes](#appliance-deploy-verify-nodes).

## Activate with Amazon EC2 user data
<a name="appliance-deploy-activate-userdata"></a>

For in-cloud nodes, you can pass the activation settings as user data when you launch each instance. Use the following format. The `activation` settings are required. The `network` settings are optional.

```
#cloud-config
aws:
  activation:
    token: {{activation-token}}
    region: {{region}}
  network:
    http_proxy: http://{{proxy-host}}:{{proxy-port}}
    privatelink:
      activation:      {{activation-vpc-endpoint-dns-name}}
      edge:            {{edge-vpc-endpoint-dns-name}}
      backup-external: {{backup-external-vpc-endpoint-dns-name}}
      backup-storage:  {{backup-storage-vpc-endpoint-dns-name}}
      kms:             {{kms-vpc-endpoint-dns-name}}
      sqs:             {{sqs-vpc-endpoint-dns-name}}
      secretsmanager:  {{secretsmanager-vpc-endpoint-dns-name}}
      s3:              {{s3-vpc-endpoint-dns-name}}
```

The following example uses an HTTP proxy and PrivateLink for every endpoint. Each value is the Regional DNS name of an interface VPC endpoint. Replace the endpoint IDs and {{region}} with your own values.

```
#cloud-config
aws:
  activation:
    token: {{activation-token}}
    region: {{region}}
  network:
    http_proxy: http://proxy.example.com:3128
    privatelink:
      activation:      vpce-0a1b2c3d4e5f67890-abcd1234.activation-backup-external.{{region}}.vpce.amazonaws.com
      edge:            vpce-0a1b2c3d4e5f67891-abcd1235.edge-backup-external.{{region}}.vpce.amazonaws.com
      backup-external: vpce-0a1b2c3d4e5f67897-abcd1241.backup-external.{{region}}.vpce.amazonaws.com
      backup-storage:  vpce-0a1b2c3d4e5f67892-abcd1236.backup-storage.{{region}}.vpce.amazonaws.com
      kms:             vpce-0a1b2c3d4e5f67893-abcd1237.kms.{{region}}.vpce.amazonaws.com
      sqs:             vpce-0a1b2c3d4e5f67894-abcd1238.sqs.{{region}}.vpce.amazonaws.com
      secretsmanager:  vpce-0a1b2c3d4e5f67895-abcd1239.secretsmanager.{{region}}.vpce.amazonaws.com
      s3:              vpce-0a1b2c3d4e5f67896-abcd1240.s3.{{region}}.vpce.amazonaws.com
```

The DNS name of an `s3` interface endpoint is listed with a leading `*.`. Remove it, as in the example.


| Setting | Required | Description | 
| --- | --- | --- | 
| aws.activation.token | Yes | The activation token for the appliance. | 
| aws.activation.region | Yes | The AWS Region where you created the appliance, for example us-east-1. | 
| aws.network.http\_proxy | No | Your HTTP proxy, in the form http://host:port. Leave it out if you don't use a proxy. | 
| aws.network.privatelink.{{endpoint}} | No | The Regional VPC endpoint DNS name for that endpoint. Include only the endpoints you use. For the endpoint names, see [AWS endpoints](appliance-network.md#appliance-network-endpoints). | 

Follow these rules, or the node can't read its settings:
+ The first line must be exactly `#cloud-config`.
+ Indent with spaces, not tabs.
+ Use the same user data on every node in the appliance.
+ Check each value before you launch. You can't change the proxy or PrivateLink settings after the node is activated.

The node doesn't report these mistakes. It activates without the settings instead:
+ If `region` is missing or empty, the node ignores the whole `network` section, both the proxy and PrivateLink settings.
+ If a line contains a tab, the node can't parse the user data and ignores the `network` section.
+ The node doesn't validate PrivateLink values. If a value is mistyped, that endpoint uses its public hostname.

Examples of the `network` section:
+ Proxy only: include `http_proxy` and leave out `privatelink`.
+ PrivateLink only: include `privatelink` and leave out `http_proxy`.
+ Both: include both. For how they work together, see [Private connectivity](appliance-network.md#appliance-network-private).

## Activate from the local console
<a name="appliance-deploy-activate-console"></a>

If you deployed a node without an activation token, activate it from its local console.

1. Connect to the node's local console and set the `console-admin` password. For details, see [Local console and offline troubleshooting](appliance-local-console.md).

1. On the **Activation** tab, enter the activation token and Region, and any HTTP proxy and PrivateLink endpoints.

1. Choose **Test connectivity**, then **Show details**, and confirm that every AWS endpoint is reachable.

1. Choose **Activate**.

Activation is complete when the console header shows **Connected** and the **Health** tab shows a status of **Active**. Repeat these steps on each node.

## Activation token
<a name="appliance-deploy-activation-token"></a>

The `ActivationTokenExpiresAt` value returned with the token shows when it expires. One token can activate up to 24 nodes. To activate nodes after the token expires, get a new token from the AWS Backup console or by calling `GetActivationCredentials`. The response also includes a new OVA download URL. For more information, see [Add or remove appliance nodes](appliance-nodes.md).

## Verify nodes
<a name="appliance-deploy-verify-nodes"></a>

For security, nodes that AWS discovers are held in the `PENDING_VERIFICATION` status until you verify them. A node might not appear for verification right away after it starts. After a node activates, verify it in the AWS Backup console or with `VerifyNodes`. After you verify a node, its status changes to `PENDING_NODE_ADDITION` while it joins the appliance. You have up to 30 days after a node registers to verify it. The AWS Backup console shows a banner when new nodes need to be verified.

## Becomes AVAILABLE
<a name="appliance-deploy-becomes-active"></a>

While the appliance is forming, its management status is `PENDING`. It changes to `AVAILABLE` after the minimum number of nodes for its node fault tolerance are discovered, verified, and added: 3 nodes for a fault tolerance of 1, or 6 nodes for a fault tolerance of 2. When the appliance is `AVAILABLE`, it is ready to register resources and run backups.

## Operational Data
<a name="appliance-deploy-operational-data"></a>

After you add your backup appliance nodes, your AWS Backup appliance sends operational data to AWS. This includes node status, job status, alerts, performance metrics, and diagnostic logs. Operational data does not include the data you back up, but diagnostic logs may include configuration details such as hostnames and IP addresses. Operational data is associated with your AWS Backup appliance and AWS account ID and is used to support, maintain, provide, secure, and improve AWS Backup.