

# Register resources

Registering a resource is how you bring an on-premises or self-managed resource under AWS Backup management. After you register a resource, AWS Backup discovers the resource targets beneath it, assigns each one a standard AWS ARN, and lets you protect them with the same backup plans, vaults, and monitoring tools you use for AWS resources.

## How registration works
<a name="register-how-it-works"></a>

You register a *resource provider*, the top-level entry point to your infrastructure, such as a VMware vCenter Server, a standalone ESXi host, an Oracle server or cluster, a SQL Server host, a NAS file share, or a Linux or Windows server. AWS Backup then automatically discovers the *resource targets* beneath the resource provider, the virtual machines, databases, server file systems, or file shares that you actually back up.

AWS Backup does not back up the resource provider itself.

For the resource providers and resource targets for each resource type, see [Resource types reference](resource-types-reference.md).

## Prerequisites
<a name="register-prerequisites"></a>

Before you register a resource, make sure that:
+ Your backup appliance is deployed and activated, with network connectivity to both your resources and AWS.
+ You have prepared the resource for the workload you are registering. For workload-specific prerequisites, see the Prepare page for your resource type: [Prepare VMware](prepare-vmware.md), [Prepare NAS](prepare-nas.md), [Prepare SQL Server](prepare-sql-server.md), [Prepare Oracle](prepare-oracle.md), or [Prepare Linux and Windows servers](prepare-linux-windows-servers.md).
+ You have the connection information for the resource provider (for example, its hostname, IP address, or fully qualified domain name).
+ Where credentials are required, you have created the AWS Secrets Manager secret described in the following section, or you plan to use console-assisted creation.

## Provide credentials securely
<a name="register-secret-configuration"></a>

You provide the resource provider's endpoint (for NAS, its share path and protocol) in its resource provider configuration. For resource types that require credentials, you also provide a *secret configuration*, which holds only the credentials. The fields depend on the resource type.

A secret is required for VMware vCenter Server, ESXi hosts, and NAS shares that use SMB. Do not specify a secret for NFS shares, SQL Server, Oracle, or Linux/Windows servers; registration or update requests fail if you do.

For workloads that require credentials, you store those credentials in a secret that you own in AWS Secrets Manager. At registration you supply the secret's ARN. When a sync, backup, or restore runs, your appliance uses its own role to read the secret from Secrets Manager and connect to the resource.

To create the secret yourself:

1. Create a secret in AWS Secrets Manager in the same Region, using JSON with `username` and `password` keys.

1. Tag the secret with the key `aws-backup-external-appliance` and the value `true`. If the secret is in another account, attach a resource policy and configure its AWS KMS key policy to grant read access to your appliance IAM role.

1. Note the secret's ARN to provide in `SecretConfigurationArn` during registration.

Alternatively, in the AWS Backup console you can use the console-assisted experience, which creates the correctly structured secret and, if you choose appliance access, tags it with `aws-backup-external-appliance` = `true` on your behalf during registration.

## Apply tags during registration
<a name="register-apply-tags"></a>

You can apply tags in the register call (`CreateResourceProvider`). AWS Backup applies these tags to the registered resource provider only. Use `TargetTagsOnCreate` for newly discovered resource targets. For more information about tagging, see [Tag resources](tag-resources.md).

## Delete Not found resource targets automatically
<a name="register-auto-delete-not-found"></a>

When AWS Backup no longer finds a resource target at the resource provider, it marks the target Not found. You can have AWS Backup delete Not found targets automatically. When you register or edit a resource provider, choose one of these options: Never (the default), At next resource sync, or After a set number of days. In the API, set `AutoDeleteNotFoundTargetsAfterDays` in `CreateResourceProvider` or `UpdateResourceProvider`. AWS Backup deletes the targets at the end of the first successful resource sync after they have been missing for the set number of days, not immediately.