

# Amazon Resource Names (ARNs) in Amazon RDS
ARNs in Amazon RDS

Resources created in Amazon Web Services are each uniquely identified with an Amazon Resource Name (ARN). For certain Amazon RDS operations, you must uniquely identify an Amazon RDS resource by specifying its ARN. For example, when you create an RDS DB instance read replica, you must supply the ARN for the source DB instance. 

For information about constructing an ARN and getting an existing ARN, see the following topics.

**Topics**
+ [

# Constructing an ARN for Amazon RDS
](USER_Tagging.ARN.Constructing.md)
+ [

# Getting an existing ARN for Amazon RDS
](USER_Tagging.ARN.Getting.md)

# Constructing an ARN for Amazon RDS
Constructing an ARN

Resources created in Amazon Web Services are each uniquely identified with an Amazon Resource Name (ARN). You can construct an ARN for an Amazon RDS resource using the following syntax. 

 `arn:aws-cn:rds:<region>:<account number>:<resourcetype>:<name>` 

[\[See the AWS documentation website for more details\]](http://docs.amazonaws.cn/en_us/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.Constructing.html)

The following table shows the format that you should use when constructing an ARN for a particular Amazon RDS resource type. 


****  

| Resource type | ARN format | 
| --- | --- | 
| DB instance  |  arn:aws-cn:rds:*<region>*:*<account>*:db:*<name>* For example: <pre>arn:aws-cn:rds:us-east-2:123456789012:db:my-mysql-instance-1</pre>  | 
| DB cluster |  arn:aws-cn:rds:*<region>*:*<account>*:cluster:*<name>* For example: <pre>arn:aws-cn:rds:us-east-2:123456789012:cluster:my-aurora-cluster-1</pre>  | 
| Event subscription  |  arn:aws-cn:rds:*<region>*:*<account>*:es:*<name>* For example: <pre>arn:aws-cn:rds:us-east-2:123456789012:es:my-subscription</pre>  | 
| DB option group  |  arn:aws-cn:rds:*<region>*:*<account>*:og:*<name>* For example: <pre>arn:aws-cn:rds:us-east-2:123456789012:og:my-og</pre>  | 
| DB parameter group  |  arn:aws-cn:rds:*<region>*:*<account>*:pg:*<name>* For example: <pre>arn:aws-cn:rds:us-east-2:123456789012:pg:my-param-enable-logs</pre>  | 
| DB cluster parameter group  |  arn:aws-cn:rds:*<region>*:*<account>*:cluster-pg:*<name>* For example: <pre>arn:aws-cn:rds:us-east-2:123456789012:cluster-pg:my-cluster-param-timezone</pre>  | 
| Reserved DB instance  |  arn:aws-cn:rds:*<region>*:*<account>*:ri:*<name>* For example: <pre>arn:aws-cn:rds:us-east-2:123456789012:ri:my-reserved-postgresql</pre>  | 
| DB security group  |  arn:aws-cn:rds:*<region>*:*<account>*:secgrp:*<name>* For example: <pre>arn:aws-cn:rds:us-east-2:123456789012:secgrp:my-public</pre>  | 
| Automated DB snapshot |  arn:aws-cn:rds:*<region>*:*<account>*:snapshot:rds:*<name>* For example: <pre>arn:aws-cn:rds:us-east-2:123456789012:snapshot:rds:my-mysql-db-2019-07-22-07-23</pre>  | 
| Automated DB cluster snapshot |  arn:aws-cn:rds:*<region>*:*<account>*:cluster-snapshot:rds:*<name>* For example: <pre>arn:aws-cn:rds:us-east-2:123456789012:cluster-snapshot:rds:my-aurora-cluster-2019-07-22-16-16</pre>  | 
| Manual DB snapshot |  arn:aws-cn:rds:*<region>*:*<account>*:snapshot:*<name>* For example: <pre>arn:aws-cn:rds:us-east-2:123456789012:snapshot:my-mysql-db-snap</pre>  | 
| Manual DB cluster snapshot |  arn:aws-cn:rds:*<region>*:*<account>*:cluster-snapshot:*<name>* For example: <pre>arn:aws-cn:rds:us-east-2:123456789012:cluster-snapshot:my-aurora-cluster-snap</pre>  | 
| DB subnet group |  arn:aws-cn:rds:*<region>*:*<account>*:subgrp:*<name>* For example: <pre>arn:aws-cn:rds:us-east-2:123456789012:subgrp:my-subnet-10</pre>  | 

# Getting an existing ARN for Amazon RDS
Getting an existing ARN

You can get the ARN of an RDS resource by using the Amazon Web Services Management Console, Amazon Command Line Interface (Amazon CLI), or RDS API. 

## Console


To get an ARN from the Amazon Web Services Management Console, navigate to the resource you want an ARN for, and view the details for that resource.

For example, you can get the ARN for a DB instance from the **Configuration** tab of the DB instance details.

![\[DB instance ARN.\]](http://docs.amazonaws.cn/en_us/AmazonRDS/latest/UserGuide/images/DB-instance-arn.png)


## Amazon CLI


To get an ARN from the Amazon CLI for a particular RDS resource, you use the `describe` command for that resource. The following table shows each Amazon CLI command, and the ARN property used with the command to get an ARN. 


****  
<a name="cli-command-arn-property"></a>[\[See the AWS documentation website for more details\]](http://docs.amazonaws.cn/en_us/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.Getting.html)

For example, the following Amazon CLI command gets the ARN for a DB instance.

**Example**  
For Linux, macOS, or Unix:  

```
aws rds describe-db-instances \
--db-instance-identifier DBInstanceIdentifier \
--region us-west-2 \
--query "*[].{DBInstanceIdentifier:DBInstanceIdentifier,DBInstanceArn:DBInstanceArn}"
```
For Windows:  

```
aws rds describe-db-instances ^
--db-instance-identifier DBInstanceIdentifier ^
--region us-west-2 ^
--query "*[].{DBInstanceIdentifier:DBInstanceIdentifier,DBInstanceArn:DBInstanceArn}"
```
The output of that command is like the following:  

```
[
    {
        "DBInstanceArn": "arn:aws-cn:rds:us-west-2:account_id:db:instance_id", 
        "DBInstanceIdentifier": "instance_id"
    }
]
```

## RDS API


To get an ARN for a particular RDS resource, you can call the following RDS API operations and use the ARN properties shown following.


****  
<a name="rds-operation-arn-property"></a>[\[See the AWS documentation website for more details\]](http://docs.amazonaws.cn/en_us/AmazonRDS/latest/UserGuide/USER_Tagging.ARN.Getting.html)