

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# Amazon Relational Database Service
<a name="AWS_RDS"></a>

**Resource types**
+ [AWS::RDS::CustomDBEngineVersion](aws-resource-rds-customdbengineversion.md)
+ [AWS::RDS::DBCluster](aws-resource-rds-dbcluster.md)
+ [AWS::RDS::DBClusterParameterGroup](aws-resource-rds-dbclusterparametergroup.md)
+ [AWS::RDS::DBInstance](aws-resource-rds-dbinstance.md)
+ [AWS::RDS::DBParameterGroup](aws-resource-rds-dbparametergroup.md)
+ [AWS::RDS::DBProxy](aws-resource-rds-dbproxy.md)
+ [AWS::RDS::DBProxyEndpoint](aws-resource-rds-dbproxyendpoint.md)
+ [AWS::RDS::DBProxyTargetGroup](aws-resource-rds-dbproxytargetgroup.md)
+ [AWS::RDS::DBSecurityGroup](aws-resource-rds-dbsecuritygroup.md)
+ [AWS::RDS::DBSecurityGroupIngress](aws-resource-rds-dbsecuritygroupingress.md)
+ [AWS::RDS::DBShardGroup](aws-resource-rds-dbshardgroup.md)
+ [AWS::RDS::DBSubnetGroup](aws-resource-rds-dbsubnetgroup.md)
+ [AWS::RDS::EventSubscription](aws-resource-rds-eventsubscription.md)
+ [AWS::RDS::GlobalCluster](aws-resource-rds-globalcluster.md)
+ [AWS::RDS::Integration](aws-resource-rds-integration.md)
+ [AWS::RDS::OptionGroup](aws-resource-rds-optiongroup.md)

# AWS::RDS::CustomDBEngineVersion
<a name="aws-resource-rds-customdbengineversion"></a>

Creates a custom DB engine version (CEV).

## Syntax
<a name="aws-resource-rds-customdbengineversion-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-rds-customdbengineversion-syntax.json"></a>

```
{
  "Type" : "AWS::RDS::CustomDBEngineVersion",
  "Properties" : {
      "[DatabaseInstallationFilesS3BucketName](#cfn-rds-customdbengineversion-databaseinstallationfiless3bucketname)" : String,
      "[DatabaseInstallationFilesS3Prefix](#cfn-rds-customdbengineversion-databaseinstallationfiless3prefix)" : String,
      "[Description](#cfn-rds-customdbengineversion-description)" : String,
      "[Engine](#cfn-rds-customdbengineversion-engine)" : String,
      "[EngineVersion](#cfn-rds-customdbengineversion-engineversion)" : String,
      "[ImageId](#cfn-rds-customdbengineversion-imageid)" : String,
      "[KMSKeyId](#cfn-rds-customdbengineversion-kmskeyid)" : String,
      "[Manifest](#cfn-rds-customdbengineversion-manifest)" : String,
      "[SourceCustomDbEngineVersionIdentifier](#cfn-rds-customdbengineversion-sourcecustomdbengineversionidentifier)" : String,
      "[Status](#cfn-rds-customdbengineversion-status)" : String,
      "[Tags](#cfn-rds-customdbengineversion-tags)" : [ Tag, ... ],
      "[UseAwsProvidedLatestImage](#cfn-rds-customdbengineversion-useawsprovidedlatestimage)" : Boolean
    }
}
```

### YAML
<a name="aws-resource-rds-customdbengineversion-syntax.yaml"></a>

```
Type: AWS::RDS::CustomDBEngineVersion
Properties:
  [DatabaseInstallationFilesS3BucketName](#cfn-rds-customdbengineversion-databaseinstallationfiless3bucketname): String
  [DatabaseInstallationFilesS3Prefix](#cfn-rds-customdbengineversion-databaseinstallationfiless3prefix): String
  [Description](#cfn-rds-customdbengineversion-description): String
  [Engine](#cfn-rds-customdbengineversion-engine): String
  [EngineVersion](#cfn-rds-customdbengineversion-engineversion): String
  [ImageId](#cfn-rds-customdbengineversion-imageid): String
  [KMSKeyId](#cfn-rds-customdbengineversion-kmskeyid): String
  [Manifest](#cfn-rds-customdbengineversion-manifest): String
  [SourceCustomDbEngineVersionIdentifier](#cfn-rds-customdbengineversion-sourcecustomdbengineversionidentifier): String
  [Status](#cfn-rds-customdbengineversion-status): String
  [Tags](#cfn-rds-customdbengineversion-tags): 
    - Tag
  [UseAwsProvidedLatestImage](#cfn-rds-customdbengineversion-useawsprovidedlatestimage): Boolean
```

## Properties
<a name="aws-resource-rds-customdbengineversion-properties"></a>

`DatabaseInstallationFilesS3BucketName`  <a name="cfn-rds-customdbengineversion-databaseinstallationfiless3bucketname"></a>
The name of an Amazon S3 bucket that contains database installation files for your CEV. For example, a valid bucket name is `my-custom-installation-files`.  
*Required*: No  
*Type*: String  
*Minimum*: `3`  
*Maximum*: `63`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DatabaseInstallationFilesS3Prefix`  <a name="cfn-rds-customdbengineversion-databaseinstallationfiless3prefix"></a>
The Amazon S3 directory that contains the database installation files for your CEV. For example, a valid bucket name is `123456789012/cev1`. If this setting isn't specified, no prefix is assumed.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Description`  <a name="cfn-rds-customdbengineversion-description"></a>
An optional description of your CEV.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `1000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Engine`  <a name="cfn-rds-customdbengineversion-engine"></a>
The database engine to use for your custom engine version (CEV).  
Valid values:  
+  `custom-oracle-ee` 
+  `custom-oracle-ee-cdb` 
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `35`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`EngineVersion`  <a name="cfn-rds-customdbengineversion-engineversion"></a>
The name of your CEV. The name format is `major version.customized_string`. For example, a valid CEV name is `19.my_cev1`. This setting is required for RDS Custom for Oracle, but optional for Amazon RDS. The combination of `Engine` and `EngineVersion` is unique per customer per Region.  
*Constraints:* Minimum length is 1. Maximum length is 60.  
*Pattern:*`^[a-z0-9_.-]{1,60$`\$1  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `60`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ImageId`  <a name="cfn-rds-customdbengineversion-imageid"></a>
A value that indicates the ID of the AMI.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`KMSKeyId`  <a name="cfn-rds-customdbengineversion-kmskeyid"></a>
The AWS KMS key identifier for an encrypted CEV. A symmetric encryption KMS key is required for RDS Custom, but optional for Amazon RDS.  
If you have an existing symmetric encryption KMS key in your account, you can use it with RDS Custom. No further action is necessary. If you don't already have a symmetric encryption KMS key in your account, follow the instructions in [ Creating a symmetric encryption KMS key](https://docs.aws.amazon.com/kms/latest/developerguide/create-keys.html#create-symmetric-cmk) in the *AWS Key Management Service Developer Guide*.  
You can choose the same symmetric encryption key when you create a CEV and a DB instance, or choose different keys.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `2048`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Manifest`  <a name="cfn-rds-customdbengineversion-manifest"></a>
The CEV manifest, which is a JSON document that describes the installation .zip files stored in Amazon S3. Specify the name/value pairs in a file or a quoted string. RDS Custom applies the patches in the order in which they are listed.  
The following JSON fields are valid:    
MediaImportTemplateVersion  
Version of the CEV manifest. The date is in the format `YYYY-MM-DD`.  
databaseInstallationFileNames  
Ordered list of installation files for the CEV.  
opatchFileNames  
Ordered list of OPatch installers used for the Oracle DB engine.  
psuRuPatchFileNames  
The PSU and RU patches for this CEV.  
OtherPatchFileNames  
The patches that are not in the list of PSU and RU patches. Amazon RDS applies these patches after applying the PSU and RU patches.
For more information, see [ Creating the CEV manifest](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-cev.html#custom-cev.preparing.manifest) in the *Amazon RDS User Guide*.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `51000`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SourceCustomDbEngineVersionIdentifier`  <a name="cfn-rds-customdbengineversion-sourcecustomdbengineversionidentifier"></a>
The ARN of a CEV to use as a source for creating a new CEV. You can specify a different Amazon Machine Imagine (AMI) by using either `Source` or `UseAwsProvidedLatestImage`. You can't specify a different JSON manifest when you specify `SourceCustomDbEngineVersionIdentifier`.  
*Required*: No  
*Type*: String  
*Pattern*: `.*`  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Status`  <a name="cfn-rds-customdbengineversion-status"></a>
A value that indicates the status of a custom engine version (CEV).  
*Required*: No  
*Type*: String  
*Allowed values*: `available | inactive | inactive-except-restore`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-rds-customdbengineversion-tags"></a>
A list of tags. For more information, see [Tagging Amazon RDS Resources](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) in the *Amazon RDS User Guide.*  
*Required*: No  
*Type*: Array of [Tag](aws-properties-rds-customdbengineversion-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UseAwsProvidedLatestImage`  <a name="cfn-rds-customdbengineversion-useawsprovidedlatestimage"></a>
Specifies whether to use the latest service-provided Amazon Machine Image (AMI) for the CEV. If you specify `UseAwsProvidedLatestImage`, you can't also specify `ImageId`.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-rds-customdbengineversion-return-values"></a>

### Ref
<a name="aws-resource-rds-customdbengineversion-return-values-ref"></a>

When the logical ID of this resource is provided to the Ref intrinsic function, Ref returns the resource name, such as `mystack-abc1d2efg3h4.` For more information about using the Ref function, see [Ref](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-rds-customdbengineversion-return-values-fn--getatt"></a>

GetAtt returns a value for a specified attribute of this type. For more information, see [Fn::GetAtt](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html). The following attributes are available.

#### 
<a name="aws-resource-rds-customdbengineversion-return-values-fn--getatt-fn--getatt"></a>

`DBEngineVersionArn`  <a name="DBEngineVersionArn-fn::getatt"></a>
The ARN of the custom engine version.

## Examples
<a name="aws-resource-rds-customdbengineversion--examples"></a>

The following example specifies a custom DB engine version.

### Authentication details
<a name="aws-resource-rds-customdbengineversion--examples--Authentication_details"></a>

#### JSON
<a name="aws-resource-rds-customdbengineversion--examples--Authentication_details--json"></a>

```
"RDSCustomDBEngineVersion":{
   "Type":"AWS::RDS::CustomDBEngineVersion",
   "Properties":{
      "DatabaseInstallationFilesS3BucketName": "1-custom-installation-files",
      "DatabaseInstallationFilesS3Prefix": "123456789012/cev1",
      "Description": "CEV description",
      "Engine": "custom-oracle-ee",
      "EngineVersion": "19.cev1",
      "KMSKeyId": "12ab3c4d-5678-90e1-2fg3-45h6ijklmnops",
      "Manifest": "%7B%22mediaImportTemplateVersion%22%3A%222020-08--14%22%2C%22databaseInstallationFileNames%22%3A%5B%22V982063-01.zip%22%5D%2C%22opatchFileNames%22%3A%5B%22p6880880_190000_Linux-x86-64.zip%22%5D%2C%22psuRuPatchFileNames%22%3A%5B%22p31720396_190000_Linux-x86-64.zip%22%2C%22p29213893_199000DBRU_Generic.zip%22%2C%22p28730253_190000_Linux-x86-64.zip%22%2C%22p29374604_199000DBRU_Linux-x86-64.zip%22%2C%22p28852325_190000_Linux-x86-64.zip%22%2C%22p29997937_190000_Linux-x86-64.zip%22%2C%22p31335037_190000_Linux-x86-64.zip%22%2C%22p31335142_190000_Generic.zip%22%5D%7D"
  }
}
```

#### YAML
<a name="aws-resource-rds-customdbengineversion--examples--Authentication_details--yaml"></a>

```
CustomDBEngineVersion:
  Type: AWS::RDS::CustomDBEngineVersion
  Properties:
      DatabaseInstallationFilesS3BucketName: 1-custom-installation-files
      DatabaseInstallationFilesS3Prefix: "123456789012/cev1
      Description: CEV description
      Engine: custom-oracle-ee
      EngineVersion: 19.cev1
      KMSKeyId: 12ab3c4d-5678-90e1-2fg3-45h6ijklmnops
      Manifest: "%7B%22mediaImportTemplateVersion%22%3A%222020-08--14%22%2C%22databaseInstallationFileNames%22%3A%5B%22V982063-01.zip%22%5D%2C%22opatchFileNames%22%3A%5B%22p6880880_190000_Linux-x86-64.zip%22%5D%2C%22psuRuPatchFileNames%22%3A%5B%22p31720396_190000_Linux-x86-64.zip%22%2C%22p29213893_199000DBRU_Generic.zip%22%2C%22p28730253_190000_Linux-x86-64.zip%22%2C%22p29374604_199000DBRU_Linux-x86-64.zip%22%2C%22p28852325_190000_Linux-x86-64.zip%22%2C%22p29997937_190000_Linux-x86-64.zip%22%2C%22p31335037_190000_Linux-x86-64.zip%22%2C%22p31335142_190000_Generic.zip%22%5D%7D
```

# AWS::RDS::CustomDBEngineVersion Tag
<a name="aws-properties-rds-customdbengineversion-tag"></a>

Metadata assigned to an Amazon RDS resource consisting of a key-value pair.

For more information, see [Tagging Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) in the *Amazon RDS User Guide* or [Tagging Amazon Aurora and Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html) in the *Amazon Aurora User Guide*. 

## Syntax
<a name="aws-properties-rds-customdbengineversion-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-customdbengineversion-tag-syntax.json"></a>

```
{
  "[Key](#cfn-rds-customdbengineversion-tag-key)" : String,
  "[Value](#cfn-rds-customdbengineversion-tag-value)" : String
}
```

### YAML
<a name="aws-properties-rds-customdbengineversion-tag-syntax.yaml"></a>

```
  [Key](#cfn-rds-customdbengineversion-tag-key): String
  [Value](#cfn-rds-customdbengineversion-tag-value): String
```

## Properties
<a name="aws-properties-rds-customdbengineversion-tag-properties"></a>

`Key`  <a name="cfn-rds-customdbengineversion-tag-key"></a>
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-rds-customdbengineversion-tag-value"></a>
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-rds-customdbengineversion-tag--examples"></a>

The following example specifies a tag for a custom DB engine version.

### 
<a name="aws-properties-rds-customdbengineversion-tag--examples--"></a>

#### JSON
<a name="aws-properties-rds-customdbengineversion-tag--examples----json"></a>

```
"Tags" : [
   {
      "Key" : "keyname1",
      "Value" : "value1"
   },
   {
      "Key" : "keyname2",
      "Value" : "value2"
   }
]
```

#### YAML
<a name="aws-properties-rds-customdbengineversion-tag--examples----yaml"></a>

```
Tags: 
  - Key: keyname1
    Value: value1
  - Key: keyname2
    Value: value2
```

# AWS::RDS::DBCluster
<a name="aws-resource-rds-dbcluster"></a>

The `AWS::RDS::DBCluster` resource creates an Amazon Aurora DB cluster or Multi-AZ DB cluster.

For more information about creating an Aurora DB cluster, see [ Creating an Amazon Aurora DB cluster](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.CreateInstance.html) in the *Amazon Aurora User Guide*.

For more information about creating a Multi-AZ DB cluster, see [Creating a Multi-AZ DB cluster](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/create-multi-az-db-cluster.html) in the *Amazon RDS User Guide*.

**Note**  
You can only create this resource in AWS Regions where Amazon Aurora or Multi-AZ DB clusters are supported.

 **Updating DB clusters** 

When properties labeled "*Update requires:*[ Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)" are updated, AWS CloudFormation first creates a replacement DB cluster, then changes references from other dependent resources to point to the replacement DB cluster, and finally deletes the old DB cluster.

**Important**  
We highly recommend that you take a snapshot of the database before updating the stack. If you don't, you lose the data when AWS CloudFormation replaces your DB cluster. To preserve your data, perform the following procedure:  
Deactivate any applications that are using the DB cluster so that there's no activity on the DB instance.
Create a snapshot of the DB cluster. For more information, see [Creating a DB cluster snapshot](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_CreateSnapshotCluster.html).
If you want to restore your DB cluster using a DB cluster snapshot, modify the updated template with your DB cluster changes and add the `SnapshotIdentifier` property with the ID of the DB cluster snapshot that you want to use.  
After you restore a DB cluster with a `SnapshotIdentifier` property, you must specify the same `SnapshotIdentifier` property for any future updates to the DB cluster. When you specify this property for an update, the DB cluster is not restored from the DB cluster snapshot again, and the data in the database is not changed. However, if you don't specify the `SnapshotIdentifier` property, an empty DB cluster is created, and the original DB cluster is deleted. If you specify a property that is different from the previous snapshot restore property, a new DB cluster is restored from the specified `SnapshotIdentifier` property, and the original DB cluster is deleted.
Update the stack.

Currently, when you are updating the stack for an Aurora Serverless DB cluster, you can't include changes to any other properties when you specify one of the following properties: `PreferredBackupWindow`, `PreferredMaintenanceWindow`, and `Port`. This limitation doesn't apply to provisioned DB clusters.

For more information about updating other properties of this resource, see ` [ModifyDBCluster](https://docs.aws.amazon.com//AmazonRDS/latest/APIReference/API_ModifyDBCluster.html) `. For more information about updating stacks, see [AWS CloudFormation Stacks Updates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks.html).

 **Deleting DB clusters** 

The default `DeletionPolicy` for `AWS::RDS::DBCluster` resources is `Snapshot`. For more information about how AWS CloudFormation deletes resources, see [ DeletionPolicy Attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html).

## Syntax
<a name="aws-resource-rds-dbcluster-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-rds-dbcluster-syntax.json"></a>

```
{
  "Type" : "AWS::RDS::DBCluster",
  "Properties" : {
      "[AllocatedStorage](#cfn-rds-dbcluster-allocatedstorage)" : Integer,
      "[AssociatedRoles](#cfn-rds-dbcluster-associatedroles)" : [ DBClusterRole, ... ],
      "[AutoMinorVersionUpgrade](#cfn-rds-dbcluster-autominorversionupgrade)" : Boolean,
      "[AvailabilityZones](#cfn-rds-dbcluster-availabilityzones)" : [ String, ... ],
      "[BacktrackWindow](#cfn-rds-dbcluster-backtrackwindow)" : Integer,
      "[BackupRetentionPeriod](#cfn-rds-dbcluster-backupretentionperiod)" : Integer,
      "[ClusterScalabilityType](#cfn-rds-dbcluster-clusterscalabilitytype)" : String,
      "[CopyTagsToSnapshot](#cfn-rds-dbcluster-copytagstosnapshot)" : Boolean,
      "[DatabaseInsightsMode](#cfn-rds-dbcluster-databaseinsightsmode)" : String,
      "[DatabaseName](#cfn-rds-dbcluster-databasename)" : String,
      "[DBClusterIdentifier](#cfn-rds-dbcluster-dbclusteridentifier)" : String,
      "[DBClusterInstanceClass](#cfn-rds-dbcluster-dbclusterinstanceclass)" : String,
      "[DBClusterParameterGroupName](#cfn-rds-dbcluster-dbclusterparametergroupname)" : String,
      "[DBInstanceParameterGroupName](#cfn-rds-dbcluster-dbinstanceparametergroupname)" : String,
      "[DBSubnetGroupName](#cfn-rds-dbcluster-dbsubnetgroupname)" : String,
      "[DBSystemId](#cfn-rds-dbcluster-dbsystemid)" : String,
      "[DeleteAutomatedBackups](#cfn-rds-dbcluster-deleteautomatedbackups)" : Boolean,
      "[DeletionProtection](#cfn-rds-dbcluster-deletionprotection)" : Boolean,
      "[Domain](#cfn-rds-dbcluster-domain)" : String,
      "[DomainIAMRoleName](#cfn-rds-dbcluster-domainiamrolename)" : String,
      "[EnableCloudwatchLogsExports](#cfn-rds-dbcluster-enablecloudwatchlogsexports)" : [ String, ... ],
      "[EnableGlobalWriteForwarding](#cfn-rds-dbcluster-enableglobalwriteforwarding)" : Boolean,
      "[EnableHttpEndpoint](#cfn-rds-dbcluster-enablehttpendpoint)" : Boolean,
      "[EnableIAMDatabaseAuthentication](#cfn-rds-dbcluster-enableiamdatabaseauthentication)" : Boolean,
      "[EnableLocalWriteForwarding](#cfn-rds-dbcluster-enablelocalwriteforwarding)" : Boolean,
      "[Engine](#cfn-rds-dbcluster-engine)" : String,
      "[EngineLifecycleSupport](#cfn-rds-dbcluster-enginelifecyclesupport)" : String,
      "[EngineMode](#cfn-rds-dbcluster-enginemode)" : String,
      "[EngineVersion](#cfn-rds-dbcluster-engineversion)" : String,
      "[GlobalClusterIdentifier](#cfn-rds-dbcluster-globalclusteridentifier)" : String,
      "[Iops](#cfn-rds-dbcluster-iops)" : Integer,
      "[KmsKeyId](#cfn-rds-dbcluster-kmskeyid)" : String,
      "[ManageMasterUserPassword](#cfn-rds-dbcluster-managemasteruserpassword)" : Boolean,
      "[MasterUserAuthenticationType](#cfn-rds-dbcluster-masteruserauthenticationtype)" : String,
      "[MasterUsername](#cfn-rds-dbcluster-masterusername)" : String,
      "[MasterUserPassword](#cfn-rds-dbcluster-masteruserpassword)" : String,
      "[MasterUserSecret](#cfn-rds-dbcluster-masterusersecret)" : MasterUserSecret,
      "[MonitoringInterval](#cfn-rds-dbcluster-monitoringinterval)" : Integer,
      "[MonitoringRoleArn](#cfn-rds-dbcluster-monitoringrolearn)" : String,
      "[NetworkType](#cfn-rds-dbcluster-networktype)" : String,
      "[PerformanceInsightsEnabled](#cfn-rds-dbcluster-performanceinsightsenabled)" : Boolean,
      "[PerformanceInsightsKmsKeyId](#cfn-rds-dbcluster-performanceinsightskmskeyid)" : String,
      "[PerformanceInsightsRetentionPeriod](#cfn-rds-dbcluster-performanceinsightsretentionperiod)" : Integer,
      "[Port](#cfn-rds-dbcluster-port)" : Integer,
      "[PreferredBackupWindow](#cfn-rds-dbcluster-preferredbackupwindow)" : String,
      "[PreferredMaintenanceWindow](#cfn-rds-dbcluster-preferredmaintenancewindow)" : String,
      "[PubliclyAccessible](#cfn-rds-dbcluster-publiclyaccessible)" : Boolean,
      "[ReplicationSourceIdentifier](#cfn-rds-dbcluster-replicationsourceidentifier)" : String,
      "[RestoreToTime](#cfn-rds-dbcluster-restoretotime)" : String,
      "[RestoreType](#cfn-rds-dbcluster-restoretype)" : String,
      "[ScalingConfiguration](#cfn-rds-dbcluster-scalingconfiguration)" : ScalingConfiguration,
      "[ServerlessV2ScalingConfiguration](#cfn-rds-dbcluster-serverlessv2scalingconfiguration)" : ServerlessV2ScalingConfiguration,
      "[SnapshotIdentifier](#cfn-rds-dbcluster-snapshotidentifier)" : String,
      "[SourceDBClusterIdentifier](#cfn-rds-dbcluster-sourcedbclusteridentifier)" : String,
      "[SourceDbClusterResourceId](#cfn-rds-dbcluster-sourcedbclusterresourceid)" : String,
      "[SourceRegion](#cfn-rds-dbcluster-sourceregion)" : String,
      "[StorageEncrypted](#cfn-rds-dbcluster-storageencrypted)" : Boolean,
      "[StorageType](#cfn-rds-dbcluster-storagetype)" : String,
      "[Tags](#cfn-rds-dbcluster-tags)" : [ Tag, ... ],
      "[UseLatestRestorableTime](#cfn-rds-dbcluster-uselatestrestorabletime)" : Boolean,
      "[VpcSecurityGroupIds](#cfn-rds-dbcluster-vpcsecuritygroupids)" : [ String, ... ]
    }
}
```

### YAML
<a name="aws-resource-rds-dbcluster-syntax.yaml"></a>

```
Type: AWS::RDS::DBCluster
Properties:
  [AllocatedStorage](#cfn-rds-dbcluster-allocatedstorage): Integer
  [AssociatedRoles](#cfn-rds-dbcluster-associatedroles): 
    - DBClusterRole
  [AutoMinorVersionUpgrade](#cfn-rds-dbcluster-autominorversionupgrade): Boolean
  [AvailabilityZones](#cfn-rds-dbcluster-availabilityzones): 
    - String
  [BacktrackWindow](#cfn-rds-dbcluster-backtrackwindow): Integer
  [BackupRetentionPeriod](#cfn-rds-dbcluster-backupretentionperiod): Integer
  [ClusterScalabilityType](#cfn-rds-dbcluster-clusterscalabilitytype): String
  [CopyTagsToSnapshot](#cfn-rds-dbcluster-copytagstosnapshot): Boolean
  [DatabaseInsightsMode](#cfn-rds-dbcluster-databaseinsightsmode): String
  [DatabaseName](#cfn-rds-dbcluster-databasename): String
  [DBClusterIdentifier](#cfn-rds-dbcluster-dbclusteridentifier): String
  [DBClusterInstanceClass](#cfn-rds-dbcluster-dbclusterinstanceclass): String
  [DBClusterParameterGroupName](#cfn-rds-dbcluster-dbclusterparametergroupname): String
  [DBInstanceParameterGroupName](#cfn-rds-dbcluster-dbinstanceparametergroupname): String
  [DBSubnetGroupName](#cfn-rds-dbcluster-dbsubnetgroupname): String
  [DBSystemId](#cfn-rds-dbcluster-dbsystemid): String
  [DeleteAutomatedBackups](#cfn-rds-dbcluster-deleteautomatedbackups): Boolean
  [DeletionProtection](#cfn-rds-dbcluster-deletionprotection): Boolean
  [Domain](#cfn-rds-dbcluster-domain): String
  [DomainIAMRoleName](#cfn-rds-dbcluster-domainiamrolename): String
  [EnableCloudwatchLogsExports](#cfn-rds-dbcluster-enablecloudwatchlogsexports): 
    - String
  [EnableGlobalWriteForwarding](#cfn-rds-dbcluster-enableglobalwriteforwarding): Boolean
  [EnableHttpEndpoint](#cfn-rds-dbcluster-enablehttpendpoint): Boolean
  [EnableIAMDatabaseAuthentication](#cfn-rds-dbcluster-enableiamdatabaseauthentication): Boolean
  [EnableLocalWriteForwarding](#cfn-rds-dbcluster-enablelocalwriteforwarding): Boolean
  [Engine](#cfn-rds-dbcluster-engine): String
  [EngineLifecycleSupport](#cfn-rds-dbcluster-enginelifecyclesupport): String
  [EngineMode](#cfn-rds-dbcluster-enginemode): String
  [EngineVersion](#cfn-rds-dbcluster-engineversion): String
  [GlobalClusterIdentifier](#cfn-rds-dbcluster-globalclusteridentifier): String
  [Iops](#cfn-rds-dbcluster-iops): Integer
  [KmsKeyId](#cfn-rds-dbcluster-kmskeyid): String
  [ManageMasterUserPassword](#cfn-rds-dbcluster-managemasteruserpassword): Boolean
  [MasterUserAuthenticationType](#cfn-rds-dbcluster-masteruserauthenticationtype): String
  [MasterUsername](#cfn-rds-dbcluster-masterusername): String
  [MasterUserPassword](#cfn-rds-dbcluster-masteruserpassword): String
  [MasterUserSecret](#cfn-rds-dbcluster-masterusersecret): 
    MasterUserSecret
  [MonitoringInterval](#cfn-rds-dbcluster-monitoringinterval): Integer
  [MonitoringRoleArn](#cfn-rds-dbcluster-monitoringrolearn): String
  [NetworkType](#cfn-rds-dbcluster-networktype): String
  [PerformanceInsightsEnabled](#cfn-rds-dbcluster-performanceinsightsenabled): Boolean
  [PerformanceInsightsKmsKeyId](#cfn-rds-dbcluster-performanceinsightskmskeyid): String
  [PerformanceInsightsRetentionPeriod](#cfn-rds-dbcluster-performanceinsightsretentionperiod): Integer
  [Port](#cfn-rds-dbcluster-port): Integer
  [PreferredBackupWindow](#cfn-rds-dbcluster-preferredbackupwindow): String
  [PreferredMaintenanceWindow](#cfn-rds-dbcluster-preferredmaintenancewindow): String
  [PubliclyAccessible](#cfn-rds-dbcluster-publiclyaccessible): Boolean
  [ReplicationSourceIdentifier](#cfn-rds-dbcluster-replicationsourceidentifier): String
  [RestoreToTime](#cfn-rds-dbcluster-restoretotime): String
  [RestoreType](#cfn-rds-dbcluster-restoretype): String
  [ScalingConfiguration](#cfn-rds-dbcluster-scalingconfiguration): 
    ScalingConfiguration
  [ServerlessV2ScalingConfiguration](#cfn-rds-dbcluster-serverlessv2scalingconfiguration): 
    ServerlessV2ScalingConfiguration
  [SnapshotIdentifier](#cfn-rds-dbcluster-snapshotidentifier): String
  [SourceDBClusterIdentifier](#cfn-rds-dbcluster-sourcedbclusteridentifier): String
  [SourceDbClusterResourceId](#cfn-rds-dbcluster-sourcedbclusterresourceid): String
  [SourceRegion](#cfn-rds-dbcluster-sourceregion): String
  [StorageEncrypted](#cfn-rds-dbcluster-storageencrypted): Boolean
  [StorageType](#cfn-rds-dbcluster-storagetype): String
  [Tags](#cfn-rds-dbcluster-tags): 
    - Tag
  [UseLatestRestorableTime](#cfn-rds-dbcluster-uselatestrestorabletime): Boolean
  [VpcSecurityGroupIds](#cfn-rds-dbcluster-vpcsecuritygroupids): 
    - String
```

## Properties
<a name="aws-resource-rds-dbcluster-properties"></a>

`AllocatedStorage`  <a name="cfn-rds-dbcluster-allocatedstorage"></a>
The amount of storage in gibibytes (GiB) to allocate to each DB instance in the Multi-AZ DB cluster.  
Valid for Cluster Type: Multi-AZ DB clusters only  
This setting is required to create a Multi-AZ DB cluster.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AssociatedRoles`  <a name="cfn-rds-dbcluster-associatedroles"></a>
Provides a list of the AWS Identity and Access Management (IAM) roles that are associated with the DB cluster. IAM roles that are associated with a DB cluster grant permission for the DB cluster to access other Amazon Web Services on your behalf.  
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: Array of [DBClusterRole](aws-properties-rds-dbcluster-dbclusterrole.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AutoMinorVersionUpgrade`  <a name="cfn-rds-dbcluster-autominorversionupgrade"></a>
Specifies whether minor engine upgrades are applied automatically to the DB cluster during the maintenance window. By default, minor engine upgrades are applied automatically.  
Valid for Cluster Type: Aurora DB clusters and Multi-AZ DB cluster.  
For more information about automatic minor version upgrades, see [Automatically upgrading the minor engine version](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Upgrading.html#USER_UpgradeDBInstance.Upgrading.AutoMinorVersionUpgrades).  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AvailabilityZones`  <a name="cfn-rds-dbcluster-availabilityzones"></a>
A list of Availability Zones (AZs) where instances in the DB cluster can be created. For information on AWS Regions and Availability Zones, see [Choosing the Regions and Availability Zones](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.RegionsAndAvailabilityZones.html) in the *Amazon Aurora User Guide*.   
Valid for: Aurora DB clusters only  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`BacktrackWindow`  <a name="cfn-rds-dbcluster-backtrackwindow"></a>
The target backtrack window, in seconds. To disable backtracking, set this value to `0`.  
Valid for Cluster Type: Aurora MySQL DB clusters only  
Default: `0`  
Constraints:  
+ If specified, this value must be set to a number from 0 to 259,200 (72 hours).
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`BackupRetentionPeriod`  <a name="cfn-rds-dbcluster-backupretentionperiod"></a>
The number of days for which automated backups are retained.  
Default: 1  
Constraints:  
+ Must be a value from 1 to 35
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`ClusterScalabilityType`  <a name="cfn-rds-dbcluster-clusterscalabilitytype"></a>
Specifies the scalability mode of the Aurora DB cluster. When set to `limitless`, the cluster operates as an Aurora Limitless Database, allowing you to create a DB shard group for horizontal scaling (sharding) capabilities. When set to `standard` (the default), the cluster uses normal DB instance creation.  
**Important:** Automated backup retention isn't supported with Aurora Limitless Database clusters. If you set this property to `limitless`, you cannot set `DeleteAutomatedBackups` to `false`. To create a backup, use manual snapshots instead.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`CopyTagsToSnapshot`  <a name="cfn-rds-dbcluster-copytagstosnapshot"></a>
A value that indicates whether to copy all tags from the DB cluster to snapshots of the DB cluster. The default is not to copy them.  
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DatabaseInsightsMode`  <a name="cfn-rds-dbcluster-databaseinsightsmode"></a>
The mode of Database Insights to enable for the DB cluster.  
If you set this value to `advanced`, you must also set the `PerformanceInsightsEnabled` parameter to `true` and the `PerformanceInsightsRetentionPeriod` parameter to 465.  
Valid for Cluster Type: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: String  
*Allowed values*: `standard | advanced`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DatabaseName`  <a name="cfn-rds-dbcluster-databasename"></a>
The name of your database. If you don't provide a name, then Amazon RDS won't create a database in this DB cluster. For naming constraints, see [Naming Constraints](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_Limits.html#RDS_Limits.Constraints) in the *Amazon Aurora User Guide*.   
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DBClusterIdentifier`  <a name="cfn-rds-dbcluster-dbclusteridentifier"></a>
The DB cluster identifier. This parameter is stored as a lowercase string.  
Constraints:  
+ Must contain from 1 to 63 letters, numbers, or hyphens.
+ First character must be a letter.
+ Can't end with a hyphen or contain two consecutive hyphens.
Example: `my-cluster1`  
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: String  
*Pattern*: `^[a-zA-Z]{1}(?:-?[a-zA-Z0-9]){0,62}$`  
*Minimum*: `1`  
*Maximum*: `63`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DBClusterInstanceClass`  <a name="cfn-rds-dbcluster-dbclusterinstanceclass"></a>
The compute and memory capacity of each DB instance in the Multi-AZ DB cluster, for example `db.m6gd.xlarge`. Not all DB instance classes are available in all AWS Regions, or for all database engines.  
For the full list of DB instance classes and availability for your engine, see [DB instance class](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) in the *Amazon RDS User Guide*.  
This setting is required to create a Multi-AZ DB cluster.  
Valid for Cluster Type: Multi-AZ DB clusters only  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DBClusterParameterGroupName`  <a name="cfn-rds-dbcluster-dbclusterparametergroupname"></a>
The name of the DB cluster parameter group to associate with this DB cluster.  
If you apply a parameter group to an existing DB cluster, then its DB instances might need to reboot. This can result in an outage while the DB instances are rebooting.  
If you apply a change to parameter group associated with a stopped DB cluster, then the update stack waits until the DB cluster is started.
To list all of the available DB cluster parameter group names, use the following command:  
 `aws rds describe-db-cluster-parameter-groups --query "DBClusterParameterGroups[].DBClusterParameterGroupName" --output text`   
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DBInstanceParameterGroupName`  <a name="cfn-rds-dbcluster-dbinstanceparametergroupname"></a>
The name of the DB parameter group to apply to all instances of the DB cluster.  
When you apply a parameter group using the `DBInstanceParameterGroupName` parameter, the DB cluster isn't rebooted automatically. Also, parameter changes are applied immediately rather than during the next maintenance window.
Valid for Cluster Type: Aurora DB clusters only  
Default: The existing name setting  
Constraints:  
+ The DB parameter group must be in the same DB parameter group family as this DB cluster.
+ The `DBInstanceParameterGroupName` parameter is valid in combination with the `AllowMajorVersionUpgrade` parameter for a major version upgrade only.
*Required*: No  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`DBSubnetGroupName`  <a name="cfn-rds-dbcluster-dbsubnetgroupname"></a>
A DB subnet group that you want to associate with this DB cluster.   
If you are restoring a DB cluster to a point in time with `RestoreType` set to `copy-on-write`, and don't specify a DB subnet group name, then the DB cluster is restored with a default DB subnet group.  
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DBSystemId`  <a name="cfn-rds-dbcluster-dbsystemid"></a>
Reserved for future use.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DeleteAutomatedBackups`  <a name="cfn-rds-dbcluster-deleteautomatedbackups"></a>
Specifies whether to remove automated backups immediately after the DB cluster is deleted. This parameter isn't case-sensitive. The default is to remove automated backups immediately after the DB cluster is deleted, unless the AWS Backup policy specifies a point-in-time restore rule.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DeletionProtection`  <a name="cfn-rds-dbcluster-deletionprotection"></a>
A value that indicates whether the DB cluster has deletion protection enabled. The database can't be deleted when deletion protection is enabled. By default, deletion protection is disabled.  
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Domain`  <a name="cfn-rds-dbcluster-domain"></a>
Indicates the directory ID of the Active Directory to create the DB cluster.  
For Amazon Aurora DB clusters, Amazon RDS can use Kerberos authentication to authenticate users that connect to the DB cluster.  
For more information, see [Kerberos authentication](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/kerberos-authentication.html) in the *Amazon Aurora User Guide*.  
Valid for: Aurora DB clusters only  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DomainIAMRoleName`  <a name="cfn-rds-dbcluster-domainiamrolename"></a>
Specifies the name of the IAM role to use when making API calls to the Directory Service.  
Valid for: Aurora DB clusters only  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EnableCloudwatchLogsExports`  <a name="cfn-rds-dbcluster-enablecloudwatchlogsexports"></a>
The list of log types that need to be enabled for exporting to CloudWatch Logs. The values in the list depend on the DB engine being used. For more information, see [ Publishing Database Logs to Amazon CloudWatch Logs](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) in the *Amazon Aurora User Guide*.  
 **Aurora MySQL**   
Valid values: `audit`, `error`, `general`, `slowquery`  
 **Aurora PostgreSQL**   
Valid values: `postgresql`  
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EnableGlobalWriteForwarding`  <a name="cfn-rds-dbcluster-enableglobalwriteforwarding"></a>
Specifies whether to enable this DB cluster to forward write operations to the primary cluster of a global cluster (Aurora global database). By default, write operations are not allowed on Aurora DB clusters that are secondary clusters in an Aurora global database.  
You can set this value only on Aurora DB clusters that are members of an Aurora global database. With this parameter enabled, a secondary cluster can forward writes to the current primary cluster, and the resulting changes are replicated back to this cluster. For the primary DB cluster of an Aurora global database, this value is used immediately if the primary is demoted by a global cluster API operation, but it does nothing until then.  
Valid for Cluster Type: Aurora DB clusters only  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EnableHttpEndpoint`  <a name="cfn-rds-dbcluster-enablehttpendpoint"></a>
Specifies whether to enable the HTTP endpoint for the DB cluster. By default, the HTTP endpoint isn't enabled.  
When enabled, the HTTP endpoint provides a connectionless web service API (RDS Data API) for running SQL queries on the DB cluster. You can also query your database from inside the RDS console with the RDS query editor.  
For more information, see [Using RDS Data API](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html) in the *Amazon Aurora User Guide*.  
Valid for Cluster Type: Aurora DB clusters only  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EnableIAMDatabaseAuthentication`  <a name="cfn-rds-dbcluster-enableiamdatabaseauthentication"></a>
A value that indicates whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts. By default, mapping is disabled.  
For more information, see [ IAM Database Authentication](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.html) in the *Amazon Aurora User Guide.*  
Valid for: Aurora DB clusters only  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EnableLocalWriteForwarding`  <a name="cfn-rds-dbcluster-enablelocalwriteforwarding"></a>
Specifies whether read replicas can forward write operations to the writer DB instance in the DB cluster. By default, write operations aren't allowed on reader DB instances.  
Valid for: Aurora DB clusters only  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Engine`  <a name="cfn-rds-dbcluster-engine"></a>
The name of the database engine to be used for this DB cluster.  
Valid Values:  
+  `aurora-mysql` 
+  `aurora-postgresql` 
+  `mysql` 
+  `postgres` 
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`EngineLifecycleSupport`  <a name="cfn-rds-dbcluster-enginelifecyclesupport"></a>
The life cycle type for this DB cluster.  
By default, this value is set to `open-source-rds-extended-support`, which enrolls your DB cluster into Amazon RDS Extended Support. At the end of standard support, you can avoid charges for Extended Support by setting the value to `open-source-rds-extended-support-disabled`. In this case, creating the DB cluster will fail if the DB major version is past its end of standard support date.
You can use this setting to enroll your DB cluster into Amazon RDS Extended Support. With RDS Extended Support, you can run the selected major engine version on your DB cluster past the end of standard support for that engine version. For more information, see the following sections:  
+ Amazon Aurora - [Amazon RDS Extended Support with Amazon Aurora](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/extended-support.html) in the *Amazon Aurora User Guide*
+ Amazon RDS - [Amazon RDS Extended Support with Amazon RDS](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/extended-support.html) in the *Amazon RDS User Guide*
Valid for Cluster Type: Aurora DB clusters and Multi-AZ DB clusters  
Valid Values: `open-source-rds-extended-support | open-source-rds-extended-support-disabled`  
Default: `open-source-rds-extended-support`  
*Required*: No  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`EngineMode`  <a name="cfn-rds-dbcluster-enginemode"></a>
The DB engine mode of the DB cluster, either `provisioned` or `serverless`.  
The `serverless` engine mode only applies for Aurora Serverless v1 DB clusters. Aurora Serverless v2 DB clusters use the `provisioned` engine mode.  
For information about limitations and requirements for Serverless DB clusters, see the following sections in the *Amazon Aurora User Guide*:  
+  [Limitations of Aurora Serverless v1](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html#aurora-serverless.limitations) 
+  [Requirements for Aurora Serverless v2](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.requirements.html) 
Valid for Cluster Type: Aurora DB clusters only  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`EngineVersion`  <a name="cfn-rds-dbcluster-engineversion"></a>
The version number of the database engine to use.  
Don't use this property if your DB cluster is a member of a global database cluster. Instead, specify the `EngineVersion` property on the [AWS::RDS::GlobalCluster](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html) resource. Major version upgrades aren't supported for individual members of a global cluster. Use `ModifyGlobalCluster` to upgrade all members of the global cluster.
To list all of the available engine versions for Aurora MySQL version 2 (5.7-compatible) and version 3 (8.0-compatible), use the following command:  
 `aws rds describe-db-engine-versions --engine aurora-mysql --query "DBEngineVersions[].EngineVersion"`   
You can supply either `5.7` or `8.0` to use the default engine version for Aurora MySQL version 2 or version 3, respectively.  
To list all of the available engine versions for Aurora PostgreSQL, use the following command:  
 `aws rds describe-db-engine-versions --engine aurora-postgresql --query "DBEngineVersions[].EngineVersion"`   
To list all of the available engine versions for RDS for MySQL, use the following command:  
 `aws rds describe-db-engine-versions --engine mysql --query "DBEngineVersions[].EngineVersion"`   
To list all of the available engine versions for RDS for PostgreSQL, use the following command:  
 `aws rds describe-db-engine-versions --engine postgres --query "DBEngineVersions[].EngineVersion"`   
 **Aurora MySQL**   
For information, see [Database engine updates for Amazon Aurora MySQL](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Updates.html) in the *Amazon Aurora User Guide*.  
 **Aurora PostgreSQL**   
For information, see [Amazon Aurora PostgreSQL releases and engine versions](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Updates.20180305.html) in the *Amazon Aurora User Guide*.  
 **MySQL**   
For information, see [Amazon RDS for MySQL](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MySQL.html#MySQL.Concepts.VersionMgmt) in the *Amazon RDS User Guide*.  
 **PostgreSQL**   
For information, see [Amazon RDS for PostgreSQL](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts) in the *Amazon RDS User Guide*.  
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`GlobalClusterIdentifier`  <a name="cfn-rds-dbcluster-globalclusteridentifier"></a>
 If you are configuring an Aurora global database cluster and want your Aurora DB cluster to be a secondary member in the global database cluster, specify the global cluster ID of the global database cluster. To define the primary database cluster of the global cluster, use the [AWS::RDS::GlobalCluster](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-globalcluster.html) resource.   
 If you aren't configuring a global database cluster, don't specify this property.   
To remove the DB cluster from a global database cluster, specify an empty value for the `GlobalClusterIdentifier` property.
For information about Aurora global databases, see [ Working with Amazon Aurora Global Databases](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database.html) in the *Amazon Aurora User Guide*.  
Valid for: Aurora DB clusters only  
*Required*: No  
*Type*: String  
*Pattern*: `^$|^[a-zA-Z]{1}(?:-?[a-zA-Z0-9]){0,62}$`  
*Minimum*: `0`  
*Maximum*: `63`  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`Iops`  <a name="cfn-rds-dbcluster-iops"></a>
The amount of Provisioned IOPS (input/output operations per second) to be initially allocated for each DB instance in the Multi-AZ DB cluster.  
For information about valid IOPS values, see [Provisioned IOPS storage](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Storage.html#USER_PIOPS) in the *Amazon RDS User Guide*.  
This setting is required to create a Multi-AZ DB cluster.  
Valid for Cluster Type: Multi-AZ DB clusters only  
Constraints:  
+ Must be a multiple between .5 and 50 of the storage amount for the DB cluster.
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`KmsKeyId`  <a name="cfn-rds-dbcluster-kmskeyid"></a>
The Amazon Resource Name (ARN) of the AWS KMS key that is used to encrypt the database instances in the DB cluster, such as `arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef`. If you enable the `StorageEncrypted` property but don't specify this property, the default KMS key is used. If you specify this property, you must set the `StorageEncrypted` property to `true`.  
If you specify the `SnapshotIdentifier` property, the `StorageEncrypted` property value is inherited from the snapshot, and if the DB cluster is encrypted, the specified `KmsKeyId` property is used.  
If you create a read replica of an encrypted DB cluster in another AWS Region, make sure to set `KmsKeyId` to a KMS key identifier that is valid in the destination AWS Region. This KMS key is used to encrypt the read replica in that AWS Region.  
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ManageMasterUserPassword`  <a name="cfn-rds-dbcluster-managemasteruserpassword"></a>
Specifies whether to manage the master user password with AWS Secrets Manager.  
For more information, see [Password management with AWS Secrets Manager](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html) in the *Amazon RDS User Guide* and [Password management with AWS Secrets Manager](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-secrets-manager.html) in the *Amazon Aurora User Guide.*  
Valid for Cluster Type: Aurora DB clusters and Multi-AZ DB clusters  
Constraints:  
+ Can't manage the master user password with AWS Secrets Manager if `MasterUserPassword` is specified.
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MasterUserAuthenticationType`  <a name="cfn-rds-dbcluster-masteruserauthenticationtype"></a>
Specifies the authentication type for the master user. With IAM master user authentication, you can configure the master DB user with IAM database authentication when you create a DB cluster.  
You can specify one of the following values:  
+ `password` - Use standard database authentication with a password.
+ `iam-db-auth` - Use IAM database authentication for the master user.
Valid for Cluster Type: Aurora DB clusters and Multi-AZ DB clusters  
This option is only valid for RDS for MySQL, RDS for MariaDB, RDS for PostgreSQL, Aurora MySQL, and Aurora PostgreSQL engines.  
*Required*: No  
*Type*: String  
*Allowed values*: `password | iam-db-auth`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MasterUsername`  <a name="cfn-rds-dbcluster-masterusername"></a>
The name of the master user for the DB cluster.  
If you specify the `SourceDBClusterIdentifier`, `SnapshotIdentifier`, or `GlobalClusterIdentifier` property, don't specify this property. The value is inherited from the source DB cluster, the snapshot, or the primary DB cluster for the global database cluster, respectively.
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: Conditional  
*Type*: String  
*Pattern*: `^[a-zA-Z]{1}[a-zA-Z0-9_]*$`  
*Minimum*: `1`  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`MasterUserPassword`  <a name="cfn-rds-dbcluster-masteruserpassword"></a>
The master password for the DB instance.  
If you specify the `SourceDBClusterIdentifier`, `SnapshotIdentifier`, or `GlobalClusterIdentifier` property, don't specify this property. The value is inherited from the source DB cluster, the snapshot, or the primary DB cluster for the global database cluster, respectively.
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: Conditional  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MasterUserSecret`  <a name="cfn-rds-dbcluster-masterusersecret"></a>
The secret managed by RDS in AWS Secrets Manager for the master user password.  
When you restore a DB cluster from a snapshot, Amazon RDS generates a new secret instead of reusing the secret specified in the `SecretArn` property. This ensures that the restored DB cluster is securely managed with a dedicated secret. To maintain consistent integration with your application, you might need to update resource configurations to reference the newly created secret.
For more information, see [Password management with AWS Secrets Manager](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html) in the *Amazon RDS User Guide* and [Password management with AWS Secrets Manager](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-secrets-manager.html) in the *Amazon Aurora User Guide.*  
*Required*: No  
*Type*: [MasterUserSecret](aws-properties-rds-dbcluster-masterusersecret.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MonitoringInterval`  <a name="cfn-rds-dbcluster-monitoringinterval"></a>
The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB cluster. To turn off collecting Enhanced Monitoring metrics, specify `0`.  
If `MonitoringRoleArn` is specified, also set `MonitoringInterval` to a value other than `0`.  
Valid for Cluster Type: Aurora DB clusters and Multi-AZ DB clusters  
Valid Values: `0 | 1 | 5 | 10 | 15 | 30 | 60`  
Default: `0`  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MonitoringRoleArn`  <a name="cfn-rds-dbcluster-monitoringrolearn"></a>
The Amazon Resource Name (ARN) for the IAM role that permits RDS to send Enhanced Monitoring metrics to Amazon CloudWatch Logs. An example is `arn:aws:iam:123456789012:role/emaccess`. For information on creating a monitoring role, see [Setting up and enabling Enhanced Monitoring](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.html#USER_Monitoring.OS.Enabling) in the *Amazon RDS User Guide*.  
If `MonitoringInterval` is set to a value other than `0`, supply a `MonitoringRoleArn` value.  
Valid for Cluster Type: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`NetworkType`  <a name="cfn-rds-dbcluster-networktype"></a>
The network type of the DB cluster.  
Valid values:  
+  `IPV4` 
+  `DUAL` 
The network type is determined by the `DBSubnetGroup` specified for the DB cluster. A `DBSubnetGroup` can support only the IPv4 protocol or the IPv4 and IPv6 protocols (`DUAL`).  
For more information, see [ Working with a DB instance in a VPC](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html) in the *Amazon Aurora User Guide.*  
Valid for: Aurora DB clusters only  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PerformanceInsightsEnabled`  <a name="cfn-rds-dbcluster-performanceinsightsenabled"></a>
Specifies whether to turn on Performance Insights for the DB cluster.  
For more information, see [ Using Amazon Performance Insights](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html) in the *Amazon RDS User Guide*.  
Valid for Cluster Type: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PerformanceInsightsKmsKeyId`  <a name="cfn-rds-dbcluster-performanceinsightskmskeyid"></a>
The AWS KMS key identifier for encryption of Performance Insights data.  
The AWS KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.  
If you don't specify a value for `PerformanceInsightsKMSKeyId`, then Amazon RDS uses your default KMS key. There is a default KMS key for your AWS account. Your AWS account has a different default KMS key for each AWS Region.  
Valid for Cluster Type: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PerformanceInsightsRetentionPeriod`  <a name="cfn-rds-dbcluster-performanceinsightsretentionperiod"></a>
The number of days to retain Performance Insights data. When creating a DB cluster without enabling Performance Insights, you can't specify the parameter `PerformanceInsightsRetentionPeriod`.  
Valid for Cluster Type: Aurora DB clusters and Multi-AZ DB clusters  
Valid Values:  
+  `7` 
+ *month* \$1 31, where *month* is a number of months from 1-23. Examples: `93` (3 months \$1 31), `341` (11 months \$1 31), `589` (19 months \$1 31)
+  `731` 
Default: `7` days  
If you specify a retention period that isn't valid, such as `94`, Amazon RDS issues an error.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Port`  <a name="cfn-rds-dbcluster-port"></a>
The port number on which the DB instances in the DB cluster accept connections.  
Default:  
+ RDS for MySQL and Aurora MySQL - `3306`
+ RDS for PostgreSQL and Aurora PostgreSQL - `5432`
The `No interruption` on update behavior only applies to DB clusters. If you are updating a DB instance, see [Port](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-port) for the AWS::RDS::DBInstance resource.
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PreferredBackupWindow`  <a name="cfn-rds-dbcluster-preferredbackupwindow"></a>
The daily time range during which automated backups are created. For more information, see [ Backup Window](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Managing.Backups.html#Aurora.Managing.Backups.BackupWindow) in the *Amazon Aurora User Guide.*  
Constraints:  
+ Must be in the format `hh24:mi-hh24:mi`.
+ Must be in Universal Coordinated Time (UTC).
+ Must not conflict with the preferred maintenance window.
+ Must be at least 30 minutes.
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PreferredMaintenanceWindow`  <a name="cfn-rds-dbcluster-preferredmaintenancewindow"></a>
The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).  
Format: `ddd:hh24:mi-ddd:hh24:mi`  
The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week. To see the time blocks available, see [Maintaining an Amazon Aurora DB cluster](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora) in the *Amazon Aurora User Guide.*  
Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun.  
Constraints: Minimum 30-minute window.  
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PubliclyAccessible`  <a name="cfn-rds-dbcluster-publiclyaccessible"></a>
Specifies whether the DB cluster is publicly accessible.  
Valid for Cluster Type: Multi-AZ DB clusters only  
When the DB cluster is publicly accessible and you connect from outside of the DB cluster's virtual private cloud (VPC), its domain name system (DNS) endpoint resolves to the public IP address. When you connect from within the same VPC as the DB cluster, the endpoint resolves to the private IP address. Access to the DB cluster is controlled by its security group settings.  
When the DB cluster isn't publicly accessible, it is an internal DB cluster with a DNS name that resolves to a private IP address.  
The default behavior when `PubliclyAccessible` is not specified depends on whether a `DBSubnetGroup` is specified.  
If `DBSubnetGroup` isn't specified, `PubliclyAccessible` defaults to `true`.  
If `DBSubnetGroup` is specified, `PubliclyAccessible` defaults to `false` unless the value of `DBSubnetGroup` is `default`, in which case `PubliclyAccessible` defaults to `true`.  
If `PubliclyAccessible` is true and the VPC that the `DBSubnetGroup` is in doesn't have an internet gateway attached to it, Amazon RDS returns an error.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ReplicationSourceIdentifier`  <a name="cfn-rds-dbcluster-replicationsourceidentifier"></a>
The Amazon Resource Name (ARN) of the source DB instance or DB cluster if this DB cluster is created as a read replica.  
Valid for: Aurora DB clusters only  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RestoreToTime`  <a name="cfn-rds-dbcluster-restoretotime"></a>
The date and time to restore the DB cluster to.  
Valid Values: Value must be a time in Universal Coordinated Time (UTC) format  
Constraints:  
+ Must be before the latest restorable time for the DB instance
+ Must be specified if `UseLatestRestorableTime` parameter isn't provided
+ Can't be specified if the `UseLatestRestorableTime` parameter is enabled
+ Can't be specified if the `RestoreType` parameter is `copy-on-write`
This property must be used with `SourceDBClusterIdentifier` property. The resulting cluster will have the identifier that matches the value of the `DBclusterIdentifier` property.  
Example: `2015-03-07T23:45:00Z`  
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RestoreType`  <a name="cfn-rds-dbcluster-restoretype"></a>
The type of restore to be performed. You can specify one of the following values:  
+ `full-copy` - The new DB cluster is restored as a full copy of the source DB cluster.
+ `copy-on-write` - The new DB cluster is restored as a clone of the source DB cluster.
If you don't specify a `RestoreType` value, then the new DB cluster is restored as a full copy of the source DB cluster.  
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ScalingConfiguration`  <a name="cfn-rds-dbcluster-scalingconfiguration"></a>
The scaling configuration of an Aurora Serverless v1 DB cluster.  
This property is only supported for Aurora Serverless v1. For Aurora Serverless v2, Use the `ServerlessV2ScalingConfiguration` property.  
Valid for: Aurora Serverless v1 DB clusters only  
*Required*: No  
*Type*: [ScalingConfiguration](aws-properties-rds-dbcluster-scalingconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ServerlessV2ScalingConfiguration`  <a name="cfn-rds-dbcluster-serverlessv2scalingconfiguration"></a>
The scaling configuration of an Aurora Serverless V2 DB cluster.   
This property is only supported for Aurora Serverless v2. For Aurora Serverless v1, Use the `ScalingConfiguration` property.  
Valid for: Aurora Serverless v2 DB clusters only  
*Required*: No  
*Type*: [ServerlessV2ScalingConfiguration](aws-properties-rds-dbcluster-serverlessv2scalingconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SnapshotIdentifier`  <a name="cfn-rds-dbcluster-snapshotidentifier"></a>
The identifier for the DB snapshot or DB cluster snapshot to restore from.  
You can use either the name or the Amazon Resource Name (ARN) to specify a DB cluster snapshot. However, you can use only the ARN to specify a DB snapshot.  
After you restore a DB cluster with a `SnapshotIdentifier` property, you must specify the same `SnapshotIdentifier` property for any future updates to the DB cluster. When you specify this property for an update, the DB cluster is not restored from the snapshot again, and the data in the database is not changed. However, if you don't specify the `SnapshotIdentifier` property, an empty DB cluster is created, and the original DB cluster is deleted. If you specify a property that is different from the previous snapshot restore property, a new DB cluster is restored from the specified `SnapshotIdentifier` property, and the original DB cluster is deleted.  
If you specify the `SnapshotIdentifier` property to restore a DB cluster (as opposed to specifying it for DB cluster updates), then don't specify the following properties:  
+  `GlobalClusterIdentifier` 
+  `MasterUsername` 
+  `MasterUserPassword` 
+  `ReplicationSourceIdentifier` 
+  `RestoreType` 
+  `SourceDBClusterIdentifier` 
+  `SourceRegion` 
+ `StorageEncrypted` (for an encrypted snapshot)
+  `UseLatestRestorableTime` 
Constraints:  
+ Must match the identifier of an existing Snapshot.
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SourceDBClusterIdentifier`  <a name="cfn-rds-dbcluster-sourcedbclusteridentifier"></a>
When restoring a DB cluster to a point in time, the identifier of the source DB cluster from which to restore.  
Constraints:  
+ Must match the identifier of an existing DBCluster.
+ Cannot be specified if `SourceDbClusterResourceId` is specified. You must specify either `SourceDBClusterIdentifier` or `SourceDbClusterResourceId`, but not both.
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SourceDbClusterResourceId`  <a name="cfn-rds-dbcluster-sourcedbclusterresourceid"></a>
The resource ID of the source DB cluster from which to restore.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SourceRegion`  <a name="cfn-rds-dbcluster-sourceregion"></a>
The AWS Region which contains the source DB cluster when replicating a DB cluster. For example, `us-east-1`.   
Valid for: Aurora DB clusters only  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`StorageEncrypted`  <a name="cfn-rds-dbcluster-storageencrypted"></a>
Indicates whether the DB cluster is encrypted.  
If you specify the `KmsKeyId` property, then you must enable encryption.  
If you specify the `SourceDBClusterIdentifier` property, don't specify this property. The value is inherited from the source DB cluster, and if the DB cluster is encrypted, the specified `KmsKeyId` property is used.  
If you specify the `SnapshotIdentifier` and the specified snapshot is encrypted, don't specify this property. The value is inherited from the snapshot, and the specified `KmsKeyId` property is used.  
If you specify the `SnapshotIdentifier` and the specified snapshot isn't encrypted, you can use this property to specify that the restored DB cluster is encrypted. Specify the `KmsKeyId` property for the KMS key to use for encryption. If you don't want the restored DB cluster to be encrypted, then don't set this property or set it to `false`.  
If you specify both the `StorageEncrypted` and `SnapshotIdentifier` properties without specifying the `KmsKeyId` property, then the restored DB cluster inherits the encryption settings from the DB snapshot that provide.
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`StorageType`  <a name="cfn-rds-dbcluster-storagetype"></a>
The storage type to associate with the DB cluster.  
For information on storage types for Aurora DB clusters, see [Storage configurations for Amazon Aurora DB clusters](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Overview.StorageReliability.html#aurora-storage-type). For information on storage types for Multi-AZ DB clusters, see [Settings for creating Multi-AZ DB clusters](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/create-multi-az-db-cluster.html#create-multi-az-db-cluster-settings).  
This setting is required to create a Multi-AZ DB cluster.  
When specified for a Multi-AZ DB cluster, a value for the `Iops` parameter is required.  
Valid for Cluster Type: Aurora DB clusters and Multi-AZ DB clusters  
Valid Values:  
+ Aurora DB clusters - `aurora | aurora-iopt1`
+ Multi-AZ DB clusters - `io1 | io2 | gp3`
Default:  
+ Aurora DB clusters - `aurora`
+ Multi-AZ DB clusters - `io1`
When you create an Aurora DB cluster with the storage type set to `aurora-iopt1`, the storage type is returned in the response. The storage type isn't returned when you set it to `aurora`.
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-rds-dbcluster-tags"></a>
Tags to assign to the DB cluster.  
Valid for Cluster Type: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: Array of [Tag](aws-properties-rds-dbcluster-tag.md)  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UseLatestRestorableTime`  <a name="cfn-rds-dbcluster-uselatestrestorabletime"></a>
A value that indicates whether to restore the DB cluster to the latest restorable backup time. By default, the DB cluster is not restored to the latest restorable backup time.   
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`VpcSecurityGroupIds`  <a name="cfn-rds-dbcluster-vpcsecuritygroupids"></a>
A list of EC2 VPC security groups to associate with this DB cluster.  
If you plan to update the resource, don't specify VPC security groups in a shared VPC.  
Valid for: Aurora DB clusters and Multi-AZ DB clusters  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-rds-dbcluster-return-values"></a>

### Ref
<a name="aws-resource-rds-dbcluster-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the name (`DBClusterIdentifier`) of the DB cluster.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-rds-dbcluster-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-rds-dbcluster-return-values-fn--getatt-fn--getatt"></a>

`DBClusterArn`  <a name="DBClusterArn-fn::getatt"></a>
The Amazon Resource Name (ARN) for the DB cluster.

`DBClusterResourceId`  <a name="DBClusterResourceId-fn::getatt"></a>
The AWS Region-unique, immutable identifier for the DB cluster. This identifier is found in AWS CloudTrail log entries whenever the KMS key for the DB cluster is accessed.

`Endpoint.Address`  <a name="Endpoint.Address-fn::getatt"></a>
The connection endpoint for the DB cluster. For example: `mystack-mydbcluster-123456789012.us-east-2.rds.amazonaws.com`

`Endpoint.Port`  <a name="Endpoint.Port-fn::getatt"></a>
The port number that will accept connections on this DB cluster. For example: `3306`

`MasterUserSecret.SecretArn`  <a name="MasterUserSecret.SecretArn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the secret.

`ReadEndpoint.Address`  <a name="ReadEndpoint.Address-fn::getatt"></a>
The reader endpoint for the DB cluster. For example: `mystack-mydbcluster-ro-123456789012.us-east-2.rds.amazonaws.com`

`StorageEncryptionType`  <a name="StorageEncryptionType-fn::getatt"></a>
The type of encryption used to protect data at rest in the DB cluster. Possible values:  
+ `none` - The DB cluster is not encrypted.
+ `sse-rds` - The DB cluster is encrypted using an AWS owned KMS key.
+ `sse-kms` - The DB cluster is encrypted using a customer managed KMS key or AWS managed KMS key.

`StorageThroughput`  <a name="StorageThroughput-fn::getatt"></a>
The storage throughput for the DB cluster. The throughput is automatically set based on the IOPS that you provision, and is not configurable.  
This setting is only for non-Aurora Multi-AZ DB clusters.

## Remarks
<a name="aws-resource-rds-dbcluster--remarks"></a>

 *DB cluster creation modes* 

This section outlines the modes for creating RDS DB cluters—empty database, read replica, restore from snapshot, and point-in-time recovery. In the console, API, or CLI, each mode corresponds to a distinct API or command. In CloudFormation, however, the mode is determined by the following parameter combinations.
+ **Empty database** - Creates a new, empty DB cluster. 

  To create an empty database, *don't* specify any of the following properties:
  +  `SnapshotIdentifier` 
  +  `RestoreToTime` 
  +  `UseLatestRestorableTime` 
  +  `SourceDBClusterIdentifier` 
  +  `ReplicationSourceIdentifier` 
+ **Read replica** - Creates a replica of an existing DB cluster to replicate data asynchronously.

  To create a read replica, specify the `ReplicationSourceIdentifier` property *without* the following properties:
  +  `RestoreToTime` 
  +  `UseLatestRestorableTime` 
  +  `SnapshotIdentifier` 
  +  `SourceDBClusterIdentifier` 
+ **Restore from snapshot** - Restores the DB cluster from the specified snapshot. Cannot be used with a point-in-time recovery.

  To restore a DB cluster from a snapshot, specify the `SnapshotIdentifier` property *without* the following properties:
  +  `RestoreToTime` 
  +  `UseLatestRestorableTime` 
  +  `SourceDBClusterIdentifier` 
  +  `ReplicationSourceIdentifier` 
+ **Point-in-time recovery** - Recovers the DB cluster to a specific point in time. Requires identifying the source and the recovery time. Cannot be used with a snapshot.

  To restore a DB cluster to a specified time, include the `SourceDBClusterIdentifier` property or `SourceDbClusterResourceId` property with *either* the `RestoreToTime` property or the `UseLatestRestorableTime` property.

## Examples
<a name="aws-resource-rds-dbcluster--examples"></a>

The following examples create DB clusters.

**Note**  
For an example that adds a scaling policy for a DB cluster with Application Auto Scaling, see [Declaring a scaling policy for an Aurora DB cluster](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/quickref-autoscaling.html#w2ab1c19c22c15c21c11).

**Topics**
+ [Creating an Amazon Aurora DB cluster with two DB instances](#aws-resource-rds-dbcluster--examples--Creating_an_Amazon_Aurora_DB_cluster_with_two_DB_instances)
+ [Creating an Amazon Aurora DB cluster that exports logs to Amazon CloudWatch Logs](#aws-resource-rds-dbcluster--examples--Creating_an_Amazon_Aurora_DB_cluster_that_exports_logs_to_Amazon_CloudWatch_Logs)
+ [Creating a Multi-AZ DB cluster](#aws-resource-rds-dbcluster--examples--Creating_a_Multi-AZ_DB_cluster)
+ [Creating an Amazon Aurora Serverless v2 DB cluster](#aws-resource-rds-dbcluster--examples--Creating_an_Amazon_Aurora_Serverless_v2_DB_cluster)
+ [Creating an Amazon Aurora Serverless v1 DB cluster](#aws-resource-rds-dbcluster--examples--Creating_an_Amazon_Aurora_Serverless_v1_DB_cluster)
+ [Create a Secrets Manager secret for a master password](#aws-resource-rds-dbcluster--examples--Create_a_Secrets_Manager_secret_for_a_master_password)
+ [Restoring an Amazon Aurora DB cluster](#aws-resource-rds-dbcluster--examples--Restoring_an_Amazon_Aurora_DB_cluster)

### Creating an Amazon Aurora DB cluster with two DB instances
<a name="aws-resource-rds-dbcluster--examples--Creating_an_Amazon_Aurora_DB_cluster_with_two_DB_instances"></a>

The following example creates an Amazon Aurora DB cluster and adds two DB instances to it. Because Amazon RDS automatically assigns a writer and reader DB instances in the cluster, use the cluster endpoint to read and write data, not the individual DB instance endpoints. 

**Note**  
The example uses the `time_zone` Aurora MySQL parameter. For Aurora PostgreSQL, use the `timezone` parameter instead.

#### JSON
<a name="aws-resource-rds-dbcluster--examples--Creating_an_Amazon_Aurora_DB_cluster_with_two_DB_instances--json"></a>

```
{
    "Parameters": {
        "Username": {
            "NoEcho": "true",
            "Description": "Username for Aurora MySQL database access",
            "Type": "String",
            "MinLength": "1",
            "MaxLength": "16",
            "Default": "bevelvoerder",
            "AllowedPattern": "[a-zA-Z][a-zA-Z0-9]*",
            "ConstraintDescription": "must begin with a letter and contain only alphanumeric characters."
        },
        "Password": {
            "NoEcho": "true",
            "Description": "Password for Aurora MySQL database access",
            "Type": "String",
            "MinLength": "8",
            "MaxLength": "41",
            "Default": "Passw0rd",
            "AllowedPattern": "[a-zA-Z0-9]*",
            "ConstraintDescription": "must contain only alphanumeric characters."
        }
    },
    "Resources": {
        "RDSCluster": {
            "Type": "AWS::RDS::DBCluster",
            "Properties": {
                "MasterUsername": {
                    "Ref": "Username"
                },
                "MasterUserPassword": {
                    "Ref": "Password"
                },
                "Engine": "aurora-mysql",
                "DBClusterParameterGroupName": {
                    "Ref": "RDSDBClusterParameterGroup"
                }
            }
        },
        "RDSDBInstance1": {
            "Type": "AWS::RDS::DBInstance",
            "Properties": {
                "DBParameterGroupName": {
                    "Ref": "RDSDBParameterGroup"
                },
                "Engine": "aurora-mysql",
                "DBClusterIdentifier": {
                    "Ref": "RDSCluster"
                },
                "PubliclyAccessible": "true",
                "DBInstanceClass": "db.r3.xlarge"
            }
        },
        "RDSDBInstance2": {
            "Type": "AWS::RDS::DBInstance",
            "Properties": {
                "DBParameterGroupName": {
                    "Ref": "RDSDBParameterGroup"
                },
                "Engine": "aurora-mysql",
                "DBClusterIdentifier": {
                    "Ref": "RDSCluster"
                },
                "PubliclyAccessible": "true",
                "DBInstanceClass": "db.r3.xlarge"
            }
        },
        "RDSDBClusterParameterGroup": {
            "Type": "AWS::RDS::DBClusterParameterGroup",
            "Properties": {
                "Description": "CloudFormation Sample Aurora Cluster Parameter Group",
                "Family": "aurora5.6",
                "Parameters": {
                    "time_zone": "US/Eastern"
                }
            }
        },
        "RDSDBParameterGroup": {
            "Type": "AWS::RDS::DBParameterGroup",
            "Properties": {
                "Description": "CloudFormation Sample Aurora Parameter Group",
                "Family": "aurora5.6",
                "Parameters": {
                    "sql_mode": "IGNORE_SPACE",
                    "max_allowed_packet": 1024,
                    "innodb_buffer_pool_size": "{DBInstanceClassMemory*3/4}"
                }
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-dbcluster--examples--Creating_an_Amazon_Aurora_DB_cluster_with_two_DB_instances--yaml"></a>

```
Parameters:
  Username:
    NoEcho: 'true'
    Description: Username for Aurora MySQL database access
    Type: String
    MinLength: '1'
    MaxLength: '16'
    Default: "bevelvoerder"
    AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
    ConstraintDescription: must begin with a letter and contain only alphanumeric characters.
  Password:
    NoEcho: 'true'
    Description: Password for Aurora MySQL database access
    Type: String
    MinLength: '8'
    MaxLength: '41'
    Default: "Passw0rd"
    AllowedPattern: '[a-zA-Z0-9]*'
    ConstraintDescription: must contain only alphanumeric characters.
Resources:
  RDSCluster:
    Type: 'AWS::RDS::DBCluster'
    Properties:
      MasterUsername:
        Ref: Username
      MasterUserPassword:
        Ref: Password
      Engine: aurora-mysql
      DBClusterParameterGroupName:
        Ref: RDSDBClusterParameterGroup
  RDSDBInstance1:
    Type: 'AWS::RDS::DBInstance'
    Properties:
      DBParameterGroupName:
        Ref: RDSDBParameterGroup
      Engine: aurora-mysql
      DBClusterIdentifier:
        Ref: RDSCluster
      PubliclyAccessible: 'true'
      DBInstanceClass: db.r3.xlarge
  RDSDBInstance2:
    Type: 'AWS::RDS::DBInstance'
    Properties:
      DBParameterGroupName:
        Ref: RDSDBParameterGroup
      Engine: aurora-mysql
      DBClusterIdentifier:
        Ref: RDSCluster
      PubliclyAccessible: 'true'
      DBInstanceClass: db.r3.xlarge
  RDSDBClusterParameterGroup:
    Type: 'AWS::RDS::DBClusterParameterGroup'
    Properties:
      Description: CloudFormation Sample Aurora Cluster Parameter Group
      Family: aurora5.6
      Parameters:
        time_zone: US/Eastern
  RDSDBParameterGroup:
    Type: 'AWS::RDS::DBParameterGroup'
    Properties:
      Description: CloudFormation Sample Aurora Parameter Group
      Family: aurora5.6
      Parameters:
        sql_mode: IGNORE_SPACE
        max_allowed_packet: 1024
        innodb_buffer_pool_size: '{DBInstanceClassMemory*3/4}'
```

### Creating an Amazon Aurora DB cluster that exports logs to Amazon CloudWatch Logs
<a name="aws-resource-rds-dbcluster--examples--Creating_an_Amazon_Aurora_DB_cluster_that_exports_logs_to_Amazon_CloudWatch_Logs"></a>

The following example creates an Amazon Aurora PostgreSQL DB cluster that exports logs to Amazon CloudWatch Logs. For more information about exporting Aurora DB cluster logs to Amazon CloudWatch Logs, see [ Publishing Database Logs to Amazon CloudWatch Logs](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) in the *Amazon Aurora User Guide*.

#### JSON
<a name="aws-resource-rds-dbcluster--examples--Creating_an_Amazon_Aurora_DB_cluster_that_exports_logs_to_Amazon_CloudWatch_Logs--json"></a>

```
{
  "AWSTemplateFormatVersion" : "2010-09-09",


  "Description" : "AWS CloudFormation Sample Template for sending Aurora DB cluster logs to CloudWatch Logs: Sample template showing how to create an Aurora PostgreSQL DB cluster that exports logs to CloudWatch Logs. **WARNING** This template enables log exports to CloudWatch Logs. You will be billed for the AWS resources used if you create a stack from this template.",


  "Parameters" : {
      "DBUsername" : {
        "NoEcho" : "true",
        "Description" : "Username for PostgreSQL database access",

        "Type" : "String",
        "MinLength" : "1",
        "MaxLength" : "16",
        "AllowedPattern" : "[a-zA-Z][a-zA-Z0-9]*",
        "ConstraintDescription" : "must begin with a letter and contain only alphanumeric characters."
      },
      "DBPassword" : {
        "NoEcho" : "true",
        "Description" : "Password for PostgreSQL database access",

        "Type" : "String",
        "MinLength" : "8",

        "MaxLength" : "41",
        "AllowedPattern" : "[a-zA-Z0-9]*",
        "ConstraintDescription" : "must contain only alphanumeric characters."
      }
  },

  "Resources" : {
      "RDSCluster" : {
          "Type": "AWS::RDS::DBCluster",
          "Properties" : {
              "MasterUsername" : {
                  "Ref" : "DBUsername"
              },
              "MasterUserPassword" : {
                  "Ref" : "DBPassword"
              },
              "DBClusterIdentifier" : "aurora-postgresql-cluster",
              "Engine" : "aurora-postgresql",
              "EngineVersion" : "10.7",
              "DBClusterParameterGroupName" : "default.aurora-postgresql10",
              "EnableCloudwatchLogsExports" : ["postgresql"]
          }
      },
  "RDSDBInstance1": {
        "Type" : "AWS::RDS::DBInstance",
        "Properties" : {
            "DBInstanceIdentifier" : "aurora-postgresql-instance1",
            "Engine" : "aurora-postgresql",
            "DBClusterIdentifier" : {
                "Ref" : "RDSCluster"
            },
            "PubliclyAccessible" : "true",
            "DBInstanceClass" : "db.r4.large"
        }
    },
  "RDSDBInstance2": {
        "Type" : "AWS::RDS::DBInstance",
        "Properties" : {
            "DBInstanceIdentifier" : "aurora-postgresql-instance2",
            "Engine" : "aurora-postgresql",
            "DBClusterIdentifier" : {
                "Ref" : "RDSCluster"
            },
            "PubliclyAccessible" : "true",
            "DBInstanceClass" : "db.r4.large"
        }
    },
  }
}
```

#### YAML
<a name="aws-resource-rds-dbcluster--examples--Creating_an_Amazon_Aurora_DB_cluster_that_exports_logs_to_Amazon_CloudWatch_Logs--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Description: >-
  AWS CloudFormation Sample Template for sending Aurora DB cluster logs to
  CloudWatch Logs: Sample template showing how to create an Aurora PostgreSQL DB
  cluster that exports logs to CloudWatch Logs. **WARNING** This template
  enables log exports to CloudWatch Logs. You will be billed for the AWS
  resources used if you create a stack from this template.
Parameters:
  DBUsername:
    NoEcho: 'true'
    Description: Username for PostgreSQL database access
    Type: String
    MinLength: '1'
    MaxLength: '16'
    AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
    ConstraintDescription: must begin with a letter and contain only alphanumeric characters.
  DBPassword:
    NoEcho: 'true'
    Description: Password for PostgreSQL database access
    Type: String
    MinLength: '8'
    MaxLength: '41'
    AllowedPattern: '[a-zA-Z0-9]*'
    ConstraintDescription: must contain only alphanumeric characters.
Resources:
  RDSCluster:
    Type: 'AWS::RDS::DBCluster'
    Properties:
      MasterUsername: !Ref DBUsername
      MasterUserPassword: !Ref DBPassword
      DBClusterIdentifier: aurora-postgresql-cluster
      Engine: aurora-postgresql
      EngineVersion: '10.7'
      DBClusterParameterGroupName: default.aurora-postgresql10
      EnableCloudwatchLogsExports:
        - postgresql
  RDSDBInstance1:
    Type: 'AWS::RDS::DBInstance'
    Properties:
      DBInstanceIdentifier: aurora-postgresql-instance1
      Engine: aurora-postgresql
      DBClusterIdentifier: !Ref RDSCluster
      PubliclyAccessible: 'true'
      DBInstanceClass: db.r4.large
  RDSDBInstance2:
    Type: 'AWS::RDS::DBInstance'
    Properties:
      DBInstanceIdentifier: aurora-postgresql-instance2
      Engine: aurora-postgresql
      DBClusterIdentifier: !Ref RDSCluster
      PubliclyAccessible: 'true'
      DBInstanceClass: db.r4.large
```

### Creating a Multi-AZ DB cluster
<a name="aws-resource-rds-dbcluster--examples--Creating_a_Multi-AZ_DB_cluster"></a>

The following example creates a Multi-AZ DB cluster. A Multi-AZ DB cluster provides high availability by maintaining standby replicas in different Availability Zones. This template creates a DB cluster and automatically provisions the required reader and writer DB instances. For more information, see [Multi-AZ DB cluster deployments](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) in the *Amazon RDS User Guide*.

#### JSON
<a name="aws-resource-rds-dbcluster--examples--Creating_a_Multi-AZ_DB_cluster--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "CloudFormation template to create a MySQL Multi-AZ DB cluster with encryption, CloudWatch logs, deletion protection, and allocated storage.",
    "Parameters": {
      "MasterPassword": {
        "Type": "String",
        "NoEcho": true,
        "Description": "The master password for the DB cluster."
      }
    },
    "Resources": {
      "MyDBCluster": {
        "Type": "AWS::RDS::DBCluster",
        "Properties": {
          "Engine": "mysql",
          "EngineVersion": "8.0.32",
          "DatabaseName": "MyDatabase",
          "MasterUsername": "admin",
          "MasterUserPassword": { "Ref": "MasterPassword" },
          "StorageEncrypted": true,
          "EnableCloudwatchLogsExports": [
            "error",
            "general",
            "slowquery"
          ],
          "DeletionProtection": true,
          "AllocatedStorage": 20,
          "DBClusterInstanceClass": "db.m5d.xlarge",
          "StorageType": "gp3"
        }
      }
    }
  }
```

#### YAML
<a name="aws-resource-rds-dbcluster--examples--Creating_a_Multi-AZ_DB_cluster--yaml"></a>

```
AWSTemplateFormatVersion: "2010-09-09"
Description: "CloudFormation template to create a MySQL Multi-AZ DB cluster with encryption, CloudWatch logs, deletion protection, and allocated storage."
Parameters:
  MasterPassword:
    Type: String
    NoEcho: true
    Description: "The master password for the DB cluster."
Resources:
  MyDBCluster:
    Type: AWS::RDS::DBCluster
    Properties:
      Engine: mysql
      EngineVersion: "8.0.32"
      DatabaseName: MyDatabase
      MasterUsername: admin
      MasterUserPassword: !Ref MasterPassword
      StorageEncrypted: true
      EnableCloudwatchLogsExports:
        - "error"
        - "general"
        - "slowquery"
      DeletionProtection: true
      AllocatedStorage: 20
      DBClusterInstanceClass: db.m5d.xlarge
      StorageType: gp3
```

### Creating an Amazon Aurora Serverless v2 DB cluster
<a name="aws-resource-rds-dbcluster--examples--Creating_an_Amazon_Aurora_Serverless_v2_DB_cluster"></a>

The following example creates an Amazon Aurora Serverless v2 DB cluster. Aurora Serverless v2 automates the processes of monitoring the workload and adjusting the capacity for your databases. It adjusts the capacity in increments to provide the necessary database resources to meet an application's requirements. For more information, see [Using Amazon Aurora Serverless v2](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.html) in the *Amazon Aurora User Guide*.

You must provide a supported engine version when you create an Amazon Aurora Serverless v2 DB cluster. For more information, see [ Aurora Serverless v2](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.Aurora_Fea_Regions_DB-eng.Feature.ServerlessV2.html) in the *Amazon Aurora User Guide*.

**Note**  
This example creates an Aurora MySQL Serverless v2 DB cluster by setting `Engine` to `aurora-mysql`.

#### JSON
<a name="aws-resource-rds-dbcluster--examples--Creating_an_Amazon_Aurora_Serverless_v2_DB_cluster--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "ServerlessV2 Cluster",
    "Parameters": {
        "MasterUsername": {
            "Type": "String"
        },
        "MasterUserPassword": {
            "Type": "String",
            "NoEcho": true
        },
        "DBClusterIdentifier": {
            "Type": "String"
        },
        "EngineVersion": {
            "Type": "String"
        },
        "MinCapacity": {
            "Type": "String"
        },
        "MaxCapacity": {
            "Type": "String"
        }
    },
    "Resources": {
        "RDSDBCluster": {
            "Type": "AWS::RDS::DBCluster",
            "Properties": {
                "Engine": "aurora-mysql",
                "DBClusterIdentifier": {
                    "Ref": "DBClusterIdentifier"
                },
                "EngineVersion": {
                    "Ref": "EngineVersion"
                },
                "MasterUsername": {
                    "Ref": "MasterUsername"
                },
                "MasterUserPassword": {
                    "Ref": "MasterUserPassword"
                },
                "ServerlessV2ScalingConfiguration": {
                    "MinCapacity": {
                        "Ref": "MinCapacity"
                    },
                    "MaxCapacity": {
                        "Ref": "MaxCapacity"
                    }
                }
            }
        },
        "RDSDBInstance": {
            "Type": "AWS::RDS::DBInstance",
            "Properties": {
                "Engine": "aurora-mysql",
                "DBInstanceClass": "db.serverless",
                "DBClusterIdentifier": {
                    "Ref": "RDSDBCluster"
                }
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-dbcluster--examples--Creating_an_Amazon_Aurora_Serverless_v2_DB_cluster--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Description: ServerlessV2 Cluster
Parameters:
  MasterUsername:
    Type: String
  MasterUserPassword:
    Type: String
    NoEcho: true
  DBClusterIdentifier:
    Type: String
  EngineVersion:
    Type: String
  MinCapacity:
    Type: String
  MaxCapacity:
    Type: String
Resources:
  RDSDBCluster:
    Type: 'AWS::RDS::DBCluster'
    Properties:
      Engine: aurora-mysql
      DBClusterIdentifier: !Ref DBClusterIdentifier
      EngineVersion: !Ref EngineVersion
      MasterUsername: !Ref MasterUsername
      MasterUserPassword: !Ref MasterUserPassword
      ServerlessV2ScalingConfiguration:
        MinCapacity: !Ref MinCapacity
        MaxCapacity: !Ref MaxCapacity
   RDSDBInstance:
    Type: 'AWS::RDS::DBInstance'
    Properties:
      Engine: aurora-mysql
      DBInstanceClass: db.serverless
      DBClusterIdentifier: !Ref RDSDBCluster
```

### Creating an Amazon Aurora Serverless v1 DB cluster
<a name="aws-resource-rds-dbcluster--examples--Creating_an_Amazon_Aurora_Serverless_v1_DB_cluster"></a>

The following example creates an Amazon Aurora Serverless v1 DB cluster. An Aurora Serverless v1 DB cluster is a DB cluster that automatically starts up, shuts down, and scales up or down its compute capacity based on your application's needs. For more information about Aurora Serverless v1 DB clusters, see [Using Amazon Aurora Serverless](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html) in the *Amazon Aurora User Guide*.

**Note**  
This example creates an Aurora MySQL Serverless DB cluster by setting `Engine` to `aurora` and `EngineVersion` to `5.6.10a`. To create an Aurora PostgreSQL Serverless DB cluster, set `Engine` to `aurora-postgresql` and `EngineVersion` to `10.7`.

#### JSON
<a name="aws-resource-rds-dbcluster--examples--Creating_an_Amazon_Aurora_Serverless_v1_DB_cluster--json"></a>

```
{
  "AWSTemplateFormatVersion" : "2010-09-09",

  "Description" : "AWS CloudFormation Sample Template AuroraServerlessDBCluster: Sample template showing how to create an Amazon Aurora Serverless DB cluster. **WARNING** This template creates an Amazon Aurora DB cluster. You will be billed for the AWS resources used if you create a stack from this template.",

  "Parameters" : {
      "DBUsername" : {
        "NoEcho" : "true",
        "Description" : "Username for MySQL database access",
        "Type" : "String",
        "MinLength" : "1",
        "MaxLength" : "16",
        "AllowedPattern" : "[a-zA-Z][a-zA-Z0-9]*",
        "ConstraintDescription" : "must begin with a letter and contain only alphanumeric characters."
      },
      "DBPassword" : {
        "NoEcho" : "true",
        "Description" : "Password MySQL database access",
        "Type" : "String",
        "MinLength" : "8",
        "MaxLength" : "41",
        "AllowedPattern" : "[a-zA-Z0-9]*",
        "ConstraintDescription" : "must contain only alphanumeric characters."
      }
  },
  "Resources" : {
      "RDSCluster" : {
          "Type": "AWS::RDS::DBCluster",
          "Properties" : {
              "MasterUsername" : {
                  "Ref": "DBUsername"
              },
              "MasterUserPassword" : {
                  "Ref": "DBPassword"
              },
              "DBClusterIdentifier" : "my-serverless-cluster",
              "Engine" : "aurora",
              "EngineVersion" : "5.6.10a",
              "EngineMode" : "serverless",
              "ScalingConfiguration" : {
                  "AutoPause" : true,
                  "MinCapacity" : 4,
                  "MaxCapacity" : 32,
                  "SecondsUntilAutoPause" : 1000
              }
          }
      }
  }
}
```

#### YAML
<a name="aws-resource-rds-dbcluster--examples--Creating_an_Amazon_Aurora_Serverless_v1_DB_cluster--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Description: >-
  AWS CloudFormation Sample Template AuroraServerlessDBCluster: Sample template
  showing how to create an Amazon Aurora Serverless DB cluster. **WARNING** This
  template creates an Amazon Aurora DB cluster. You will be billed for the AWS
  resources used if you create a stack from this template.
Parameters:
  DBUsername:
    NoEcho: 'true'
    Description: Username for MySQL database access
    Type: String
    MinLength: '1'
    MaxLength: '16'
    AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
    ConstraintDescription: must begin with a letter and contain only alphanumeric characters.
  DBPassword:
    NoEcho: 'true'
    Description: Password MySQL database access
    Type: String
    MinLength: '8'
    MaxLength: '41'
    AllowedPattern: '[a-zA-Z0-9]*'
    ConstraintDescription: must contain only alphanumeric characters.
Resources:
  RDSCluster:
    Type: 'AWS::RDS::DBCluster'
    Properties:
      MasterUsername: !Ref DBUsername
      MasterUserPassword: !Ref DBPassword
      DBClusterIdentifier: my-serverless-cluster
      Engine: aurora
      EngineVersion: 5.6.10a
      EngineMode: serverless
      ScalingConfiguration:
        AutoPause: true
        MinCapacity: 4
        MaxCapacity: 32
        SecondsUntilAutoPause: 1000
```

### Create a Secrets Manager secret for a master password
<a name="aws-resource-rds-dbcluster--examples--Create_a_Secrets_Manager_secret_for_a_master_password"></a>

The following example creates a AWS CloudFormation stack with the AWS::RDS::DBInstance resource with managed master user password feature. The secret which is used to authenticate the DB instance is shown in the `Secret` stack output. This output can be removed if showing this value to other CloudFormation stack isn't required.

For more information about managing password with Secrets Manager, see [Password management with AWS Secrets Manager](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html) in the *Amazon RDS User Guide* and [Password management with AWS Secrets Manager](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-secrets-manager.html) in the *Amazon Aurora User Guide*.

#### JSON
<a name="aws-resource-rds-dbcluster--examples--Create_a_Secrets_Manager_secret_for_a_master_password--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "A sample template",
    "Resources": {
        "MyCluster": {
            "Properties": {
                "Engine": "aurora-mysql",
                "MasterUsername": "masteruser",
                "ManageMasterUserPassword": true,
                "MasterUserSecret": {
                    "KmsKeyId": {
                        "Ref": "KMSKey"
                    }
                }
            },
            "Type": "AWS::RDS::DBCluster"
        },
        "MyInstance": {
            "Properties": {
                "DBClusterIdentifier": {
                    "Ref": "MyCluster"
                },
                "DBInstanceClass": "db.t2.small",
                "Engine": "aurora-mysql",
                "PubliclyAccessible": "true"
            },
            "Type": "AWS::RDS::DBInstance"
        },
        "KMSKey": {
            "Type": "AWS::KMS::Key",
            "Properties": {
                "Description": "Manual test KMS key",
                "EnableKeyRotation": true,
                "KeyPolicy": {
                    "Version": "2012-10-17"		 	 	 ,
                    "Id": {
                        "Ref": "AWS::StackName"
                    },
                    "Statement": [
                        {
                            "Sid": "Allow administration of the key",
                            "Effect": "Allow",
                            "Principal": {
                                "AWS": {
                                    "Fn::Sub": "arn:${AWS::Partition}:iam::${AWS::AccountId}:root"
                                }
                            },
                            "Action": [
                                "kms:*"
                            ],
                            "Resource": "*"
                        }
                    ]
                }
            }
        }
    },
    "Outputs": {
        "Secret": {
            "Value": {
                "Fn::GetAtt": "MyCluster.MasterUserSecret.SecretArn"
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-dbcluster--examples--Create_a_Secrets_Manager_secret_for_a_master_password--yaml"></a>

```
AWSTemplateFormatVersion: "2010-09-09"
Description: A sample template
Resources:
  MyCluster:
    Properties:
      Engine: aurora-mysql
      MasterUsername: masteruser
      ManageMasterUserPassword: true
      MasterUserSecret:
        KmsKeyId: !Ref KMSKey
    Type: "AWS::RDS::DBCluster"
  MyInstance:
    Properties:
      DBClusterIdentifier:
        Ref: MyCluster
      DBInstanceClass: db.t2.small
      Engine: aurora-mysql
      PubliclyAccessible: "true"
    Type: "AWS::RDS::DBInstance"
  KMSKey:
    Type: 'AWS::KMS::Key'
    Properties:
      Description: Manual test KMS key
      EnableKeyRotation: True
      KeyPolicy:
        Version: "2012-10-17"
        Id: !Ref "AWS::StackName"
        Statement:
          - Sid: "Allow administration of the key"
            Effect: "Allow"
            Principal:
              AWS:
                Fn::Sub: 'arn:${AWS::Partition}:iam::${AWS::AccountId}:root'
            Action:
              - "kms:*"
            Resource: "*"
Outputs:
  Secret:
    Value:
      Fn::GetAtt: MyCluster.MasterUserSecret.SecretArn
```

### Restoring an Amazon Aurora DB cluster
<a name="aws-resource-rds-dbcluster--examples--Restoring_an_Amazon_Aurora_DB_cluster"></a>

The following example restores an Amazon Aurora DB cluster. The example assumes that `SourceDBCluster` property already exists.

#### JSON
<a name="aws-resource-rds-dbcluster--examples--Restoring_an_Amazon_Aurora_DB_cluster--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "AWS CloudFormation Sample Template To Restore AuroraDBCluster: Sample template showing how to restore an Amazon Aurora DB cluster. **WARNING** This template creates an Amazon Aurora DB cluster. You will be billed for the AWS resources used if you create a stack from this template.",
    "Resources": {
        "RDSCluster": {
            "Type": "AWS::RDS::DBCluster",
            "Properties": {
                "DBClusterIdentifier": "my-multi-az-cluster-pit",
                "SourceDBClusterIdentifier": "my-multi-az-cluster",
                "RestoreToTime": "2023-05-29T23:50:00Z",
                "DBClusterInstanceClass": "db.r6gd.large",
                "StorageType": "io1",
                "Iops": 1000,
                "PubliclyAccessible": true
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-dbcluster--examples--Restoring_an_Amazon_Aurora_DB_cluster--yaml"></a>

```
Description: >-
  AWS CloudFormation Sample Template To Restore AuroraDBCluster: Sample template
  showing how to restore an Amazon Aurora DB cluster. **WARNING** This
  template creates an Amazon Aurora DB cluster. You will be billed for the AWS
  resources used if you create a stack from this template.

Resources:
  RDSCluster:
    Type: 'AWS::RDS::DBCluster'
    Properties:
      DBClusterIdentifier: my-multi-az-cluster-pit
      SourceDBClusterIdentifier: my-multi-az-cluster
      RestoreToTime: 2023-05-29T23:50:00Z
      DBClusterInstanceClass: db.r6gd.large
      StorageType: io1
      Iops: 1000
      PubliclyAccessible: true
```

# AWS::RDS::DBCluster DBClusterRole
<a name="aws-properties-rds-dbcluster-dbclusterrole"></a>

Describes an AWS Identity and Access Management (IAM) role that is associated with a DB cluster.

## Syntax
<a name="aws-properties-rds-dbcluster-dbclusterrole-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbcluster-dbclusterrole-syntax.json"></a>

```
{
  "[FeatureName](#cfn-rds-dbcluster-dbclusterrole-featurename)" : String,
  "[RoleArn](#cfn-rds-dbcluster-dbclusterrole-rolearn)" : String
}
```

### YAML
<a name="aws-properties-rds-dbcluster-dbclusterrole-syntax.yaml"></a>

```
  [FeatureName](#cfn-rds-dbcluster-dbclusterrole-featurename): String
  [RoleArn](#cfn-rds-dbcluster-dbclusterrole-rolearn): String
```

## Properties
<a name="aws-properties-rds-dbcluster-dbclusterrole-properties"></a>

`FeatureName`  <a name="cfn-rds-dbcluster-dbclusterrole-featurename"></a>
The name of the feature associated with the AWS Identity and Access Management (IAM) role. IAM roles that are associated with a DB cluster grant permission for the DB cluster to access other AWS services on your behalf. For the list of supported feature names, see the `SupportedFeatureNames` description in [DBEngineVersion](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DBEngineVersion.html) in the *Amazon RDS API Reference*.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-rds-dbcluster-dbclusterrole-rolearn"></a>
The Amazon Resource Name (ARN) of the IAM role that is associated with the DB cluster.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-rds-dbcluster-dbclusterrole--examples"></a>



### 
<a name="aws-properties-rds-dbcluster-dbclusterrole--examples--"></a>

The following specifies a role to associate with a DB cluster.

#### JSON
<a name="aws-properties-rds-dbcluster-dbclusterrole--examples----json"></a>

```
"AssociatedRoles": [
    {
        "FeatureName": "s3Import",
        "RoleArn": "arn:aws:iam::123456789012:role/RDSLoadFromS3"               
    }
]
```

#### YAML
<a name="aws-properties-rds-dbcluster-dbclusterrole--examples----yaml"></a>

```
AssociatedRoles:
    - FeatureName: s3Import
      RoleArn: 'arn:aws:iam::123456789012:role/RDSLoadFromS3'
```

# AWS::RDS::DBCluster Endpoint
<a name="aws-properties-rds-dbcluster-endpoint"></a>

The `Endpoint` return value specifies the connection endpoint for the primary instance of the DB cluster.

## Syntax
<a name="aws-properties-rds-dbcluster-endpoint-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbcluster-endpoint-syntax.json"></a>

```
{
  "[Address](#cfn-rds-dbcluster-endpoint-address)" : String,
  "[Port](#cfn-rds-dbcluster-endpoint-port)" : String
}
```

### YAML
<a name="aws-properties-rds-dbcluster-endpoint-syntax.yaml"></a>

```
  [Address](#cfn-rds-dbcluster-endpoint-address): String
  [Port](#cfn-rds-dbcluster-endpoint-port): String
```

## Properties
<a name="aws-properties-rds-dbcluster-endpoint-properties"></a>

`Address`  <a name="cfn-rds-dbcluster-endpoint-address"></a>
Specifies the connection endpoint for the primary instance of the DB cluster.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Port`  <a name="cfn-rds-dbcluster-endpoint-port"></a>
Specifies the port that the database engine is listening on.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::RDS::DBCluster MasterUserSecret
<a name="aws-properties-rds-dbcluster-masterusersecret"></a>

The `MasterUserSecret` return value specifies the secret managed by RDS in AWS Secrets Manager for the master user password.

For more information, see [Password management with AWS Secrets Manager](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html) in the *Amazon RDS User Guide* and [Password management with AWS Secrets Manager](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-secrets-manager.html) in the *Amazon Aurora User Guide.*

## Syntax
<a name="aws-properties-rds-dbcluster-masterusersecret-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbcluster-masterusersecret-syntax.json"></a>

```
{
  "[KmsKeyId](#cfn-rds-dbcluster-masterusersecret-kmskeyid)" : String,
  "[SecretArn](#cfn-rds-dbcluster-masterusersecret-secretarn)" : String
}
```

### YAML
<a name="aws-properties-rds-dbcluster-masterusersecret-syntax.yaml"></a>

```
  [KmsKeyId](#cfn-rds-dbcluster-masterusersecret-kmskeyid): String
  [SecretArn](#cfn-rds-dbcluster-masterusersecret-secretarn): String
```

## Properties
<a name="aws-properties-rds-dbcluster-masterusersecret-properties"></a>

`KmsKeyId`  <a name="cfn-rds-dbcluster-masterusersecret-kmskeyid"></a>
The AWS KMS key identifier that is used to encrypt the secret.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SecretArn`  <a name="cfn-rds-dbcluster-masterusersecret-secretarn"></a>
The Amazon Resource Name (ARN) of the secret. This parameter is a return value that you can retrieve using the `Fn::GetAtt` intrinsic function. For more information, see [Return values](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#aws-resource-rds-dbcluster-return-values).  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::RDS::DBCluster ReadEndpoint
<a name="aws-properties-rds-dbcluster-readendpoint"></a>

The `ReadEndpoint` return value specifies the reader endpoint for the DB cluster.

The reader endpoint for a DB cluster load-balances connections across the Aurora Replicas that are available in a DB cluster. As clients request new connections to the reader endpoint, Aurora distributes the connection requests among the Aurora Replicas in the DB cluster. This functionality can help balance your read workload across multiple Aurora Replicas in your DB cluster.

If a failover occurs, and the Aurora Replica that you are connected to is promoted to be the primary instance, your connection is dropped. To continue sending your read workload to other Aurora Replicas in the cluster, you can then reconnect to the reader endpoint.

For more information about Aurora endpoints, see [Amazon Aurora connection management](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Overview.Endpoints.html) in the *Amazon Aurora User Guide*.

## Syntax
<a name="aws-properties-rds-dbcluster-readendpoint-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbcluster-readendpoint-syntax.json"></a>

```
{
  "[Address](#cfn-rds-dbcluster-readendpoint-address)" : String
}
```

### YAML
<a name="aws-properties-rds-dbcluster-readendpoint-syntax.yaml"></a>

```
  [Address](#cfn-rds-dbcluster-readendpoint-address): String
```

## Properties
<a name="aws-properties-rds-dbcluster-readendpoint-properties"></a>

`Address`  <a name="cfn-rds-dbcluster-readendpoint-address"></a>
The host address of the reader endpoint.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::RDS::DBCluster ScalingConfiguration
<a name="aws-properties-rds-dbcluster-scalingconfiguration"></a>

The `ScalingConfiguration` property type specifies the scaling configuration of an Aurora Serverless v1 DB cluster. 

For more information, see [Using Amazon Aurora Serverless](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html) in the *Amazon Aurora User Guide*.

This property is only supported for Aurora Serverless v1. For Aurora Serverless v2, Use the `ServerlessV2ScalingConfiguration` property.

Valid for: Aurora Serverless v1 DB clusters only

## Syntax
<a name="aws-properties-rds-dbcluster-scalingconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbcluster-scalingconfiguration-syntax.json"></a>

```
{
  "[AutoPause](#cfn-rds-dbcluster-scalingconfiguration-autopause)" : Boolean,
  "[MaxCapacity](#cfn-rds-dbcluster-scalingconfiguration-maxcapacity)" : Integer,
  "[MinCapacity](#cfn-rds-dbcluster-scalingconfiguration-mincapacity)" : Integer,
  "[SecondsBeforeTimeout](#cfn-rds-dbcluster-scalingconfiguration-secondsbeforetimeout)" : Integer,
  "[SecondsUntilAutoPause](#cfn-rds-dbcluster-scalingconfiguration-secondsuntilautopause)" : Integer,
  "[TimeoutAction](#cfn-rds-dbcluster-scalingconfiguration-timeoutaction)" : String
}
```

### YAML
<a name="aws-properties-rds-dbcluster-scalingconfiguration-syntax.yaml"></a>

```
  [AutoPause](#cfn-rds-dbcluster-scalingconfiguration-autopause): Boolean
  [MaxCapacity](#cfn-rds-dbcluster-scalingconfiguration-maxcapacity): Integer
  [MinCapacity](#cfn-rds-dbcluster-scalingconfiguration-mincapacity): Integer
  [SecondsBeforeTimeout](#cfn-rds-dbcluster-scalingconfiguration-secondsbeforetimeout): Integer
  [SecondsUntilAutoPause](#cfn-rds-dbcluster-scalingconfiguration-secondsuntilautopause): Integer
  [TimeoutAction](#cfn-rds-dbcluster-scalingconfiguration-timeoutaction): String
```

## Properties
<a name="aws-properties-rds-dbcluster-scalingconfiguration-properties"></a>

`AutoPause`  <a name="cfn-rds-dbcluster-scalingconfiguration-autopause"></a>
Indicates whether to allow or disallow automatic pause for an Aurora DB cluster in `serverless` DB engine mode. A DB cluster can be paused only when it's idle (it has no connections).  
If a DB cluster is paused for more than seven days, the DB cluster might be backed up with a snapshot. In this case, the DB cluster is restored when there is a request to connect to it.
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaxCapacity`  <a name="cfn-rds-dbcluster-scalingconfiguration-maxcapacity"></a>
The maximum capacity for an Aurora DB cluster in `serverless` DB engine mode.  
For Aurora MySQL, valid capacity values are `1`, `2`, `4`, `8`, `16`, `32`, `64`, `128`, and `256`.  
For Aurora PostgreSQL, valid capacity values are `2`, `4`, `8`, `16`, `32`, `64`, `192`, and `384`.  
The maximum capacity must be greater than or equal to the minimum capacity.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MinCapacity`  <a name="cfn-rds-dbcluster-scalingconfiguration-mincapacity"></a>
The minimum capacity for an Aurora DB cluster in `serverless` DB engine mode.  
For Aurora MySQL, valid capacity values are `1`, `2`, `4`, `8`, `16`, `32`, `64`, `128`, and `256`.  
For Aurora PostgreSQL, valid capacity values are `2`, `4`, `8`, `16`, `32`, `64`, `192`, and `384`.  
The minimum capacity must be less than or equal to the maximum capacity.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SecondsBeforeTimeout`  <a name="cfn-rds-dbcluster-scalingconfiguration-secondsbeforetimeout"></a>
The amount of time, in seconds, that Aurora Serverless v1 tries to find a scaling point to perform seamless scaling before enforcing the timeout action. The default is 300.  
Specify a value between 60 and 600 seconds.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SecondsUntilAutoPause`  <a name="cfn-rds-dbcluster-scalingconfiguration-secondsuntilautopause"></a>
The time, in seconds, before an Aurora DB cluster in `serverless` mode is paused.  
Specify a value between 300 and 86,400 seconds.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TimeoutAction`  <a name="cfn-rds-dbcluster-scalingconfiguration-timeoutaction"></a>
The action to take when the timeout is reached, either `ForceApplyCapacityChange` or `RollbackCapacityChange`.  
`ForceApplyCapacityChange` sets the capacity to the specified value as soon as possible.  
`RollbackCapacityChange`, the default, ignores the capacity change if a scaling point isn't found in the timeout period.  
If you specify `ForceApplyCapacityChange`, connections that prevent Aurora Serverless v1 from finding a scaling point might be dropped.
For more information, see [ Autoscaling for Aurora Serverless v1](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.how-it-works.html#aurora-serverless.how-it-works.auto-scaling) in the *Amazon Aurora User Guide*.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-rds-dbcluster-scalingconfiguration--examples"></a>

The following example specifies a scaling configuration for a DB cluster.

### Specifying a scaling configuration
<a name="aws-properties-rds-dbcluster-scalingconfiguration--examples--Specifying_a_scaling_configuration"></a>

For a sample template that configures an Aurora Serverless DB cluster, see [ Creating an Amazon Aurora Serverless DB Cluster](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#aws-resource-rds-dbcluster--examples--Creating_an_Amazon_Aurora_Serverless_DB_Cluster).

#### JSON
<a name="aws-properties-rds-dbcluster-scalingconfiguration--examples--Specifying_a_scaling_configuration--json"></a>

```
"ScalingConfiguration":{
   "AutoPause":true,
   "MinCapacity": 4,
   "MaxCapacity": 32,
   "SecondsUntilAutoPause":1000
}
```

#### YAML
<a name="aws-properties-rds-dbcluster-scalingconfiguration--examples--Specifying_a_scaling_configuration--yaml"></a>

```
ScalingConfiguration:
  AutoPause: true
  MinCapacity: 4
  MaxCapacity: 32
  SecondsUntilAutoPause: 1000
```

# AWS::RDS::DBCluster ServerlessV2ScalingConfiguration
<a name="aws-properties-rds-dbcluster-serverlessv2scalingconfiguration"></a>

The `ServerlessV2ScalingConfiguration` property type specifies the scaling configuration of an Aurora Serverless V2 DB cluster. For more information, see [Using Amazon Aurora Serverless v2](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.html) in the *Amazon Aurora User Guide*.

If you have an Aurora cluster, you must set this attribute before you add a DB instance that uses the `db.serverless` DB instance class. For more information, see [Clusters that use Aurora Serverless v2 must have a capacity range specified](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.requirements.html#aurora-serverless-v2.requirements.capacity-range) in the *Amazon Aurora User Guide*.

This property is only supported for Aurora Serverless v2. For Aurora Serverless v1, use the `ScalingConfiguration` property.

Valid for: Aurora Serverless v2 DB clusters

## Syntax
<a name="aws-properties-rds-dbcluster-serverlessv2scalingconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbcluster-serverlessv2scalingconfiguration-syntax.json"></a>

```
{
  "[MaxCapacity](#cfn-rds-dbcluster-serverlessv2scalingconfiguration-maxcapacity)" : Number,
  "[MinCapacity](#cfn-rds-dbcluster-serverlessv2scalingconfiguration-mincapacity)" : Number,
  "[SecondsUntilAutoPause](#cfn-rds-dbcluster-serverlessv2scalingconfiguration-secondsuntilautopause)" : Integer
}
```

### YAML
<a name="aws-properties-rds-dbcluster-serverlessv2scalingconfiguration-syntax.yaml"></a>

```
  [MaxCapacity](#cfn-rds-dbcluster-serverlessv2scalingconfiguration-maxcapacity): Number
  [MinCapacity](#cfn-rds-dbcluster-serverlessv2scalingconfiguration-mincapacity): Number
  [SecondsUntilAutoPause](#cfn-rds-dbcluster-serverlessv2scalingconfiguration-secondsuntilautopause): Integer
```

## Properties
<a name="aws-properties-rds-dbcluster-serverlessv2scalingconfiguration-properties"></a>

`MaxCapacity`  <a name="cfn-rds-dbcluster-serverlessv2scalingconfiguration-maxcapacity"></a>
The maximum number of Aurora capacity units (ACUs) for a DB instance in an Aurora Serverless v2 cluster. You can specify ACU values in half-step increments, such as 40, 40.5, 41, and so on. The largest value that you can use is 128.  
The maximum capacity must be higher than 0.5 ACUs. For more information, see [ Choosing the maximum Aurora Serverless v2 capacity setting for a cluster](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless-v2.setting-capacity.html#aurora-serverless-v2.max_capacity_considerations) in the *Amazon Aurora User Guide*.  
Aurora automatically sets certain parameters for Aurora Serverless V2 DB instances to values that depend on the maximum ACU value in the capacity range. When you update the maximum capacity value, the `ParameterApplyStatus` value for the DB instance changes to `pending-reboot`. You can update the parameter values by rebooting the DB instance after changing the capacity range.  
*Required*: No  
*Type*: Number  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MinCapacity`  <a name="cfn-rds-dbcluster-serverlessv2scalingconfiguration-mincapacity"></a>
The minimum number of Aurora capacity units (ACUs) for a DB instance in an Aurora Serverless v2 cluster. You can specify ACU values in half-step increments, such as 8, 8.5, 9, and so on. For Aurora versions that support the Aurora Serverless v2 auto-pause feature, the smallest value that you can use is 0. For versions that don't support Aurora Serverless v2 auto-pause, the smallest value that you can use is 0.5.   
*Required*: No  
*Type*: Number  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SecondsUntilAutoPause`  <a name="cfn-rds-dbcluster-serverlessv2scalingconfiguration-secondsuntilautopause"></a>
Specifies the number of seconds an Aurora Serverless v2 DB instance must be idle before Aurora attempts to automatically pause it.   
Specify a value between 300 seconds (five minutes) and 86,400 seconds (one day). The default is 300 seconds.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-rds-dbcluster-serverlessv2scalingconfiguration--examples"></a>

The following example specifies a scaling configuration for an Aurora Serverless v2 DB cluster.

### Specifying a scaling configuration for a Serverless v2 DB cluster
<a name="aws-properties-rds-dbcluster-serverlessv2scalingconfiguration--examples--Specifying_a_scaling_configuration_for_a_Serverless_v2_DB_cluster"></a>

#### JSON
<a name="aws-properties-rds-dbcluster-serverlessv2scalingconfiguration--examples--Specifying_a_scaling_configuration_for_a_Serverless_v2_DB_cluster--json"></a>

```
"ServerlessV2ScalingConfiguration":{
   "MinCapacity": 9,
   "MaxCapacity": 42
}
```

#### YAML
<a name="aws-properties-rds-dbcluster-serverlessv2scalingconfiguration--examples--Specifying_a_scaling_configuration_for_a_Serverless_v2_DB_cluster--yaml"></a>

```
ServerlessV2ScalingConfiguration:
  MinCapacity: 9
  MaxCapacity: 42
```

# AWS::RDS::DBCluster Tag
<a name="aws-properties-rds-dbcluster-tag"></a>

Metadata assigned to an Amazon RDS resource consisting of a key-value pair.

For more information, see [Tagging Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) in the *Amazon RDS User Guide* or [Tagging Amazon Aurora and Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html) in the *Amazon Aurora User Guide*. 

## Syntax
<a name="aws-properties-rds-dbcluster-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbcluster-tag-syntax.json"></a>

```
{
  "[Key](#cfn-rds-dbcluster-tag-key)" : String,
  "[Value](#cfn-rds-dbcluster-tag-value)" : String
}
```

### YAML
<a name="aws-properties-rds-dbcluster-tag-syntax.yaml"></a>

```
  [Key](#cfn-rds-dbcluster-tag-key): String
  [Value](#cfn-rds-dbcluster-tag-value): String
```

## Properties
<a name="aws-properties-rds-dbcluster-tag-properties"></a>

`Key`  <a name="cfn-rds-dbcluster-tag-key"></a>
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-rds-dbcluster-tag-value"></a>
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-rds-dbcluster-tag--examples"></a>

The following example specifies a tag for a DB cluster.

### 
<a name="aws-properties-rds-dbcluster-tag--examples--"></a>

#### JSON
<a name="aws-properties-rds-dbcluster-tag--examples----json"></a>

```
"Tags" : [
   {
      "Key" : "keyname1",
      "Value" : "value1"
   },
   {
      "Key" : "keyname2",
      "Value" : "value2"
   }
]
```

#### YAML
<a name="aws-properties-rds-dbcluster-tag--examples----yaml"></a>

```
Tags: 
  - Key: keyname1
    Value: value1
  - Key: keyname2
    Value: value2
```

# AWS::RDS::DBClusterParameterGroup
<a name="aws-resource-rds-dbclusterparametergroup"></a>

The `AWS::RDS::DBClusterParameterGroup` resource creates a new Amazon RDS DB cluster parameter group.

For information about configuring parameters for Amazon Aurora DB clusters, see [Working with parameter groups](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_WorkingWithParamGroups.html) in the *Amazon Aurora User Guide*.

**Note**  
If you apply a parameter group to a DB cluster, then its DB instances might need to reboot. This can result in an outage while the DB instances are rebooting.  
If you apply a change to parameter group associated with a stopped DB cluster, then the updated stack waits until the DB cluster is started.

## Syntax
<a name="aws-resource-rds-dbclusterparametergroup-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-rds-dbclusterparametergroup-syntax.json"></a>

```
{
  "Type" : "AWS::RDS::DBClusterParameterGroup",
  "Properties" : {
      "[DBClusterParameterGroupName](#cfn-rds-dbclusterparametergroup-dbclusterparametergroupname)" : String,
      "[Description](#cfn-rds-dbclusterparametergroup-description)" : String,
      "[Family](#cfn-rds-dbclusterparametergroup-family)" : String,
      "[Parameters](#cfn-rds-dbclusterparametergroup-parameters)" : Json,
      "[Tags](#cfn-rds-dbclusterparametergroup-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-rds-dbclusterparametergroup-syntax.yaml"></a>

```
Type: AWS::RDS::DBClusterParameterGroup
Properties:
  [DBClusterParameterGroupName](#cfn-rds-dbclusterparametergroup-dbclusterparametergroupname): String
  [Description](#cfn-rds-dbclusterparametergroup-description): String
  [Family](#cfn-rds-dbclusterparametergroup-family): String
  [Parameters](#cfn-rds-dbclusterparametergroup-parameters): Json
  [Tags](#cfn-rds-dbclusterparametergroup-tags): 
    - Tag
```

## Properties
<a name="aws-resource-rds-dbclusterparametergroup-properties"></a>

`DBClusterParameterGroupName`  <a name="cfn-rds-dbclusterparametergroup-dbclusterparametergroupname"></a>
The name of the DB cluster parameter group.  
Constraints:  
+ Must not match the name of an existing DB cluster parameter group.
This value is stored as a lowercase string.
*Required*: No  
*Type*: String  
*Pattern*: `^[a-zA-Z]{1}(?:-?[a-zA-Z0-9])*$`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Description`  <a name="cfn-rds-dbclusterparametergroup-description"></a>
The description for the DB cluster parameter group.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Family`  <a name="cfn-rds-dbclusterparametergroup-family"></a>
The DB cluster parameter group family name. A DB cluster parameter group can be associated with one and only one DB cluster parameter group family, and can be applied only to a DB cluster running a database engine and engine version compatible with that DB cluster parameter group family.  
 **Aurora MySQL**   
Example: `aurora-mysql5.7`, `aurora-mysql8.0`  
 **Aurora PostgreSQL**   
Example: `aurora-postgresql14`  
 **RDS for MySQL**   
Example: `mysql8.0`  
 **RDS for PostgreSQL**   
Example: `postgres13`  
To list all of the available parameter group families for a DB engine, use the following command:  
 `aws rds describe-db-engine-versions --query "DBEngineVersions[].DBParameterGroupFamily" --engine <engine>`   
For example, to list all of the available parameter group families for the Aurora PostgreSQL DB engine, use the following command:  
 `aws rds describe-db-engine-versions --query "DBEngineVersions[].DBParameterGroupFamily" --engine aurora-postgresql`   
The output contains duplicates.
The following are the valid DB engine values:  
+  `aurora-mysql` 
+  `aurora-postgresql` 
+  `mysql` 
+  `postgres` 
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Parameters`  <a name="cfn-rds-dbclusterparametergroup-parameters"></a>
Provides a list of parameters for the DB cluster parameter group.  
*Required*: Yes  
*Type*: Json  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-rds-dbclusterparametergroup-tags"></a>
Tags to assign to the DB cluster parameter group.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-rds-dbclusterparametergroup-tag.md)  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-rds-dbclusterparametergroup-return-values"></a>

### Ref
<a name="aws-resource-rds-dbclusterparametergroup-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the name of the DB cluster parameter group.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

## Examples
<a name="aws-resource-rds-dbclusterparametergroup--examples"></a>



### Create a parameter group for an Aurora MySQL DB cluster
<a name="aws-resource-rds-dbclusterparametergroup--examples--Create_a_parameter_group_for_an_Aurora_MySQL_DB_cluster"></a>

The following example creates a DB cluster parameter group for an Aurora MySQL DB cluster and sets the `time_zone` and `character_set_database` parameters: 

#### JSON
<a name="aws-resource-rds-dbclusterparametergroup--examples--Create_a_parameter_group_for_an_Aurora_MySQL_DB_cluster--json"></a>

```
"RDSDBClusterParameterGroup": {
        "Type": "AWS::RDS::DBClusterParameterGroup",
        "Properties": {
            "Description": "CloudFormation Sample Aurora Cluster Parameter Group",
            "Family": "aurora-mysql8.0",
            "Parameters": {
                "time_zone": "US/Eastern",
                "character_set_database": "utf32"
            }
        }
    }
```

#### YAML
<a name="aws-resource-rds-dbclusterparametergroup--examples--Create_a_parameter_group_for_an_Aurora_MySQL_DB_cluster--yaml"></a>

```
RDSDBClusterParameterGroup:
  Type: 'AWS::RDS::DBClusterParameterGroup'
  Properties:
    Description: CloudFormation Sample Aurora Cluster Parameter Group
    Family: aurora5.6
    Parameters:
      time_zone: US/Eastern
      character_set_database: utf32
```

# AWS::RDS::DBClusterParameterGroup Tag
<a name="aws-properties-rds-dbclusterparametergroup-tag"></a>

Metadata assigned to an Amazon RDS resource consisting of a key-value pair.

For more information, see [Tagging Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) in the *Amazon RDS User Guide* or [Tagging Amazon Aurora and Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html) in the *Amazon Aurora User Guide*. 

## Syntax
<a name="aws-properties-rds-dbclusterparametergroup-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbclusterparametergroup-tag-syntax.json"></a>

```
{
  "[Key](#cfn-rds-dbclusterparametergroup-tag-key)" : String,
  "[Value](#cfn-rds-dbclusterparametergroup-tag-value)" : String
}
```

### YAML
<a name="aws-properties-rds-dbclusterparametergroup-tag-syntax.yaml"></a>

```
  [Key](#cfn-rds-dbclusterparametergroup-tag-key): String
  [Value](#cfn-rds-dbclusterparametergroup-tag-value): String
```

## Properties
<a name="aws-properties-rds-dbclusterparametergroup-tag-properties"></a>

`Key`  <a name="cfn-rds-dbclusterparametergroup-tag-key"></a>
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-rds-dbclusterparametergroup-tag-value"></a>
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-rds-dbclusterparametergroup-tag--examples"></a>

The following example specifies a tag for a DB cluster parameter group.

### 
<a name="aws-properties-rds-dbclusterparametergroup-tag--examples--"></a>

#### JSON
<a name="aws-properties-rds-dbclusterparametergroup-tag--examples----json"></a>

```
"Tags" : [
   {
      "Key" : "keyname1",
      "Value" : "value1"
   },
   {
      "Key" : "keyname2",
      "Value" : "value2"
   }
]
```

#### YAML
<a name="aws-properties-rds-dbclusterparametergroup-tag--examples----yaml"></a>

```
Tags: 
  - Key: keyname1
    Value: value1
  - Key: keyname2
    Value: value2
```

# AWS::RDS::DBInstance
<a name="aws-resource-rds-dbinstance"></a>

The `AWS::RDS::DBInstance` resource creates an Amazon DB instance. The new DB instance can be an RDS DB instance, or it can be a DB instance in an Aurora DB cluster.

For more information about creating an RDS DB instance, see [Creating an Amazon RDS DB instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateDBInstance.html) in the *Amazon RDS User Guide*.

For more information about creating a DB instance in an Aurora DB cluster, see [ Creating an Amazon Aurora DB cluster](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.CreateInstance.html) in the *Amazon Aurora User Guide*.

If you import an existing DB instance, and the template configuration doesn't match the actual configuration of the DB instance, AWS CloudFormation applies the changes in the template during the import operation.

**Important**  
If a DB instance is deleted or replaced during an update, AWS CloudFormation deletes all automated snapshots. However, it retains manual DB snapshots. During an update that requires replacement, you can apply a stack policy to prevent DB instances from being replaced. For more information, see [Prevent Updates to Stack Resources](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html).

 **Updating DB instances** 

When properties labeled "*Update requires:*[Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)" are updated, AWS CloudFormation first creates a replacement DB instance, then changes references from other dependent resources to point to the replacement DB instance, and finally deletes the old DB instance.

**Important**  
We highly recommend that you take a snapshot of the database before updating the stack. If you don't, you lose the data when AWS CloudFormation replaces your DB instance. To preserve your data, perform the following procedure:  
Deactivate any applications that are using the DB instance so that there's no activity on the DB instance.
Create a snapshot of the DB instance. For more information, see [Creating a DB Snapshot](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateSnapshot.html).
If you want to restore your instance using a DB snapshot, modify the updated template with your DB instance changes and add the `DBSnapshotIdentifier` property with the ID of the DB snapshot that you want to use.  
After you restore a DB instance with a `DBSnapshotIdentifier` property, you can delete the `DBSnapshotIdentifier` property. When you specify this property for an update, the DB instance is not restored from the DB snapshot again, and the data in the database is not changed. However, if you don't specify the `DBSnapshotIdentifier` property, an empty DB instance is created, and the original DB instance is deleted. If you specify a property that is different from the previous snapshot restore property, a new DB instance is restored from the specified `DBSnapshotIdentifier` property, and the original DB instance is deleted.
Update the stack.

For more information about updating other properties of this resource, see ` [ModifyDBInstance](https://docs.aws.amazon.com//AmazonRDS/latest/APIReference/API_ModifyDBInstance.html) `. For more information about updating stacks, see [AWS CloudFormation Stacks Updates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks.html).

 **Deleting DB instances** 

For DB instances that are part of an Aurora DB cluster, you can set a deletion policy for your DB instance to control how AWS CloudFormation handles the DB instance when the stack is deleted. For Amazon RDS DB instances, you can choose to *retain* the DB instance, to *delete* the DB instance, or to *create a snapshot* of the DB instance. The default AWS CloudFormation behavior depends on the `DBClusterIdentifier` property:

1. For `AWS::RDS::DBInstance` resources that don't specify the `DBClusterIdentifier` property, AWS CloudFormation saves a snapshot of the DB instance.

1.  For `AWS::RDS::DBInstance` resources that do specify the `DBClusterIdentifier` property, AWS CloudFormation deletes the DB instance.

 For more information, see [DeletionPolicy Attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html).

## Syntax
<a name="aws-resource-rds-dbinstance-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-rds-dbinstance-syntax.json"></a>

```
{
  "Type" : "AWS::RDS::DBInstance",
  "Properties" : {
      "[AdditionalStorageVolumes](#cfn-rds-dbinstance-additionalstoragevolumes)" : [ AdditionalStorageVolume, ... ],
      "[AllocatedStorage](#cfn-rds-dbinstance-allocatedstorage)" : String,
      "[AllowMajorVersionUpgrade](#cfn-rds-dbinstance-allowmajorversionupgrade)" : Boolean,
      "[ApplyImmediately](#cfn-rds-dbinstance-applyimmediately)" : Boolean,
      "[AssociatedRoles](#cfn-rds-dbinstance-associatedroles)" : [ DBInstanceRole, ... ],
      "[AutomaticBackupReplicationKmsKeyId](#cfn-rds-dbinstance-automaticbackupreplicationkmskeyid)" : String,
      "[AutomaticBackupReplicationRegion](#cfn-rds-dbinstance-automaticbackupreplicationregion)" : String,
      "[AutomaticBackupReplicationRetentionPeriod](#cfn-rds-dbinstance-automaticbackupreplicationretentionperiod)" : Integer,
      "[AutoMinorVersionUpgrade](#cfn-rds-dbinstance-autominorversionupgrade)" : Boolean,
      "[AvailabilityZone](#cfn-rds-dbinstance-availabilityzone)" : String,
      "[BackupRetentionPeriod](#cfn-rds-dbinstance-backupretentionperiod)" : Integer,
      "[BackupTarget](#cfn-rds-dbinstance-backuptarget)" : String,
      "[CACertificateIdentifier](#cfn-rds-dbinstance-cacertificateidentifier)" : String,
      "[CertificateRotationRestart](#cfn-rds-dbinstance-certificaterotationrestart)" : Boolean,
      "[CharacterSetName](#cfn-rds-dbinstance-charactersetname)" : String,
      "[CopyTagsToSnapshot](#cfn-rds-dbinstance-copytagstosnapshot)" : Boolean,
      "[CustomIAMInstanceProfile](#cfn-rds-dbinstance-customiaminstanceprofile)" : String,
      "[DatabaseInsightsMode](#cfn-rds-dbinstance-databaseinsightsmode)" : String,
      "[DBClusterIdentifier](#cfn-rds-dbinstance-dbclusteridentifier)" : String,
      "[DBClusterSnapshotIdentifier](#cfn-rds-dbinstance-dbclustersnapshotidentifier)" : String,
      "[DBInstanceClass](#cfn-rds-dbinstance-dbinstanceclass)" : String,
      "[DBInstanceIdentifier](#cfn-rds-dbinstance-dbinstanceidentifier)" : String,
      "[DBName](#cfn-rds-dbinstance-dbname)" : String,
      "[DBParameterGroupName](#cfn-rds-dbinstance-dbparametergroupname)" : String,
      "[DBSecurityGroups](#cfn-rds-dbinstance-dbsecuritygroups)" : [ String, ... ],
      "[DBSnapshotIdentifier](#cfn-rds-dbinstance-dbsnapshotidentifier)" : String,
      "[DBSubnetGroupName](#cfn-rds-dbinstance-dbsubnetgroupname)" : String,
      "[DBSystemId](#cfn-rds-dbinstance-dbsystemid)" : String,
      "[DedicatedLogVolume](#cfn-rds-dbinstance-dedicatedlogvolume)" : Boolean,
      "[DeleteAutomatedBackups](#cfn-rds-dbinstance-deleteautomatedbackups)" : Boolean,
      "[DeletionProtection](#cfn-rds-dbinstance-deletionprotection)" : Boolean,
      "[Domain](#cfn-rds-dbinstance-domain)" : String,
      "[DomainAuthSecretArn](#cfn-rds-dbinstance-domainauthsecretarn)" : String,
      "[DomainDnsIps](#cfn-rds-dbinstance-domaindnsips)" : [ String, ... ],
      "[DomainFqdn](#cfn-rds-dbinstance-domainfqdn)" : String,
      "[DomainIAMRoleName](#cfn-rds-dbinstance-domainiamrolename)" : String,
      "[DomainOu](#cfn-rds-dbinstance-domainou)" : String,
      "[EnableCloudwatchLogsExports](#cfn-rds-dbinstance-enablecloudwatchlogsexports)" : [ String, ... ],
      "[EnableIAMDatabaseAuthentication](#cfn-rds-dbinstance-enableiamdatabaseauthentication)" : Boolean,
      "[EnablePerformanceInsights](#cfn-rds-dbinstance-enableperformanceinsights)" : Boolean,
      "[Engine](#cfn-rds-dbinstance-engine)" : String,
      "[EngineLifecycleSupport](#cfn-rds-dbinstance-enginelifecyclesupport)" : String,
      "[EngineVersion](#cfn-rds-dbinstance-engineversion)" : String,
      "[Iops](#cfn-rds-dbinstance-iops)" : Integer,
      "[KmsKeyId](#cfn-rds-dbinstance-kmskeyid)" : String,
      "[LicenseModel](#cfn-rds-dbinstance-licensemodel)" : String,
      "[ManageMasterUserPassword](#cfn-rds-dbinstance-managemasteruserpassword)" : Boolean,
      "[MasterUserAuthenticationType](#cfn-rds-dbinstance-masteruserauthenticationtype)" : String,
      "[MasterUsername](#cfn-rds-dbinstance-masterusername)" : String,
      "[MasterUserPassword](#cfn-rds-dbinstance-masteruserpassword)" : String,
      "[MasterUserSecret](#cfn-rds-dbinstance-masterusersecret)" : MasterUserSecret,
      "[MaxAllocatedStorage](#cfn-rds-dbinstance-maxallocatedstorage)" : Integer,
      "[MonitoringInterval](#cfn-rds-dbinstance-monitoringinterval)" : Integer,
      "[MonitoringRoleArn](#cfn-rds-dbinstance-monitoringrolearn)" : String,
      "[MultiAZ](#cfn-rds-dbinstance-multiaz)" : Boolean,
      "[NcharCharacterSetName](#cfn-rds-dbinstance-ncharcharactersetname)" : String,
      "[NetworkType](#cfn-rds-dbinstance-networktype)" : String,
      "[OptionGroupName](#cfn-rds-dbinstance-optiongroupname)" : String,
      "[PerformanceInsightsKMSKeyId](#cfn-rds-dbinstance-performanceinsightskmskeyid)" : String,
      "[PerformanceInsightsRetentionPeriod](#cfn-rds-dbinstance-performanceinsightsretentionperiod)" : Integer,
      "[Port](#cfn-rds-dbinstance-port)" : String,
      "[PreferredBackupWindow](#cfn-rds-dbinstance-preferredbackupwindow)" : String,
      "[PreferredMaintenanceWindow](#cfn-rds-dbinstance-preferredmaintenancewindow)" : String,
      "[ProcessorFeatures](#cfn-rds-dbinstance-processorfeatures)" : [ ProcessorFeature, ... ],
      "[PromotionTier](#cfn-rds-dbinstance-promotiontier)" : Integer,
      "[PubliclyAccessible](#cfn-rds-dbinstance-publiclyaccessible)" : Boolean,
      "[ReplicaMode](#cfn-rds-dbinstance-replicamode)" : String,
      "[RestoreTime](#cfn-rds-dbinstance-restoretime)" : String,
      "[SourceDBClusterIdentifier](#cfn-rds-dbinstance-sourcedbclusteridentifier)" : String,
      "[SourceDBInstanceAutomatedBackupsArn](#cfn-rds-dbinstance-sourcedbinstanceautomatedbackupsarn)" : String,
      "[SourceDBInstanceIdentifier](#cfn-rds-dbinstance-sourcedbinstanceidentifier)" : String,
      "[SourceDbiResourceId](#cfn-rds-dbinstance-sourcedbiresourceid)" : String,
      "[SourceRegion](#cfn-rds-dbinstance-sourceregion)" : String,
      "[StorageEncrypted](#cfn-rds-dbinstance-storageencrypted)" : Boolean,
      "[StorageThroughput](#cfn-rds-dbinstance-storagethroughput)" : Integer,
      "[StorageType](#cfn-rds-dbinstance-storagetype)" : String,
      "[Tags](#cfn-rds-dbinstance-tags)" : [ Tag, ... ],
      "[Timezone](#cfn-rds-dbinstance-timezone)" : String,
      "[UseDefaultProcessorFeatures](#cfn-rds-dbinstance-usedefaultprocessorfeatures)" : Boolean,
      "[UseLatestRestorableTime](#cfn-rds-dbinstance-uselatestrestorabletime)" : Boolean,
      "[VPCSecurityGroups](#cfn-rds-dbinstance-vpcsecuritygroups)" : [ String, ... ]
    }
}
```

### YAML
<a name="aws-resource-rds-dbinstance-syntax.yaml"></a>

```
Type: AWS::RDS::DBInstance
Properties:
  [AdditionalStorageVolumes](#cfn-rds-dbinstance-additionalstoragevolumes): 
    - AdditionalStorageVolume
  [AllocatedStorage](#cfn-rds-dbinstance-allocatedstorage): String
  [AllowMajorVersionUpgrade](#cfn-rds-dbinstance-allowmajorversionupgrade): Boolean
  [ApplyImmediately](#cfn-rds-dbinstance-applyimmediately): Boolean
  [AssociatedRoles](#cfn-rds-dbinstance-associatedroles): 
    - DBInstanceRole
  [AutomaticBackupReplicationKmsKeyId](#cfn-rds-dbinstance-automaticbackupreplicationkmskeyid): String
  [AutomaticBackupReplicationRegion](#cfn-rds-dbinstance-automaticbackupreplicationregion): String
  [AutomaticBackupReplicationRetentionPeriod](#cfn-rds-dbinstance-automaticbackupreplicationretentionperiod): Integer
  [AutoMinorVersionUpgrade](#cfn-rds-dbinstance-autominorversionupgrade): Boolean
  [AvailabilityZone](#cfn-rds-dbinstance-availabilityzone): String
  [BackupRetentionPeriod](#cfn-rds-dbinstance-backupretentionperiod): Integer
  [BackupTarget](#cfn-rds-dbinstance-backuptarget): String
  [CACertificateIdentifier](#cfn-rds-dbinstance-cacertificateidentifier): String
  [CertificateRotationRestart](#cfn-rds-dbinstance-certificaterotationrestart): Boolean
  [CharacterSetName](#cfn-rds-dbinstance-charactersetname): String
  [CopyTagsToSnapshot](#cfn-rds-dbinstance-copytagstosnapshot): Boolean
  [CustomIAMInstanceProfile](#cfn-rds-dbinstance-customiaminstanceprofile): String
  [DatabaseInsightsMode](#cfn-rds-dbinstance-databaseinsightsmode): String
  [DBClusterIdentifier](#cfn-rds-dbinstance-dbclusteridentifier): String
  [DBClusterSnapshotIdentifier](#cfn-rds-dbinstance-dbclustersnapshotidentifier): String
  [DBInstanceClass](#cfn-rds-dbinstance-dbinstanceclass): String
  [DBInstanceIdentifier](#cfn-rds-dbinstance-dbinstanceidentifier): String
  [DBName](#cfn-rds-dbinstance-dbname): String
  [DBParameterGroupName](#cfn-rds-dbinstance-dbparametergroupname): String
  [DBSecurityGroups](#cfn-rds-dbinstance-dbsecuritygroups): 
    - String
  [DBSnapshotIdentifier](#cfn-rds-dbinstance-dbsnapshotidentifier): String
  [DBSubnetGroupName](#cfn-rds-dbinstance-dbsubnetgroupname): String
  [DBSystemId](#cfn-rds-dbinstance-dbsystemid): String
  [DedicatedLogVolume](#cfn-rds-dbinstance-dedicatedlogvolume): Boolean
  [DeleteAutomatedBackups](#cfn-rds-dbinstance-deleteautomatedbackups): Boolean
  [DeletionProtection](#cfn-rds-dbinstance-deletionprotection): Boolean
  [Domain](#cfn-rds-dbinstance-domain): String
  [DomainAuthSecretArn](#cfn-rds-dbinstance-domainauthsecretarn): String
  [DomainDnsIps](#cfn-rds-dbinstance-domaindnsips): 
    - String
  [DomainFqdn](#cfn-rds-dbinstance-domainfqdn): String
  [DomainIAMRoleName](#cfn-rds-dbinstance-domainiamrolename): String
  [DomainOu](#cfn-rds-dbinstance-domainou): String
  [EnableCloudwatchLogsExports](#cfn-rds-dbinstance-enablecloudwatchlogsexports): 
    - String
  [EnableIAMDatabaseAuthentication](#cfn-rds-dbinstance-enableiamdatabaseauthentication): Boolean
  [EnablePerformanceInsights](#cfn-rds-dbinstance-enableperformanceinsights): Boolean
  [Engine](#cfn-rds-dbinstance-engine): String
  [EngineLifecycleSupport](#cfn-rds-dbinstance-enginelifecyclesupport): String
  [EngineVersion](#cfn-rds-dbinstance-engineversion): String
  [Iops](#cfn-rds-dbinstance-iops): Integer
  [KmsKeyId](#cfn-rds-dbinstance-kmskeyid): String
  [LicenseModel](#cfn-rds-dbinstance-licensemodel): String
  [ManageMasterUserPassword](#cfn-rds-dbinstance-managemasteruserpassword): Boolean
  [MasterUserAuthenticationType](#cfn-rds-dbinstance-masteruserauthenticationtype): String
  [MasterUsername](#cfn-rds-dbinstance-masterusername): String
  [MasterUserPassword](#cfn-rds-dbinstance-masteruserpassword): String
  [MasterUserSecret](#cfn-rds-dbinstance-masterusersecret): 
    MasterUserSecret
  [MaxAllocatedStorage](#cfn-rds-dbinstance-maxallocatedstorage): Integer
  [MonitoringInterval](#cfn-rds-dbinstance-monitoringinterval): Integer
  [MonitoringRoleArn](#cfn-rds-dbinstance-monitoringrolearn): String
  [MultiAZ](#cfn-rds-dbinstance-multiaz): Boolean
  [NcharCharacterSetName](#cfn-rds-dbinstance-ncharcharactersetname): String
  [NetworkType](#cfn-rds-dbinstance-networktype): String
  [OptionGroupName](#cfn-rds-dbinstance-optiongroupname): String
  [PerformanceInsightsKMSKeyId](#cfn-rds-dbinstance-performanceinsightskmskeyid): String
  [PerformanceInsightsRetentionPeriod](#cfn-rds-dbinstance-performanceinsightsretentionperiod): Integer
  [Port](#cfn-rds-dbinstance-port): String
  [PreferredBackupWindow](#cfn-rds-dbinstance-preferredbackupwindow): String
  [PreferredMaintenanceWindow](#cfn-rds-dbinstance-preferredmaintenancewindow): String
  [ProcessorFeatures](#cfn-rds-dbinstance-processorfeatures): 
    - ProcessorFeature
  [PromotionTier](#cfn-rds-dbinstance-promotiontier): Integer
  [PubliclyAccessible](#cfn-rds-dbinstance-publiclyaccessible): Boolean
  [ReplicaMode](#cfn-rds-dbinstance-replicamode): String
  [RestoreTime](#cfn-rds-dbinstance-restoretime): String
  [SourceDBClusterIdentifier](#cfn-rds-dbinstance-sourcedbclusteridentifier): String
  [SourceDBInstanceAutomatedBackupsArn](#cfn-rds-dbinstance-sourcedbinstanceautomatedbackupsarn): String
  [SourceDBInstanceIdentifier](#cfn-rds-dbinstance-sourcedbinstanceidentifier): String
  [SourceDbiResourceId](#cfn-rds-dbinstance-sourcedbiresourceid): String
  [SourceRegion](#cfn-rds-dbinstance-sourceregion): String
  [StorageEncrypted](#cfn-rds-dbinstance-storageencrypted): Boolean
  [StorageThroughput](#cfn-rds-dbinstance-storagethroughput): Integer
  [StorageType](#cfn-rds-dbinstance-storagetype): String
  [Tags](#cfn-rds-dbinstance-tags): 
    - Tag
  [Timezone](#cfn-rds-dbinstance-timezone): String
  [UseDefaultProcessorFeatures](#cfn-rds-dbinstance-usedefaultprocessorfeatures): Boolean
  [UseLatestRestorableTime](#cfn-rds-dbinstance-uselatestrestorabletime): Boolean
  [VPCSecurityGroups](#cfn-rds-dbinstance-vpcsecuritygroups): 
    - String
```

## Properties
<a name="aws-resource-rds-dbinstance-properties"></a>

`AdditionalStorageVolumes`  <a name="cfn-rds-dbinstance-additionalstoragevolumes"></a>
The additional storage volumes associated with the DB instance. RDS supports additional storage volumes for RDS for Oracle and RDS for SQL Server.  
*Required*: No  
*Type*: Array of [AdditionalStorageVolume](aws-properties-rds-dbinstance-additionalstoragevolume.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AllocatedStorage`  <a name="cfn-rds-dbinstance-allocatedstorage"></a>
The amount of storage in gibibytes (GiB) to be initially allocated for the database instance.  
If any value is set in the `Iops` parameter, `AllocatedStorage` must be at least 100 GiB, which corresponds to the minimum Iops value of 1,000. If you increase the `Iops` value (in 1,000 IOPS increments), then you must also increase the `AllocatedStorage` value (in 100-GiB increments). 
 **Amazon Aurora**   
Not applicable. Aurora cluster volumes automatically grow as the amount of data in your database increases, though you are only charged for the space that you use in an Aurora cluster volume.  
 **Db2**   
Constraints to the amount of storage for each storage type are the following:  
+ General Purpose (SSD) storage (gp3): Must be an integer from 20 to 64000.
+ Provisioned IOPS storage (io1): Must be an integer from 100 to 64000.
 **MySQL**   
Constraints to the amount of storage for each storage type are the following:   
+ General Purpose (SSD) storage (gp2): Must be an integer from 20 to 65536.
+ Provisioned IOPS storage (io1): Must be an integer from 100 to 65536.
+ Magnetic storage (standard): Must be an integer from 5 to 3072.
 **MariaDB**   
Constraints to the amount of storage for each storage type are the following:   
+ General Purpose (SSD) storage (gp2): Must be an integer from 20 to 65536.
+ Provisioned IOPS storage (io1): Must be an integer from 100 to 65536.
+ Magnetic storage (standard): Must be an integer from 5 to 3072.
 **PostgreSQL**   
Constraints to the amount of storage for each storage type are the following:   
+ General Purpose (SSD) storage (gp2): Must be an integer from 20 to 65536.
+ Provisioned IOPS storage (io1): Must be an integer from 100 to 65536.
+ Magnetic storage (standard): Must be an integer from 5 to 3072.
 **Oracle**   
Constraints to the amount of storage for each storage type are the following:   
+ General Purpose (SSD) storage (gp2): Must be an integer from 20 to 65536.
+ Provisioned IOPS storage (io1): Must be an integer from 100 to 65536.
+ Magnetic storage (standard): Must be an integer from 10 to 3072.
 **SQL Server**   
Constraints to the amount of storage for each storage type are the following:   
+ General Purpose (SSD) storage (gp2):
  + Enterprise and Standard editions: Must be an integer from 20 to 16384.
  + Web and Express editions: Must be an integer from 20 to 16384.
+ Provisioned IOPS storage (io1):
  + Enterprise and Standard editions: Must be an integer from 20 to 16384.
  + Web and Express editions: Must be an integer from 20 to 16384.
+ Magnetic storage (standard):
  + Enterprise and Standard editions: Must be an integer from 20 to 1024.
  + Web and Express editions: Must be an integer from 20 to 1024.
*Required*: Conditional  
*Type*: String  
*Pattern*: `^[0-9]*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AllowMajorVersionUpgrade`  <a name="cfn-rds-dbinstance-allowmajorversionupgrade"></a>
A value that indicates whether major version upgrades are allowed. Changing this parameter doesn't result in an outage and the change is asynchronously applied as soon as possible.  
Constraints: Major version upgrades must be allowed when specifying a value for the `EngineVersion` parameter that is a different major version than the DB instance's current version.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ApplyImmediately`  <a name="cfn-rds-dbinstance-applyimmediately"></a>
Specifies whether changes to the DB instance and any pending modifications are applied immediately, regardless of the `PreferredMaintenanceWindow` setting. If set to `false`, changes are applied during the next maintenance window. Until RDS applies the changes, the DB instance remains in a drift state. As a result, the configuration doesn't fully reflect the requested modifications and temporarily diverges from the intended state.  
In addition to the settings described in [Modifying a DB instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.DBInstance.Modifying.html), this property also determines whether the DB instance reboots when a static parameter is modified in the associated DB parameter group.  
Default: `true`  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AssociatedRoles`  <a name="cfn-rds-dbinstance-associatedroles"></a>
 The AWS Identity and Access Management (IAM) roles associated with the DB instance.   
 **Amazon Aurora**   
Not applicable. The associated roles are managed by the DB cluster.  
*Required*: No  
*Type*: Array of [DBInstanceRole](aws-properties-rds-dbinstance-dbinstancerole.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AutomaticBackupReplicationKmsKeyId`  <a name="cfn-rds-dbinstance-automaticbackupreplicationkmskeyid"></a>
The AWS KMS key identifier for encryption of the replicated automated backups. The KMS key ID is the Amazon Resource Name (ARN) for the KMS encryption key in the destination AWS Region, for example, `arn:aws:kms:us-east-1:123456789012:key/AKIAIOSFODNN7EXAMPLE`.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AutomaticBackupReplicationRegion`  <a name="cfn-rds-dbinstance-automaticbackupreplicationregion"></a>
The AWS Region associated with the automated backup.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AutomaticBackupReplicationRetentionPeriod`  <a name="cfn-rds-dbinstance-automaticbackupreplicationretentionperiod"></a>
The retention period for automated backups in a different AWS Region. Use this parameter to set a unique retention period that only applies to cross-Region automated backups. To enable automated backups in a different Region, specify a positive value for the `AutomaticBackupReplicationRegion` parameter.   
If not specified, this parameter defaults to the value of the `BackupRetentionPeriod` parameter. The maximum allowed value is 35.  
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AutoMinorVersionUpgrade`  <a name="cfn-rds-dbinstance-autominorversionupgrade"></a>
A value that indicates whether minor engine upgrades are applied automatically to the DB instance during the maintenance window. By default, minor engine upgrades are applied automatically.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`AvailabilityZone`  <a name="cfn-rds-dbinstance-availabilityzone"></a>
The Availability Zone (AZ) where the database will be created. For information on AWS Regions and Availability Zones, see [Regions and Availability Zones](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html).  
For Amazon Aurora, each Aurora DB cluster hosts copies of its storage in three separate Availability Zones. Specify one of these Availability Zones. Aurora automatically chooses an appropriate Availability Zone if you don't specify one.  
Default: A random, system-chosen Availability Zone in the endpoint's AWS Region.  
Constraints:  
+ The `AvailabilityZone` parameter can't be specified if the DB instance is a Multi-AZ deployment.
+ The specified Availability Zone must be in the same AWS Region as the current endpoint.
Example: `us-east-1d`  
*Required*: No  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`BackupRetentionPeriod`  <a name="cfn-rds-dbinstance-backupretentionperiod"></a>
The number of days for which automated backups are retained. Setting this parameter to a positive number enables backups. Setting this parameter to 0 disables automated backups.  
 **Amazon Aurora**   
Not applicable. The retention period for automated backups is managed by the DB cluster.  
Default: 1  
Constraints:  
+ Must be a value from 0 to 35
+ Can't be set to 0 if the DB instance is a source to read replicas
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`BackupTarget`  <a name="cfn-rds-dbinstance-backuptarget"></a>
The location for storing automated backups and manual snapshots.  
Valid Values:  
+ `local` (Dedicated Local Zone)
+ `outposts` (AWS Outposts)
+ `region` (AWS Region)
Default: `region`  
For more information, see [Working with Amazon RDS on AWS Outposts](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html) in the *Amazon RDS User Guide*.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`CACertificateIdentifier`  <a name="cfn-rds-dbinstance-cacertificateidentifier"></a>
The identifier of the CA certificate for this DB instance.  
For more information, see [Using SSL/TLS to encrypt a connection to a DB instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html) in the *Amazon RDS User Guide* and [ Using SSL/TLS to encrypt a connection to a DB cluster](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.SSL.html) in the *Amazon Aurora User Guide*.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CertificateRotationRestart`  <a name="cfn-rds-dbinstance-certificaterotationrestart"></a>
Specifies whether the DB instance is restarted when you rotate your SSL/TLS certificate.  
By default, the DB instance is restarted when you rotate your SSL/TLS certificate. The certificate is not updated until the DB instance is restarted.  
Set this parameter only if you are *not* using SSL/TLS to connect to the DB instance.
If you are using SSL/TLS to connect to the DB instance, follow the appropriate instructions for your DB engine to rotate your SSL/TLS certificate:  
+ For more information about rotating your SSL/TLS certificate for RDS DB engines, see [ Rotating Your SSL/TLS Certificate.](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL-certificate-rotation.html) in the *Amazon RDS User Guide.*
+ For more information about rotating your SSL/TLS certificate for Aurora DB engines, see [ Rotating Your SSL/TLS Certificate](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.SSL-certificate-rotation.html) in the *Amazon Aurora User Guide*.
This setting doesn't apply to RDS Custom DB instances.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CharacterSetName`  <a name="cfn-rds-dbinstance-charactersetname"></a>
For supported engines, indicates that the DB instance should be associated with the specified character set.  
 **Amazon Aurora**   
Not applicable. The character set is managed by the DB cluster. For more information, see [AWS::RDS::DBCluster](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html).  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`CopyTagsToSnapshot`  <a name="cfn-rds-dbinstance-copytagstosnapshot"></a>
Specifies whether to copy tags from the DB instance to snapshots of the DB instance. By default, tags are not copied.  
This setting doesn't apply to Amazon Aurora DB instances. Copying tags to snapshots is managed by the DB cluster. Setting this value for an Aurora DB instance has no effect on the DB cluster setting.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CustomIAMInstanceProfile`  <a name="cfn-rds-dbinstance-customiaminstanceprofile"></a>
The instance profile associated with the underlying Amazon EC2 instance of an RDS Custom DB instance.  
This setting is required for RDS Custom.  
Constraints:  
+ The profile must exist in your account.
+ The profile must have an IAM role that Amazon EC2 has permissions to assume.
+ The instance profile name and the associated IAM role name must start with the prefix `AWSRDSCustom`.
For the list of permissions required for the IAM role, see [ Configure IAM and your VPC](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-setup-orcl.html#custom-setup-orcl.iam-vpc) in the *Amazon RDS User Guide*.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DatabaseInsightsMode`  <a name="cfn-rds-dbinstance-databaseinsightsmode"></a>
The mode of Database Insights to enable for the DB instance.  
Aurora DB instances inherit this value from the DB cluster, so you can't change this value.
*Required*: No  
*Type*: String  
*Allowed values*: `standard | advanced`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DBClusterIdentifier`  <a name="cfn-rds-dbinstance-dbclusteridentifier"></a>
The identifier of the DB cluster that this DB instance will belong to.  
This setting doesn't apply to RDS Custom DB instances.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DBClusterSnapshotIdentifier`  <a name="cfn-rds-dbinstance-dbclustersnapshotidentifier"></a>
The identifier for the Multi-AZ DB cluster snapshot to restore from.  
For more information on Multi-AZ DB clusters, see [ Multi-AZ DB cluster deployments](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html) in the *Amazon RDS User Guide*.  
Constraints:  
+ Must match the identifier of an existing Multi-AZ DB cluster snapshot.
+ Can't be specified when `DBSnapshotIdentifier` is specified.
+ Must be specified when `DBSnapshotIdentifier` isn't specified.
+ If you are restoring from a shared manual Multi-AZ DB cluster snapshot, the `DBClusterSnapshotIdentifier` must be the ARN of the shared snapshot.
+ Can't be the identifier of an Aurora DB cluster snapshot.
*Required*: No  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`DBInstanceClass`  <a name="cfn-rds-dbinstance-dbinstanceclass"></a>
The compute and memory capacity of the DB instance, for example `db.m5.large`. Not all DB instance classes are available in all AWS Regions, or for all database engines. For the full list of DB instance classes, and availability for your engine, see [DB instance classes](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html) in the *Amazon RDS User Guide* or [Aurora DB instance classes](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.DBInstanceClass.html) in the *Amazon Aurora User Guide*.  
*Required*: No  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`DBInstanceIdentifier`  <a name="cfn-rds-dbinstance-dbinstanceidentifier"></a>
A name for the DB instance. If you specify a name, AWS CloudFormation converts it to lowercase. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the DB instance. For more information, see [Name Type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-name.html).  
For information about constraints that apply to DB instance identifiers, see [Naming constraints in Amazon RDS](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Limits.html#RDS_Limits.Constraints) in the *Amazon RDS User Guide*.  
If you specify a name, you can't perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name. 
*Required*: No  
*Type*: String  
*Pattern*: `^$|^[a-zA-Z]{1}(?:-?[a-zA-Z0-9]){0,62}$`  
*Minimum*: `1`  
*Maximum*: `63`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DBName`  <a name="cfn-rds-dbinstance-dbname"></a>
The meaning of this parameter differs according to the database engine you use.  
If you specify the ` [ DBSnapshotIdentifier](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-dbsnapshotidentifier) ` property, this property only applies to RDS for Oracle.
 **Amazon Aurora**   
Not applicable. The database name is managed by the DB cluster.  
 **Db2**   
The name of the database to create when the DB instance is created. If this parameter isn't specified, no database is created in the DB instance.  
Constraints:  
+ Must contain 1 to 64 letters or numbers.
+ Must begin with a letter. Subsequent characters can be letters, underscores, or digits (0-9).
+ Can't be a word reserved by the specified database engine.
 **MySQL**   
The name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance.  
Constraints:  
+ Must contain 1 to 64 letters or numbers.
+ Can't be a word reserved by the specified database engine
 **MariaDB**   
The name of the database to create when the DB instance is created. If this parameter is not specified, no database is created in the DB instance.  
Constraints:  
+ Must contain 1 to 64 letters or numbers.
+ Can't be a word reserved by the specified database engine
 **PostgreSQL**   
The name of the database to create when the DB instance is created. If this parameter is not specified, the default `postgres` database is created in the DB instance.  
Constraints:  
+ Must begin with a letter. Subsequent characters can be letters, underscores, or digits (0-9).
+ Must contain 1 to 63 characters.
+ Can't be a word reserved by the specified database engine
 **Oracle**   
The Oracle System ID (SID) of the created DB instance. If you specify `null`, the default value `ORCL` is used. You can't specify the string NULL, or any other reserved word, for `DBName`.   
Default: `ORCL`  
Constraints:  
+ Can't be longer than 8 characters
 **SQL Server**   
Not applicable. Must be null.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DBParameterGroupName`  <a name="cfn-rds-dbinstance-dbparametergroupname"></a>
The name of an existing DB parameter group or a reference to an [AWS::RDS::DBParameterGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-dbparametergroup.html) resource created in the template.  
To list all of the available DB parameter group names, use the following command:  
 `aws rds describe-db-parameter-groups --query "DBParameterGroups[].DBParameterGroupName" --output text`   
If any of the data members of the referenced parameter group are changed during an update, the DB instance might need to be restarted, which causes some interruption. If the parameter group contains static parameters, whether they were changed or not, an update triggers a reboot.
If you don't specify a value for `DBParameterGroupName` property, the default DB parameter group for the specified engine and engine version is used.  
*Required*: No  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`DBSecurityGroups`  <a name="cfn-rds-dbinstance-dbsecuritygroups"></a>
A list of the DB security groups to assign to the DB instance. The list can include both the name of existing DB security groups or references to AWS::RDS::DBSecurityGroup resources created in the template.  
 If you set DBSecurityGroups, you must not set VPCSecurityGroups, and vice versa. Also, note that the DBSecurityGroups property exists only for backwards compatibility with older regions and is no longer recommended for providing security information to an RDS DB instance. Instead, use VPCSecurityGroups.  
If you specify this property, AWS CloudFormation sends only the following properties (if specified) to Amazon RDS during create operations:  
+  `AllocatedStorage` 
+  `AutoMinorVersionUpgrade` 
+  `AvailabilityZone` 
+  `BackupRetentionPeriod` 
+  `CharacterSetName` 
+  `DBInstanceClass` 
+  `DBName` 
+  `DBParameterGroupName` 
+  `DBSecurityGroups` 
+  `DBSubnetGroupName` 
+  `Engine` 
+  `EngineVersion` 
+  `Iops` 
+  `LicenseModel` 
+  `MasterUsername` 
+  `MasterUserPassword` 
+  `MultiAZ` 
+  `OptionGroupName` 
+  `PreferredBackupWindow` 
+  `PreferredMaintenanceWindow` 
All other properties are ignored. Specify a virtual private cloud (VPC) security group if you want to submit other properties, such as `StorageType`, `StorageEncrypted`, or `KmsKeyId`. If you're already using the `DBSecurityGroups` property, you can't use these other properties by updating your DB instance to use a VPC security group. You must recreate the DB instance.
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DBSnapshotIdentifier`  <a name="cfn-rds-dbinstance-dbsnapshotidentifier"></a>
The name or Amazon Resource Name (ARN) of the DB snapshot that's used to restore the DB instance. If you're restoring from a shared manual DB snapshot, you must specify the ARN of the snapshot.  
By specifying this property, you can create a DB instance from the specified DB snapshot. If the `DBSnapshotIdentifier` property is an empty string or the `AWS::RDS::DBInstance` declaration has no `DBSnapshotIdentifier` property, AWS CloudFormation creates a new database. If the property contains a value (other than an empty string), AWS CloudFormation creates a database from the specified snapshot. If a snapshot with the specified name doesn't exist, AWS CloudFormation can't create the database and it rolls back the stack.  
Some DB instance properties aren't valid when you restore from a snapshot, such as the `MasterUsername` and `MasterUserPassword` properties, and the point-in-time recovery properties `RestoreTime` and `UseLatestRestorableTime`. For information about the properties that you can specify, see the [https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_RestoreDBInstanceFromDBSnapshot.html](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_RestoreDBInstanceFromDBSnapshot.html) action in the *Amazon RDS API Reference*.  
After you restore a DB instance with a `DBSnapshotIdentifier` property, you must specify the same `DBSnapshotIdentifier` property for any future updates to the DB instance. When you specify this property for an update, the DB instance is not restored from the DB snapshot again, and the data in the database is not changed. However, if you don't specify the `DBSnapshotIdentifier` property, an empty DB instance is created, and the original DB instance is deleted. If you specify a property that is different from the previous snapshot restore property, a new DB instance is restored from the specified `DBSnapshotIdentifier` property, and the original DB instance is deleted.  
If you specify the `DBSnapshotIdentifier` property to restore a DB instance (as opposed to specifying it for DB instance updates), then don't specify the following properties:  
+  `CharacterSetName` 
+  `DBClusterIdentifier` 
+  `DBName` 
+  `KmsKeyId` 
+  `MasterUsername` 
+  `MasterUserPassword` 
+  `PromotionTier` 
+  `SourceDBInstanceIdentifier` 
+  `SourceRegion` 
+ `StorageEncrypted` (for an unencrypted snapshot)
+  `Timezone` 
 **Amazon Aurora**   
Not applicable. Snapshot restore is managed by the DB cluster.  
*Required*: No  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`DBSubnetGroupName`  <a name="cfn-rds-dbinstance-dbsubnetgroupname"></a>
A DB subnet group to associate with the DB instance. If you update this value, the new subnet group must be a subnet group in a new VPC.   
If you don't specify a DB subnet group, RDS uses the default DB subnet group if one exists. If a default DB subnet group does not exist, and you don't specify a `DBSubnetGroupName`, the DB instance fails to launch.   
For more information about using Amazon RDS in a VPC, see [Amazon VPC and Amazon RDS](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.html) in the *Amazon RDS User Guide*.   
This setting doesn't apply to Amazon Aurora DB instances. The DB subnet group is managed by the DB cluster. If specified, the setting must match the DB cluster setting.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DBSystemId`  <a name="cfn-rds-dbinstance-dbsystemid"></a>
The Oracle system identifier (SID), which is the name of the Oracle database instance that manages your database files. In this context, the term "Oracle database instance" refers exclusively to the system global area (SGA) and Oracle background processes. If you don't specify a SID, the value defaults to `RDSCDB`. The Oracle SID is also the name of your CDB.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DedicatedLogVolume`  <a name="cfn-rds-dbinstance-dedicatedlogvolume"></a>
Indicates whether the DB instance has a dedicated log volume (DLV) enabled.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DeleteAutomatedBackups`  <a name="cfn-rds-dbinstance-deleteautomatedbackups"></a>
A value that indicates whether to remove automated backups immediately after the DB instance is deleted. This parameter isn't case-sensitive. The default is to remove automated backups immediately after the DB instance is deleted.  
 **Amazon Aurora**   
Not applicable. When you delete a DB cluster, all automated backups for that DB cluster are deleted and can't be recovered. Manual DB cluster snapshots of the DB cluster are not deleted.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DeletionProtection`  <a name="cfn-rds-dbinstance-deletionprotection"></a>
Specifies whether the DB instance has deletion protection enabled. The database can't be deleted when deletion protection is enabled. By default, deletion protection isn't enabled. For more information, see [ Deleting a DB Instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_DeleteInstance.html).  
This setting doesn't apply to Amazon Aurora DB instances. You can enable or disable deletion protection for the DB cluster. For more information, see `CreateDBCluster`. DB instances in a DB cluster can be deleted even when deletion protection is enabled for the DB cluster.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Domain`  <a name="cfn-rds-dbinstance-domain"></a>
The Active Directory directory ID to create the DB instance in. Currently, only Db2, MySQL, Microsoft SQL Server, Oracle, and PostgreSQL DB instances can be created in an Active Directory Domain.  
For more information, see [ Kerberos Authentication](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/kerberos-authentication.html) in the *Amazon RDS User Guide*.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DomainAuthSecretArn`  <a name="cfn-rds-dbinstance-domainauthsecretarn"></a>
The ARN for the Secrets Manager secret with the credentials for the user joining the domain.  
Example: `arn:aws:secretsmanager:region:account-number:secret:myselfmanagedADtestsecret-123456`  
*Required*: No  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`DomainDnsIps`  <a name="cfn-rds-dbinstance-domaindnsips"></a>
The IPv4 DNS IP addresses of your primary and secondary Active Directory domain controllers.  
Constraints:  
+ Two IP addresses must be provided. If there isn't a secondary domain controller, use the IP address of the primary domain controller for both entries in the list.
Example: `123.124.125.126,234.235.236.237`  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`DomainFqdn`  <a name="cfn-rds-dbinstance-domainfqdn"></a>
The fully qualified domain name (FQDN) of an Active Directory domain.  
Constraints:  
+ Can't be longer than 64 characters.
Example: `mymanagedADtest.mymanagedAD.mydomain`  
*Required*: No  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`DomainIAMRoleName`  <a name="cfn-rds-dbinstance-domainiamrolename"></a>
The name of the IAM role to use when making API calls to the Directory Service.  
This setting doesn't apply to the following DB instances:  
+ Amazon Aurora (The domain is managed by the DB cluster.)
+ RDS Custom
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DomainOu`  <a name="cfn-rds-dbinstance-domainou"></a>
The Active Directory organizational unit for your DB instance to join.  
Constraints:  
+ Must be in the distinguished name format.
+ Can't be longer than 64 characters.
Example: `OU=mymanagedADtestOU,DC=mymanagedADtest,DC=mymanagedAD,DC=mydomain`  
*Required*: No  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`EnableCloudwatchLogsExports`  <a name="cfn-rds-dbinstance-enablecloudwatchlogsexports"></a>
The list of log types that need to be enabled for exporting to CloudWatch Logs. The values in the list depend on the DB engine being used. For more information, see [Publishing Database Logs to Amazon CloudWatch Logs ](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html#USER_LogAccess.Procedural.UploadtoCloudWatch) in the *Amazon Relational Database Service User Guide*.  
 **Amazon Aurora**   
Not applicable. CloudWatch Logs exports are managed by the DB cluster.   
 **Db2**   
Valid values: `diag.log`, `notify.log`  
 **MariaDB**   
Valid values: `audit`, `error`, `general`, `slowquery`  
 **Microsoft SQL Server**   
Valid values: `agent`, `error`  
 **MySQL**   
Valid values: `audit`, `error`, `general`, `slowquery`  
 **Oracle**   
Valid values: `alert`, `audit`, `listener`, `trace`, `oemagent`  
 **PostgreSQL**   
Valid values: `postgresql`, `upgrade`  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EnableIAMDatabaseAuthentication`  <a name="cfn-rds-dbinstance-enableiamdatabaseauthentication"></a>
A value that indicates whether to enable mapping of AWS Identity and Access Management (IAM) accounts to database accounts. By default, mapping is disabled.  
This property is supported for RDS for MariaDB, RDS for MySQL, and RDS for PostgreSQL. For more information, see [ IAM Database Authentication for MariaDB, MySQL, and PostgreSQL](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html) in the *Amazon RDS User Guide.*  
 **Amazon Aurora**   
Not applicable. Mapping AWS IAM accounts to database accounts is managed by the DB cluster.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EnablePerformanceInsights`  <a name="cfn-rds-dbinstance-enableperformanceinsights"></a>
Specifies whether to enable Performance Insights for the DB instance. For more information, see [Using Amazon Performance Insights](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.html) in the *Amazon RDS User Guide*.  
This setting doesn't apply to RDS Custom DB instances.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Engine`  <a name="cfn-rds-dbinstance-engine"></a>
The name of the database engine to use for this DB instance. Not every database engine is available in every AWS Region.  
This property is required when creating a DB instance.  
You can convert an Oracle database from the non-CDB architecture to the container database (CDB) architecture by updating the `Engine` value in your templates from `oracle-ee` to `oracle-ee-cdb` or from `oracle-se2` to `oracle-se2-cdb`. Converting to the CDB architecture requires an interruption.
Valid Values:  
+ `aurora-mysql` (for Aurora MySQL DB instances)
+ `aurora-postgresql` (for Aurora PostgreSQL DB instances)
+ `custom-oracle-ee` (for RDS Custom for Oracle DB instances)
+ `custom-oracle-ee-cdb` (for RDS Custom for Oracle DB instances)
+ `custom-sqlserver-ee` (for RDS Custom for SQL Server DB instances)
+ `custom-sqlserver-se` (for RDS Custom for SQL Server DB instances)
+ `custom-sqlserver-web` (for RDS Custom for SQL Server DB instances)
+  `db2-ae` 
+  `db2-se` 
+  `mariadb` 
+  `mysql` 
+  `oracle-ee` 
+  `oracle-ee-cdb` 
+  `oracle-se2` 
+  `oracle-se2-cdb` 
+  `postgres` 
+  `sqlserver-ee` 
+  `sqlserver-se` 
+  `sqlserver-ex` 
+  `sqlserver-web` 
*Required*: Conditional  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`EngineLifecycleSupport`  <a name="cfn-rds-dbinstance-enginelifecyclesupport"></a>
The life cycle type for this DB instance.  
By default, this value is set to `open-source-rds-extended-support`, which enrolls your DB instance into Amazon RDS Extended Support. At the end of standard support, you can avoid charges for Extended Support by setting the value to `open-source-rds-extended-support-disabled`. In this case, creating the DB instance will fail if the DB major version is past its end of standard support date.
This setting applies only to RDS for MySQL and RDS for PostgreSQL. For Amazon Aurora DB instances, the life cycle type is managed by the DB cluster.  
You can use this setting to enroll your DB instance into Amazon RDS Extended Support. With RDS Extended Support, you can run the selected major engine version on your DB instance past the end of standard support for that engine version. For more information, see [Amazon RDS Extended Support with Amazon RDS](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/extended-support.html) in the *Amazon RDS User Guide*.  
Valid Values: `open-source-rds-extended-support | open-source-rds-extended-support-disabled`  
Default: `open-source-rds-extended-support`  
*Required*: No  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`EngineVersion`  <a name="cfn-rds-dbinstance-engineversion"></a>
The version number of the database engine to use.  
For a list of valid engine versions, use the `DescribeDBEngineVersions` action.  
The following are the database engines and links to information about the major and minor versions that are available with Amazon RDS. Not every database engine is available for every AWS Region.  
 **Amazon Aurora**   
Not applicable. The version number of the database engine to be used by the DB instance is managed by the DB cluster.  
 **Db2**   
See [Amazon RDS for Db2](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Db2.html#Db2.Concepts.VersionMgmt) in the *Amazon RDS User Guide.*  
 **MariaDB**   
See [MariaDB on Amazon RDS Versions](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MariaDB.html#MariaDB.Concepts.VersionMgmt) in the *Amazon RDS User Guide.*  
 **Microsoft SQL Server**   
See [Microsoft SQL Server Versions on Amazon RDS](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.VersionSupport) in the *Amazon RDS User Guide.*  
 **MySQL**   
See [MySQL on Amazon RDS Versions](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_MySQL.html#MySQL.Concepts.VersionMgmt) in the *Amazon RDS User Guide.*  
 **Oracle**   
See [Oracle Database Engine Release Notes](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.Oracle.PatchComposition.html) in the *Amazon RDS User Guide.*  
 **PostgreSQL**   
See [Supported PostgreSQL Database Versions](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.DBVersions) in the *Amazon RDS User Guide.*  
*Required*: No  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`Iops`  <a name="cfn-rds-dbinstance-iops"></a>
The number of I/O operations per second (IOPS) that the database provisions. The value must be equal to or greater than 1000.   
If you specify this property, you must follow the range of allowed ratios of your requested IOPS rate to the amount of storage that you allocate (IOPS to allocated storage). For example, you can provision an Oracle database instance with 1000 IOPS and 200 GiB of storage (a ratio of 5:1), or specify 2000 IOPS with 200 GiB of storage (a ratio of 10:1). For more information, see [Amazon RDS Provisioned IOPS Storage to Improve Performance](https://docs.aws.amazon.com/AmazonRDS/latest/DeveloperGuide/CHAP_Storage.html#USER_PIOPS) in the *Amazon RDS User Guide*.  
If you specify `io1` for the `StorageType` property, then you must also specify the `Iops` property.
Constraints:  
+ For RDS for Db2, MariaDB, MySQL, Oracle, and PostgreSQL - Must be a multiple between .5 and 50 of the storage amount for the DB instance.
+ For RDS for SQL Server - Must be a multiple between 1 and 50 of the storage amount for the DB instance.
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`KmsKeyId`  <a name="cfn-rds-dbinstance-kmskeyid"></a>
The ARN of the AWS KMS key that's used to encrypt the DB instance, such as `arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef`. If you enable the StorageEncrypted property but don't specify this property, AWS CloudFormation uses the default KMS key. If you specify this property, you must set the StorageEncrypted property to true.   
If you specify the `SourceDBInstanceIdentifier` or `SourceDbiResourceId` property, don't specify this property. The value is inherited from the source DB instance, and if the DB instance is encrypted, the specified `KmsKeyId` property is used. However, if the source DB instance is in a different AWS Region, you must specify a KMS key ID.  
If you specify the `SourceDBInstanceAutomatedBackupsArn` property, don't specify this property. The value is inherited from the source DB instance automated backup, and if the automated backup is encrypted, the specified `KmsKeyId` property is used.  
If you create an encrypted read replica in a different AWS Region, then you must specify a KMS key for the destination AWS Region. KMS encryption keys are specific to the region that they're created in, and you can't use encryption keys from one region in another region.  
If you specify the `DBSnapshotIdentifier` property, don't specify this property. The `StorageEncrypted` property value is inherited from the snapshot. If the DB instance is encrypted, the specified `KmsKeyId` property is also inherited from the snapshot.  
If you specify `DBSecurityGroups`, AWS CloudFormation ignores this property. To specify both a security group and this property, you must use a VPC security group. For more information about Amazon RDS and VPC, see [Using Amazon RDS with Amazon VPC](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.html) in the *Amazon RDS User Guide*.  
 **Amazon Aurora**   
Not applicable. The KMS key identifier is managed by the DB cluster.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`LicenseModel`  <a name="cfn-rds-dbinstance-licensemodel"></a>
License model information for this DB instance.  
 Valid Values:  
+ Aurora MySQL - `general-public-license`
+ Aurora PostgreSQL - `postgresql-license`
+ RDS for Db2 - `bring-your-own-license`. For more information about RDS for Db2 licensing, see [https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/db2-licensing.html](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/db2-licensing.html) in the *Amazon RDS User Guide.*
+ RDS for MariaDB - `general-public-license`
+ RDS for Microsoft SQL Server - `license-included`
+ RDS for MySQL - `general-public-license`
+ RDS for Oracle - `bring-your-own-license` or `license-included`
+ RDS for PostgreSQL - `postgresql-license`
If you've specified `DBSecurityGroups` and then you update the license model, AWS CloudFormation replaces the underlying DB instance. This will incur some interruptions to database availability. 
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ManageMasterUserPassword`  <a name="cfn-rds-dbinstance-managemasteruserpassword"></a>
Specifies whether to manage the master user password with AWS Secrets Manager.  
For more information, see [Password management with AWS Secrets Manager](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html) in the *Amazon RDS User Guide.*  
Constraints:  
+ Can't manage the master user password with AWS Secrets Manager if `MasterUserPassword` is specified.
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MasterUserAuthenticationType`  <a name="cfn-rds-dbinstance-masteruserauthenticationtype"></a>
Specifies the authentication type for the master user. With IAM master user authentication, you can configure the master DB user with IAM database authentication when you create a DB instance.  
You can specify one of the following values:  
+ `password` - Use standard database authentication with a password.
+ `iam-db-auth` - Use IAM database authentication for the master user.
This option is only valid for RDS for MySQL, RDS for MariaDB, RDS for PostgreSQL, Aurora MySQL, and Aurora PostgreSQL engines.  
*Required*: No  
*Type*: String  
*Allowed values*: `password | iam-db-auth`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MasterUsername`  <a name="cfn-rds-dbinstance-masterusername"></a>
The master user name for the DB instance.  
If you specify the `SourceDBInstanceIdentifier` or `DBSnapshotIdentifier` property, don't specify this property. The value is inherited from the source DB instance or snapshot.  
When migrating a self-managed Db2 database, we recommend that you use the same master username as your self-managed Db2 instance name.
 **Amazon Aurora**   
Not applicable. The name for the master user is managed by the DB cluster.   
 **RDS for Db2**   
Constraints:  
+ Must be 1 to 16 letters or numbers.
+ First character must be a letter.
+ Can't be a reserved word for the chosen database engine.
 **RDS for MariaDB**   
Constraints:  
+ Must be 1 to 16 letters or numbers.
+ Can't be a reserved word for the chosen database engine.
 **RDS for Microsoft SQL Server**   
Constraints:  
+ Must be 1 to 128 letters or numbers.
+ First character must be a letter.
+ Can't be a reserved word for the chosen database engine.
 **RDS for MySQL**   
Constraints:  
+ Must be 1 to 16 letters or numbers.
+ First character must be a letter.
+ Can't be a reserved word for the chosen database engine.
 **RDS for Oracle**   
Constraints:  
+ Must be 1 to 30 letters or numbers.
+ First character must be a letter.
+ Can't be a reserved word for the chosen database engine.
 **RDS for PostgreSQL**   
Constraints:  
+ Must be 1 to 63 letters or numbers.
+ First character must be a letter.
+ Can't be a reserved word for the chosen database engine.
*Required*: Conditional  
*Type*: String  
*Pattern*: `^[a-zA-Z][a-zA-Z0-9_]{0,127}$`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`MasterUserPassword`  <a name="cfn-rds-dbinstance-masteruserpassword"></a>
The password for the master user. The password can include any printable ASCII character except "/", """, or "@".  
 **Amazon Aurora**   
Not applicable. The password for the master user is managed by the DB cluster.  
 **RDS for Db2**   
Must contain from 8 to 255 characters.  
 **RDS for MariaDB**   
Constraints: Must contain from 8 to 41 characters.  
 **RDS for Microsoft SQL Server**   
Constraints: Must contain from 8 to 128 characters.  
 **RDS for MySQL**   
Constraints: Must contain from 8 to 41 characters.  
 **RDS for Oracle**   
Constraints: Must contain from 8 to 30 characters.  
 **RDS for PostgreSQL**   
Constraints: Must contain from 8 to 128 characters.  
*Required*: Conditional  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MasterUserSecret`  <a name="cfn-rds-dbinstance-masterusersecret"></a>
The secret managed by RDS in AWS Secrets Manager for the master user password.  
For more information, see [Password management with AWS Secrets Manager](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html) in the *Amazon RDS User Guide.*  
*Required*: No  
*Type*: [MasterUserSecret](aws-properties-rds-dbinstance-masterusersecret.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaxAllocatedStorage`  <a name="cfn-rds-dbinstance-maxallocatedstorage"></a>
The upper limit in gibibytes (GiB) to which Amazon RDS can automatically scale the storage of the DB instance.  
For more information about this setting, including limitations that apply to it, see [ Managing capacity automatically with Amazon RDS storage autoscaling](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIOPS.StorageTypes.html#USER_PIOPS.Autoscaling) in the *Amazon RDS User Guide*.  
This setting doesn't apply to the following DB instances:  
+ Amazon Aurora (Storage is managed by the DB cluster.)
+ RDS Custom
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MonitoringInterval`  <a name="cfn-rds-dbinstance-monitoringinterval"></a>
The interval, in seconds, between points when Enhanced Monitoring metrics are collected for the DB instance. To disable collection of Enhanced Monitoring metrics, specify `0`.  
If `MonitoringRoleArn` is specified, then you must set `MonitoringInterval` to a value other than `0`.  
This setting doesn't apply to RDS Custom DB instances.  
Valid Values: `0 | 1 | 5 | 10 | 15 | 30 | 60`  
Default: `0`  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MonitoringRoleArn`  <a name="cfn-rds-dbinstance-monitoringrolearn"></a>
The ARN for the IAM role that permits RDS to send enhanced monitoring metrics to Amazon CloudWatch Logs. For example, `arn:aws:iam:123456789012:role/emaccess`. For information on creating a monitoring role, see [Setting Up and Enabling Enhanced Monitoring](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.html#USER_Monitoring.OS.Enabling) in the *Amazon RDS User Guide*.  
If `MonitoringInterval` is set to a value other than `0`, then you must supply a `MonitoringRoleArn` value.  
This setting doesn't apply to RDS Custom DB instances.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MultiAZ`  <a name="cfn-rds-dbinstance-multiaz"></a>
Specifies whether the DB instance is a Multi-AZ deployment. You can't set the `AvailabilityZone` parameter if the DB instance is a Multi-AZ deployment.  
This setting doesn't apply to Amazon Aurora because the DB instance Availability Zones (AZs) are managed by the DB cluster.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`NcharCharacterSetName`  <a name="cfn-rds-dbinstance-ncharcharactersetname"></a>
The name of the NCHAR character set for the Oracle DB instance.  
This setting doesn't apply to RDS Custom DB instances.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`NetworkType`  <a name="cfn-rds-dbinstance-networktype"></a>
The network type of the DB instance.  
Valid values:  
+  `IPV4` 
+  `DUAL` 
The network type is determined by the `DBSubnetGroup` specified for the DB instance. A `DBSubnetGroup` can support only the IPv4 protocol or the IPv4 and IPv6 protocols (`DUAL`).  
For more information, see [ Working with a DB instance in a VPC](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html) in the *Amazon RDS User Guide.*  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`OptionGroupName`  <a name="cfn-rds-dbinstance-optiongroupname"></a>
Indicates that the DB instance should be associated with the specified option group.  
Permanent options, such as the TDE option for Oracle Advanced Security TDE, can't be removed from an option group. Also, that option group can't be removed from a DB instance once it is associated with a DB instance.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PerformanceInsightsKMSKeyId`  <a name="cfn-rds-dbinstance-performanceinsightskmskeyid"></a>
The AWS KMS key identifier for encryption of Performance Insights data.  
The KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key.  
If you do not specify a value for `PerformanceInsightsKMSKeyId`, then Amazon RDS uses your default KMS key. There is a default KMS key for your AWS account. Your AWS account has a different default KMS key for each AWS Region.  
**Update behavior:** Once Performance Insights is enabled with a KMS key, you cannot change to a different physical KMS key without replacing the DB instance. However, the following updates do not require replacement:  
+ Enabling or disabling Performance Insights using the `EnablePerformanceInsights` property
+ Changing between different identifier formats (key ARN, key ID, alias ARN, alias name) of the same physical KMS key
+ Removing the `PerformanceInsightsKMSKeyId` property from your template
**Drift behavior:** If you specify `PerformanceInsightsKMSKeyId` while `EnablePerformanceInsights` is set to `false`, CloudFormation will report drift. This occurs because the RDS API does not allow setting a KMS key when Performance Insights is disabled. CloudFormation ignores the `PerformanceInsightsKMSKeyId` value during instance creation to avoid API errors, resulting in a mismatch between your template and the actual instance configuration.  
To avoid drift, omit both `EnablePerformanceInsights` and `PerformanceInsightsKMSKeyId` during initial instance creation, then set both properties together when you're ready to enable Performance Insights.
For information about enabling Performance Insights, see [ EnablePerformanceInsights](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-enableperformanceinsights).  
*Required*: No  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`PerformanceInsightsRetentionPeriod`  <a name="cfn-rds-dbinstance-performanceinsightsretentionperiod"></a>
The number of days to retain Performance Insights data. When creating a DB instance without enabling Performance Insights, you can't specify the parameter `PerformanceInsightsRetentionPeriod`.  
This setting doesn't apply to RDS Custom DB instances.  
Valid Values:  
+  `7` 
+ *month* \$1 31, where *month* is a number of months from 1-23. Examples: `93` (3 months \$1 31), `341` (11 months \$1 31), `589` (19 months \$1 31)
+  `731` 
Default: `7` days  
If you specify a retention period that isn't valid, such as `94`, Amazon RDS returns an error.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Port`  <a name="cfn-rds-dbinstance-port"></a>
The port number on which the database accepts connections.  
This setting doesn't apply to Aurora DB instances. The port number is managed by the cluster.  
Valid Values: `1150-65535`  
Default:  
+ RDS for Db2 - `50000`
+ RDS for MariaDB - `3306`
+ RDS for Microsoft SQL Server - `1433`
+ RDS for MySQL - `3306`
+ RDS for Oracle - `1521`
+ RDS for PostgreSQL - `5432`
Constraints:  
+ For RDS for Microsoft SQL Server, the value can't be `1234`, `1434`, `3260`, `3343`, `3389`, `47001`, or `49152-49156`.
*Required*: No  
*Type*: String  
*Pattern*: `^\d*$`  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`PreferredBackupWindow`  <a name="cfn-rds-dbinstance-preferredbackupwindow"></a>
 The daily time range during which automated backups are created if automated backups are enabled, using the `BackupRetentionPeriod` parameter. For more information, see [ Backup Window](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithAutomatedBackups.html#USER_WorkingWithAutomatedBackups.BackupWindow) in the *Amazon RDS User Guide.*  
Constraints:  
+ Must be in the format `hh24:mi-hh24:mi`.
+ Must be in Universal Coordinated Time (UTC).
+ Must not conflict with the preferred maintenance window.
+ Must be at least 30 minutes.
 **Amazon Aurora**   
Not applicable. The daily time range for creating automated backups is managed by the DB cluster.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PreferredMaintenanceWindow`  <a name="cfn-rds-dbinstance-preferredmaintenancewindow"></a>
The weekly time range during which system maintenance can occur, in Universal Coordinated Time (UTC).  
Format: `ddd:hh24:mi-ddd:hh24:mi`  
The default is a 30-minute window selected at random from an 8-hour block of time for each AWS Region, occurring on a random day of the week. To see the time blocks available, see [Maintaining a DB instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow) in the *Amazon RDS User Guide.*  
This property applies when AWS CloudFormation initially creates the DB instance. If you use AWS CloudFormation to update the DB instance, those updates are applied immediately.
Constraints: Minimum 30-minute window.  
*Required*: No  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`ProcessorFeatures`  <a name="cfn-rds-dbinstance-processorfeatures"></a>
The number of CPU cores and the number of threads per core for the DB instance class of the DB instance.  
This setting doesn't apply to Amazon Aurora or RDS Custom DB instances.  
*Required*: No  
*Type*: Array of [ProcessorFeature](aws-properties-rds-dbinstance-processorfeature.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PromotionTier`  <a name="cfn-rds-dbinstance-promotiontier"></a>
The order of priority in which an Aurora Replica is promoted to the primary instance after a failure of the existing primary instance. For more information, see [ Fault Tolerance for an Aurora DB Cluster](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.AuroraHighAvailability.html#Aurora.Managing.FaultTolerance) in the *Amazon Aurora User Guide*.  
This setting doesn't apply to RDS Custom DB instances.  
Default: `1`  
Valid Values: `0 - 15`  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PubliclyAccessible`  <a name="cfn-rds-dbinstance-publiclyaccessible"></a>
Indicates whether the DB instance is an internet-facing instance. If you specify true, AWS CloudFormation creates an instance with a publicly resolvable DNS name, which resolves to a public IP address. If you specify false, AWS CloudFormation creates an internal instance with a DNS name that resolves to a private IP address.   
The default behavior value depends on your VPC setup and the database subnet group. For more information, see the `PubliclyAccessible` parameter in the [CreateDBInstance](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html) in the *Amazon RDS API Reference*.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ReplicaMode`  <a name="cfn-rds-dbinstance-replicamode"></a>
The open mode of an Oracle read replica. For more information, see [Working with Oracle Read Replicas for Amazon RDS](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/oracle-read-replicas.html) in the *Amazon RDS User Guide*.  
This setting is only supported in RDS for Oracle.  
Default: `open-read-only`  
Valid Values: `open-read-only` or `mounted`  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RestoreTime`  <a name="cfn-rds-dbinstance-restoretime"></a>
The date and time to restore from. This parameter applies to point-in-time recovery. For more information, see [Restoring a DB instance to a specified time](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIT.html) in the in the *Amazon RDS User Guide*.  
Constraints:  
+ Must be a time in Universal Coordinated Time (UTC) format.
+ Must be before the latest restorable time for the DB instance.
+ Can't be specified if the `UseLatestRestorableTime` parameter is enabled.
Example: `2009-09-07T23:45:00Z`  
*Required*: No  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`SourceDBClusterIdentifier`  <a name="cfn-rds-dbinstance-sourcedbclusteridentifier"></a>
The identifier of the Multi-AZ DB cluster that will act as the source for the read replica. Each DB cluster can have up to 15 read replicas.  
Constraints:  
+ Must be the identifier of an existing Multi-AZ DB cluster.
+ Can't be specified if the `SourceDBInstanceIdentifier` parameter is also specified.
+ The specified DB cluster must have automatic backups enabled, that is, its backup retention period must be greater than 0.
+ The source DB cluster must be in the same AWS Region as the read replica. Cross-Region replication isn't supported.
*Required*: No  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`SourceDBInstanceAutomatedBackupsArn`  <a name="cfn-rds-dbinstance-sourcedbinstanceautomatedbackupsarn"></a>
The Amazon Resource Name (ARN) of the replicated automated backups from which to restore, for example, `arn:aws:rds:us-east-1:123456789012:auto-backup:ab-L2IJCEXJP7XQ7HOJ4SIEXAMPLE`.  
This setting doesn't apply to RDS Custom.  
*Required*: No  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`SourceDBInstanceIdentifier`  <a name="cfn-rds-dbinstance-sourcedbinstanceidentifier"></a>
If you want to create a read replica DB instance, specify the ID of the source DB instance. Each DB instance can have a limited number of read replicas. For more information, see [Working with Read Replicas](https://docs.aws.amazon.com/AmazonRDS/latest/DeveloperGuide/USER_ReadRepl.html) in the *Amazon RDS User Guide*.  
For information about constraints that apply to DB instance identifiers, see [Naming constraints in Amazon RDS](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_Limits.html#RDS_Limits.Constraints) in the *Amazon RDS User Guide*.  
The `SourceDBInstanceIdentifier` property determines whether a DB instance is a read replica. If you remove the `SourceDBInstanceIdentifier` property from your template and then update your stack, AWS CloudFormation promotes the read replica to a standalone DB instance.  
If you specify the `UseLatestRestorableTime` or `RestoreTime` properties in conjunction with the `SourceDBInstanceIdentifier` property, RDS restores the DB instance to the requested point in time, thereby creating a new DB instance.  
+ If you specify a source DB instance that uses VPC security groups, we recommend that you specify the `VPCSecurityGroups` property. If you don't specify the property, the read replica inherits the value of the `VPCSecurityGroups` property from the source DB when you create the replica. However, if you update the stack, AWS CloudFormation reverts the replica's `VPCSecurityGroups` property to the default value because it's not defined in the stack's template. This change might cause unexpected issues.
+ Read replicas don't support deletion policies. AWS CloudFormation ignores any deletion policy that's associated with a read replica.
+ If you specify `SourceDBInstanceIdentifier`, don't specify the `DBSnapshotIdentifier` property. You can't create a read replica from a snapshot.
+ Don't set the `BackupRetentionPeriod`, `DBName`, `MasterUsername`, `MasterUserPassword`, and `PreferredBackupWindow` properties. The database attributes are inherited from the source DB instance, and backups are disabled for read replicas.
+ If the source DB instance is in a different region than the read replica, specify the source region in `SourceRegion`, and specify an ARN for a valid DB instance in `SourceDBInstanceIdentifier`. For more information, see [ Constructing a Amazon RDS Amazon Resource Name (ARN)](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html#USER_Tagging.ARN) in the *Amazon RDS User Guide*.
+ For DB instances in Amazon Aurora clusters, don't specify this property. Amazon RDS automatically assigns writer and reader DB instances.
*Required*: No  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`SourceDbiResourceId`  <a name="cfn-rds-dbinstance-sourcedbiresourceid"></a>
The resource ID of the source DB instance from which to restore.  
*Required*: No  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`SourceRegion`  <a name="cfn-rds-dbinstance-sourceregion"></a>
The ID of the region that contains the source DB instance for the read replica.   
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`StorageEncrypted`  <a name="cfn-rds-dbinstance-storageencrypted"></a>
A value that indicates whether the DB instance is encrypted. By default, it isn't encrypted.  
If you specify the `KmsKeyId` property, then you must enable encryption.  
If you specify the `SourceDBInstanceIdentifier` or `SourceDbiResourceId` property, don't specify this property. The value is inherited from the source DB instance, and if the DB instance is encrypted, the specified `KmsKeyId` property is used.  
If you specify the `SourceDBInstanceAutomatedBackupsArn` property, don't specify this property. The value is inherited from the source DB instance automated backup.   
If you specify `DBSnapshotIdentifier` property, don't specify this property. The value is inherited from the snapshot.  
 **Amazon Aurora**   
Not applicable. The encryption for DB instances is managed by the DB cluster.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`StorageThroughput`  <a name="cfn-rds-dbinstance-storagethroughput"></a>
Specifies the storage throughput value, in mebibyte per second (MiBps), for the DB instance. This setting applies only to the `gp3` storage type.   
This setting doesn't apply to RDS Custom or Amazon Aurora.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StorageType`  <a name="cfn-rds-dbinstance-storagetype"></a>
The storage type to associate with the DB instance.  
If you specify `io1`, `io2`, or `gp3`, you must also include a value for the `Iops` parameter.  
This setting doesn't apply to Amazon Aurora DB instances. Storage is managed by the DB cluster.  
Valid Values: `gp2 | gp3 | io1 | io2 | standard`  
Default: `io1`, if the `Iops` parameter is specified. Otherwise, `gp3`.  
*Required*: No  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`Tags`  <a name="cfn-rds-dbinstance-tags"></a>
Tags to assign to the DB instance.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-rds-dbinstance-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Timezone`  <a name="cfn-rds-dbinstance-timezone"></a>
The time zone of the DB instance. The time zone parameter is currently supported only by [RDS for Db2](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/db2-time-zone) and [RDS for SQL Server](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SQLServer.html#SQLServer.Concepts.General.TimeZone).  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`UseDefaultProcessorFeatures`  <a name="cfn-rds-dbinstance-usedefaultprocessorfeatures"></a>
Specifies whether the DB instance class of the DB instance uses its default processor features.  
This setting doesn't apply to RDS Custom DB instances.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`UseLatestRestorableTime`  <a name="cfn-rds-dbinstance-uselatestrestorabletime"></a>
Specifies whether the DB instance is restored from the latest backup time. By default, the DB instance isn't restored from the latest backup time. This parameter applies to point-in-time recovery. For more information, see [Restoring a DB instance to a specified time](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PIT.html) in the in the *Amazon RDS User Guide*.  
Constraints:  
+ Can't be specified if the `RestoreTime` parameter is provided.
*Required*: No  
*Type*: Boolean  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`VPCSecurityGroups`  <a name="cfn-rds-dbinstance-vpcsecuritygroups"></a>
A list of the VPC security group IDs to assign to the DB instance. The list can include both the physical IDs of existing VPC security groups and references to [AWS::EC2::SecurityGroup](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group.html) resources created in the template.  
If you plan to update the resource, don't specify VPC security groups in a shared VPC.  
 If you set `VPCSecurityGroups`, you must not set [https://docs.aws.amazon.com//AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-dbsecuritygroups](https://docs.aws.amazon.com//AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-dbsecuritygroups), and vice versa.  
You can migrate a DB instance in your stack from an RDS DB security group to a VPC security group, but keep the following in mind:  
+ You can't revert to using an RDS security group after you establish a VPC security group membership.
+ When you migrate your DB instance to VPC security groups, if your stack update rolls back because the DB instance update fails or because an update fails in another AWS CloudFormation resource, the rollback fails because it can't revert to an RDS security group.
+ To use the properties that are available when you use a VPC security group, you must recreate the DB instance. If you don't, AWS CloudFormation submits only the property values that are listed in the [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-dbsecuritygroups](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-dbsecuritygroups) property.
To avoid this situation, migrate your DB instance to using VPC security groups only when that is the only change in your stack template.   
 **Amazon Aurora**   
Not applicable. The associated list of EC2 VPC security groups is managed by the DB cluster. If specified, the setting must match the DB cluster setting.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-rds-dbinstance-return-values"></a>

### Ref
<a name="aws-resource-rds-dbinstance-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the DB instance name.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-rds-dbinstance-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-rds-dbinstance-return-values-fn--getatt-fn--getatt"></a>

`AutomaticRestartTime`  <a name="AutomaticRestartTime-fn::getatt"></a>
The time when a stopped DB instance is restarted automatically.

`CertificateDetails.CAIdentifier`  <a name="CertificateDetails.CAIdentifier-fn::getatt"></a>
The CA identifier of the CA certificate used for the DB instance's server certificate.

`CertificateDetails.ValidTill`  <a name="CertificateDetails.ValidTill-fn::getatt"></a>
The expiration date of the DB instance’s server certificate.

`DBInstanceArn`  <a name="DBInstanceArn-fn::getatt"></a>
The Amazon Resource Name (ARN) for the DB instance.

`DBInstanceStatus`  <a name="DBInstanceStatus-fn::getatt"></a>
The current state of this DB instance.

`DbiResourceId`  <a name="DbiResourceId-fn::getatt"></a>
The AWS Region-unique, immutable identifier for the DB instance. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB instance is accessed.

`DBSystemId`  <a name="DBSystemId-fn::getatt"></a>
The Oracle system ID (Oracle SID) for a container database (CDB). The Oracle SID is also the name of the CDB.  
This setting is valid for RDS Custom only.

`Endpoint.Address`  <a name="Endpoint.Address-fn::getatt"></a>
The connection endpoint for the database. For example: `mystack-mydb-1apw1j4phylrk.cg034hpkmmjt.us-east-2.rds.amazonaws.com`  
For Aurora Serverless DB clusters, the connection endpoint only applies to the DB cluster.

`Endpoint.HostedZoneId`  <a name="Endpoint.HostedZoneId-fn::getatt"></a>
The ID that Amazon Route 53 assigns when you create a hosted zone.

`Endpoint.Port`  <a name="Endpoint.Port-fn::getatt"></a>
The port number on which the database accepts connections. For example: `3306`

`InstanceCreateTime`  <a name="InstanceCreateTime-fn::getatt"></a>
The date and time when the DB instance was created.

`IsStorageConfigUpgradeAvailable`  <a name="IsStorageConfigUpgradeAvailable-fn::getatt"></a>
Indicates whether an upgrade is recommended for the storage file system configuration on the DB instance.

`LatestRestorableTime`  <a name="LatestRestorableTime-fn::getatt"></a>
The latest time to which a database in this DB instance can be restored with point-in-time restore.

`ListenerEndpoint.Address`  <a name="ListenerEndpoint.Address-fn::getatt"></a>
 The connection endpoint for the database. For example: `mystack-mydb-1apw1j4phylrk.cg034hpkmmjt.us-east-2.rds.amazonaws.com`

`ListenerEndpoint.HostedZoneId`  <a name="ListenerEndpoint.HostedZoneId-fn::getatt"></a>
 The ID of the hosted zone in that is associated with the database endpoint. 

`ListenerEndpoint.Port`  <a name="ListenerEndpoint.Port-fn::getatt"></a>
The port number on which the database accepts connections.  
This setting doesn't apply to Aurora DB instances. The port number is managed by the cluster.  
Valid Values: `1150-65535`  
Default:  
+ RDS for Db2 - `50000`
+ RDS for MariaDB - `3306`
+ RDS for Microsoft SQL Server - `1433`
+ RDS for MySQL - `3306`
+ RDS for Oracle - `1521`
+ RDS for PostgreSQL - `5432`
Constraints:  
+ For RDS for Microsoft SQL Server, the value can't be `1234`, `1434`, `3260`, `3343`, `3389`, `47001`, or `49152-49156`.

`MasterUserSecret.SecretArn`  <a name="MasterUserSecret.SecretArn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the secret. This parameter is a return value that you can retrieve using the `Fn::GetAtt` intrinsic function. For more information, see [Return values](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbinstance.html#aws-resource-rds-dbinstance-return-values).

`PercentProgress`  <a name="PercentProgress-fn::getatt"></a>
The progress of the storage optimization operation as a percentage.

`ReadReplicaDBClusterIdentifiers`  <a name="ReadReplicaDBClusterIdentifiers-fn::getatt"></a>
The identifiers of Aurora DB clusters to which the RDS DB instance is replicated as a read replica.

`ReadReplicaDBInstanceIdentifiers`  <a name="ReadReplicaDBInstanceIdentifiers-fn::getatt"></a>
The identifiers of the read replicas associated with this DB instance.

`ResumeFullAutomationModeTime`  <a name="ResumeFullAutomationModeTime-fn::getatt"></a>
The number of minutes to pause the automation. When the time period ends, RDS Custom resumes full automation. The minimum value is 60 (default). The maximum value is 1,440.

`SecondaryAvailabilityZone`  <a name="SecondaryAvailabilityZone-fn::getatt"></a>
If present, specifies the name of the secondary Availability Zone for a DB instance with multi-AZ support.

`StatusInfos`  <a name="StatusInfos-fn::getatt"></a>
The status of a read replica. If the DB instance isn't a read replica, the value is blank.

## Remarks
<a name="aws-resource-rds-dbinstance--remarks"></a>

 *DB instance creation modes* 

This section outlines the modes for creating RDS DB instances—empty database, read replica, restore from snapshot, and point-in-time recovery. In the console, API, or CLI, each mode corresponds to a distinct API or command. In CloudFormation, however, the mode is determined by the following parameter combinations.
+ **Empty database** - Creates a new, empty DB instance. 

  To create an empty database, *don't* specify any of the following properties: 
  +  `RestoreTime` 
  +  `UseLatestRestorableTime` 
  +  `SourceDBInstanceAutomatedBackupsArn` 
  +  `SourceDbiResourceId` 
  +  `SourceDBInstanceIdentifier` 
  +  `SourceDBClusterIdentifier` 
  +  `DBSnapshotIdentifier` 
+ **Read replica** - Creates a replica of an existing DB instance to replicate data asynchronously.

  To create a read replica, specify the `SourceDBInstanceIdentifier` property or the `SourceDBClusterIdentifier` property *without* the following properties:
  +  `RestoreTime` 
  +  `UseLatestRestorableTime` 
  +  `SourceDBInstanceAutomatedBackupsArn` 
  +  `SourceDbiResourceId` 
  +  `DBSnapshotIdentifier` 
+ **Restore from snapshot** - Restores the DB instance from the specified snapshot. Cannot be used with a point-in-time recovery.

  To restore a DB instance from a snapshot, specify the `DBSnapshotIdentifier` property *without* the following properties:
  +  `RestoreTime` 
  +  `UseLatestRestorableTime` 
  +  `SourceDbiResourceId` 
  +  `SourceDBInstanceAutomatedBackupsArn` 
  +  `SourceDBInstanceIdentifier` 
  +  `SourceDBClusterIdentifier` 
+ **Point-in-time recovery** - Recovers the DB instance to a specific point in time. Requires identifying the source and the recovery time. Cannot be used with a snapshot.

  To restore a DB instance to a specified time, include any of the following properties:
  +  `SourceDBInstanceIdentifier` 
  +  `SourceDbiResourceId` 
  +  `SourceDBInstanceAutomatedBackupsArn` 

  with *either* the `RestoreTime` property or the `UseLatestRestorableTime` property.

## Examples
<a name="aws-resource-rds-dbinstance--examples"></a>

**Topics**
+ [Creating a DB instance with Enhanced Monitoring enabled](#aws-resource-rds-dbinstance--examples--Creating_a_DB_instance_with_Enhanced_Monitoring_enabled)
+ [Creating a cross-region encrypted read replica](#aws-resource-rds-dbinstance--examples--Creating_a_cross-region_encrypted_read_replica)
+ [Setting a AWS region for the backup replication of a DB instance](#aws-resource-rds-dbinstance--examples--Setting_a_region_for_the_backup_replication_of_a_DB_instance)
+ [Creating an Amazon RDS Custom DB instance](#aws-resource-rds-dbinstance--examples--Creating_an_Amazon_RDS_Custom_DB_instance)
+ [Deploying RDS Custom for Oracle with single and multiple Availability Zones](#aws-resource-rds-dbinstance--examples--Deploying_RDS_Custom_for_Oracle_with_single_and_multiple_Availability_Zones)
+ [Creating a Secrets Manager secret for a master password](#aws-resource-rds-dbinstance--examples--Creating_a_Secrets_Manager_secret_for_a_master_password)
+ [Creating a DB instance with self-managed Active Directory domain](#aws-resource-rds-dbinstance--examples--Creating_a_DB_instance_with_self-managed_Active_Directory_domain)

### Creating a DB instance with Enhanced Monitoring enabled
<a name="aws-resource-rds-dbinstance--examples--Creating_a_DB_instance_with_Enhanced_Monitoring_enabled"></a>

The following example creates an Amazon RDS MySQL DB instance with Enhanced Monitoring enabled. The IAM role for Enhanced Monitoring specified in `MonitoringRoleArn` must exist before you run this example. For more information, see [ Enhanced Monitoring](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.html) in the *Amazon RDS User Guide*.

#### JSON
<a name="aws-resource-rds-dbinstance--examples--Creating_a_DB_instance_with_Enhanced_Monitoring_enabled--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "AWS CloudFormation Sample Template for creating an Amazon RDS DB instance: Sample template showing how to create a DB instance with Enhanced Monitoring enabled. **WARNING** This template creates an RDS DB instance. You will be billed for the AWS resources used if you create a stack from this template.",
    "Parameters": {
        "DBInstanceID": {
            "Default": "mydbinstance",
            "Description": "My database instance",
            "Type": "String",
            "MinLength": "1",
            "MaxLength": "63",
            "AllowedPattern": "[a-zA-Z][a-zA-Z0-9]*",
            "ConstraintDescription": "Must begin with a letter and must not end with a hyphen or contain two consecutive hyphens."
        },
        "DBName": {
            "Default": "mydb",
            "Description": "My database",
            "Type": "String",
            "MinLength": "1",
            "MaxLength": "64",
            "AllowedPattern": "[a-zA-Z][a-zA-Z0-9]*",
            "ConstraintDescription": "Must begin with a letter and contain only alphanumeric characters."
        },
        "DBInstanceClass": {
            "Default": "db.m5.large",
            "Description": "DB instance class",
            "Type": "String",
            "ConstraintDescription": "Must select a valid DB instance type."
        },
        "DBAllocatedStorage": {
            "Default": "50",
            "Description": "The size of the database (GiB)",
            "Type": "Number",
            "MinValue": "20",
            "MaxValue": "65536",
            "ConstraintDescription": "must be between 20 and 65536 GiB."
        },
        "DBUsername": {
            "NoEcho": "true",
            "Description": "Username for MySQL database access",
            "Type": "String",
            "MinLength": "1",
            "MaxLength": "16",
            "AllowedPattern": "[a-zA-Z][a-zA-Z0-9]*",
            "ConstraintDescription": "must begin with a letter and contain only alphanumeric characters."
        },
        "DBPassword": {
            "NoEcho": "true",
            "Description": "Password MySQL database access",
            "Type": "String",
            "MinLength": "8",
            "MaxLength": "41",
            "AllowedPattern": "[a-zA-Z0-9]*",
            "ConstraintDescription": "must contain only alphanumeric characters."
        }
    },
    "Resources": {
        "MyDB": {
            "Type": "AWS::RDS::DBInstance",
            "Properties": {
                "DBInstanceIdentifier": {
                    "Ref": "DBInstanceID"
                },
                "DBName": {
                    "Ref": "DBName"
                },
                "DBInstanceClass": {
                    "Ref": "DBInstanceClass"
                },
                "AllocatedStorage": {
                    "Ref": "DBAllocatedStorage"
                },
                "Engine": "MySQL",
                "EngineVersion": "8.0.33",
                "MasterUsername": {
                    "Ref": "DBUsername"
                },
                "MasterUserPassword": {
                    "Ref": "DBPassword"
                },
                "MonitoringInterval": 60,
                "MonitoringRoleArn": "arn:aws:iam::1233456789012:role/rds-monitoring-role"
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-dbinstance--examples--Creating_a_DB_instance_with_Enhanced_Monitoring_enabled--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Description: >-
  Description": "AWS CloudFormation Sample Template for creating an Amazon RDS DB instance: 
  Sample template showing how to create a DB instance with Enhanced Monitoring enabled. 
  **WARNING** This template creates an RDS DB instance. You will be billed for the AWS 
  resources used if you create a stack from this template.
Parameters:
  DBInstanceID:
    Default: mydbinstance
    Description: My database instance
    Type: String
    MinLength: '1'
    MaxLength: '63'
    AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
    ConstraintDescription: >-
      Must begin with a letter and must not end with a hyphen or contain two
      consecutive hyphens.
  DBName:
    Default: mydb
    Description: My database
    Type: String
    MinLength: '1'
    MaxLength: '64'
    AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
    ConstraintDescription: Must begin with a letter and contain only alphanumeric characters.
  DBInstanceClass:
    Default: db.m5.large
    Description: DB instance class
    Type: String
    ConstraintDescription: Must select a valid DB instance type.
  DBAllocatedStorage:
    Default: '50'
    Description: The size of the database (GiB)
    Type: Number
    MinValue: '20'
    MaxValue: '65536'
    ConstraintDescription: must be between 20 and 65536 GiB.
  DBUsername:
    NoEcho: 'true'
    Description: Username for MySQL database access
    Type: String
    MinLength: '1'
    MaxLength: '16'
    AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
    ConstraintDescription: must begin with a letter and contain only alphanumeric characters.
  DBPassword:
    NoEcho: 'true'
    Description: Password MySQL database access
    Type: String
    MinLength: '8'
    MaxLength: '41'
    AllowedPattern: '[a-zA-Z0-9]*'
    ConstraintDescription: must contain only alphanumeric characters.
Resources:
  MyDB:
    Type: 'AWS::RDS::DBInstance'
    Properties:
      DBInstanceIdentifier: !Ref DBInstanceID
      DBName: !Ref DBName
      DBInstanceClass: !Ref DBInstanceClass
      AllocatedStorage: !Ref DBAllocatedStorage
      Engine: MySQL
      EngineVersion: "8.0.33"
      MasterUsername: !Ref DBUsername
      MasterUserPassword: !Ref DBPassword
      MonitoringInterval: 60
      MonitoringRoleArn: 'arn:aws:iam::123456789012:role/rds-monitoring-role'
```

### Creating a cross-region encrypted read replica
<a name="aws-resource-rds-dbinstance--examples--Creating_a_cross-region_encrypted_read_replica"></a>

The following example creates an encrypted read replica from a cross-region source DB instance. 

#### JSON
<a name="aws-resource-rds-dbinstance--examples--Creating_a_cross-region_encrypted_read_replica--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "RDS Storage Encrypted",
    "Parameters": {
        "SourceDBInstanceIdentifier": {
            "Type": "String"
        },
        "DBInstanceType": {
            "Type": "String"
        },
        "SourceRegion": {
            "Type": "String"
        }
    },
    "Resources": {
        "MyKey": {
            "Type": "AWS::KMS::Key",
            "Properties": {
                "KeyPolicy": {
                    "Version": "2012-10-17",		 	 	 
                    "Id": "key-default-1",
                    "Statement": [
                        {
                            "Sid": "Enable IAM User Permissions",
                            "Effect": "Allow",
                            "Principal": {
                                "AWS": {
                                    "Fn::Join": [
                                        "",
                                        [
                                            "arn:aws:iam::",
                                            {
                                                "Ref": "AWS::AccountId"
                                            },
                                            ":root"
                                        ]
                                    ]
                                }
                            },
                            "Action": "kms:*",
                            "Resource": "*"
                        }
                    ]
                }
            }
        },
        "MyDBSmall": {
            "Type": "AWS::RDS::DBInstance",
            "Properties": {
                "DBInstanceClass": {
                    "Ref": "DBInstanceType"
                },
                "SourceDBInstanceIdentifier": {
                    "Ref": "SourceDBInstanceIdentifier"
                },
                "SourceRegion": {
                    "Ref": "SourceRegion"
                },
                "KmsKeyId": {
                    "Ref": "MyKey"
                }
            }
        }
    },
    "Outputs": {
        "InstanceId": {
            "Description": "InstanceId of the newly created RDS Instance",
            "Value": {
                "Ref": "MyDBSmall"
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-dbinstance--examples--Creating_a_cross-region_encrypted_read_replica--yaml"></a>

```
--- 
AWSTemplateFormatVersion: 2010-09-09
Description: RDS Storage Encrypted
Parameters:
  SourceDBInstanceIdentifier:
    Type: String
  DBInstanceType:
    Type: String
  SourceRegion:
    Type: String
Resources:
  MyKey:
    Type: AWS::KMS::Key
    Properties:
      KeyPolicy:
        Version: 2012-10-17		 	 	 
        Id: key-default-1
        Statement:
          - Sid: Enable IAM User Permissions
            Effect: Allow
            Principal:
              AWS: !Join
                - ""
                - - "arn:aws:iam::"
                  - !Ref "AWS::AccountId"
                  - ":root"
            Action: "kms:*"
            Resource: "*"
  MyDBSmall:
    Type: AWS::RDS::DBInstance
    Properties:
      DBInstanceClass: !Ref DBInstanceType
      SourceDBInstanceIdentifier: !Ref SourceDBInstanceIdentifier
      SourceRegion: !Ref SourceRegion
      KmsKeyId: !Ref MyKey
Outputs:
  InstanceId:
    Description: InstanceId of the newly created RDS Instance
    Value: !Ref MyDBSmall
```

### Setting a AWS region for the backup replication of a DB instance
<a name="aws-resource-rds-dbinstance--examples--Setting_a_region_for_the_backup_replication_of_a_DB_instance"></a>

The following example defines the destination region for automated backup replication of a DB instance. In this example the DB instance backup will be replicated to `ap-northeast-1` region.

#### JSON
<a name="aws-resource-rds-dbinstance--examples--Setting_a_region_for_the_backup_replication_of_a_DB_instance--json"></a>

```
{
    "Resources": {
        "RDSDBInstance": {
            "Type": "AWS::RDS::DBInstance",
            "Properties": {
                "AllocatedStorage": "100",
                "AutomaticBackupReplicationRegion": "ap-northeast-1",
                "BackupRetentionPeriod": 1,
                "DBInstanceClass": "db.t3.micro",
                "Engine": "postgres",
                "Iops": 1000,
                "MasterUserPassword": "masterpassword",
                "MasterUsername": "masteruser",
                "StorageType": "IO1"
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-dbinstance--examples--Setting_a_region_for_the_backup_replication_of_a_DB_instance--yaml"></a>

```
Resources:
  RDSDBInstance:
    Type: 'AWS::RDS::DBInstance'
    Properties:
      AllocatedStorage: '100'
      AutomaticBackupReplicationRegion: ap-northeast-1
      BackupRetentionPeriod: 1
      DBInstanceClass: db.t3.micro
      Engine: postgres
      Iops: 1000
      MasterUserPassword: masterpassword
      MasterUsername: masteruser
      StorageType: IO1
```

### Creating an Amazon RDS Custom DB instance
<a name="aws-resource-rds-dbinstance--examples--Creating_an_Amazon_RDS_Custom_DB_instance"></a>

This example creates an Amazon RDS Custom DB instance. Amazon RDS Custom allows you as a database administrator to access and customize your database environment and operating system. With this access, you can configure settings, install patches, and enable native features to meet the dependent application's requirements. With RDS Custom, you can run your database workload using the AWS Management Console or AWS CLI. For more information, see [Working with Amazon RDS Custom](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-custom.html) in the *Amazon RDS User Guide*.

#### JSON
<a name="aws-resource-rds-dbinstance--examples--Creating_an_Amazon_RDS_Custom_DB_instance--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Parameters": {
        "AllocatedStorage": {
            "Type": "String"
        },
        "CustomIAMInstanceProfile": {
            "Type": "String"
        },
        "DBInstanceIdentifier": {
            "Type": "String"
        },
        "DBInstanceClass": {
            "Type": "String"
        },
        "DBName": {
            "Type": "String"
        },
        "DBSubnetGroupName": {
            "Type": "String"
        },
        "Engine": {
            "Type": "String"
        },
        "EngineVersion": {
            "Type": "String"
        },
        "KMSKeyId": {
            "Type": "String"
        },
        "LicenseModel": {
            "Type": "String"
        },
        "MasterUsername": {
            "Type": "String"
        },
        "MasterUserPassword": {
            "Type": "String",
            "NoEcho": true
        }
    },
    "Resources": {
        "RDSDBInstance": {
            "Properties": {
                "AllocatedStorage": {
                    "Ref": "AllocatedStorage"
                },
                "AutoMinorVersionUpgrade": false,
                "CustomIAMInstanceProfile": {
                    "Ref": "CustomIAMInstanceProfile"
                },
                "DBInstanceClass": {
                    "Ref": "DBInstanceClass"
                },
                "DBSubnetGroupName": {
                    "Ref": "DBSubnetGroupName"
                },
                "Engine": {
                    "Ref": "Engine"
                },
                "EngineVersion": {
                    "Ref": "EngineVersion"
                },
                "LicenseModel": {
                    "Ref": "LicenseModel"
                },
                "KmsKeyId": {
                    "Ref": "KMSKeyId"
                },
                "MasterUsername": {
                    "Ref": "MasterUsername"
                },
                "MasterUserPassword": {
                    "Ref": "MasterUserPassword"
                }
            },
            "Type": "AWS::RDS::DBInstance"
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-dbinstance--examples--Creating_an_Amazon_RDS_Custom_DB_instance--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Parameters:
  AllocatedStorage:
    Type: String
  CustomIAMInstanceProfile:
    Type: String
  DBInstanceIdentifier:
    Type: String
  DBInstanceClass:
    Type: String
  DBName:
    Type: String
  DBSubnetGroupName:
    Type: String
  Engine:
    Type: String
  EngineVersion:
    Type: String
  KMSKeyId:
    Type: String
  LicenseModel:
    Type: String
  MasterUsername:
    Type: String
  MasterUserPassword:
    Type: String
    NoEcho: true
Resources:
  RDSDBInstance:
    Properties:
      AllocatedStorage: !Ref AllocatedStorage
      AutoMinorVersionUpgrade: false
      CustomIAMInstanceProfile: !Ref CustomIAMInstanceProfile
      DBInstanceClass: !Ref DBInstanceClass
      DBSubnetGroupName: !Ref DBSubnetGroupName
      Engine: !Ref Engine
      EngineVersion: !Ref EngineVersion
      LicenseModel: !Ref LicenseModel
      KmsKeyId: !Ref KMSKeyId
      MasterUsername: !Ref MasterUsername
      MasterUserPassword: !Ref MasterUserPassword
    Type: 'AWS::RDS::DBInstance'
```

### Deploying RDS Custom for Oracle with single and multiple Availability Zones
<a name="aws-resource-rds-dbinstance--examples--Deploying_RDS_Custom_for_Oracle_with_single_and_multiple_Availability_Zones"></a>

These examples deploy RDS Custom for Oracle with single and multi-AZ support. The prerequisites template creates the required infrastructure, and the second template creates Custom Engine Versions (CEVs) as well as both single-AZ and multi-AZ RDS Custom for Oracle instances. For more information, see [Deploying RDS Custom for Oracle with CloudFormation](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/custom-oracle-multiaz-deployment.html) in the *Amazon RDS User Guide*.

#### JSON
<a name="aws-resource-rds-dbinstance--examples--Deploying_RDS_Custom_for_Oracle_with_single_and_multiple_Availability_Zones--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "CloudFormation Template for the Pre-reqs of RDS Custom for Oracle",

    "Resources": {
        "RDSVPC": {
            "Type": "AWS::EC2::VPC",
            "Properties": {
                "EnableDnsSupport": "true",
                "EnableDnsHostnames": "true",
                "CidrBlock": "10.20.0.0/16",
                "Tags": [
                    {
                        "Key": "Name",
                        "Value": {
                            "Fn::Join": [
                                "-",
                                [
                                    {
                                        "Ref": "AWS::StackName"
                                    },
                                    "RDSVPC"
                                ]
                            ]
                        }
                    }
                ]
            }
        },
        "Subnet1": {
            "Type": "AWS::EC2::Subnet",
            "Properties": {
                "VpcId": {
                    "Ref": "RDSVPC"
                },
                "CidrBlock": "10.20.1.0/24",
                "AvailabilityZone": {
                    "Fn::Select": [
                        0,
                        {
                            "Fn::GetAZs": ""
                        }
                    ]
                },
                "Tags": [
                    {
                        "Key": "Name",
                        "Value": {
                            "Fn::Join": [
                                "-",
                                [
                                    {
                                        "Ref": "AWS::StackName"
                                    },
                                    "Subnet1"
                                ]
                            ]
                        }
                    }
                ]
            }
        },
        "Subnet2": {
            "Type": "AWS::EC2::Subnet",
            "Properties": {
                "VpcId": {
                    "Ref": "RDSVPC"
                },
                "CidrBlock": "10.20.2.0/24",
                "AvailabilityZone": {
                    "Fn::Select": [
                        1,
                        {
                            "Fn::GetAZs": ""
                        }
                    ]
                },
                "Tags": [
                    {
                        "Key": "Name",
                        "Value": {
                            "Fn::Join": [
                                "-",
                                [
                                    {
                                        "Ref": "AWS::StackName"
                                    },
                                    "Subnet2"
                                ]
                            ]
                        }
                    }
                ]
            }
        },
        "Subnet3": {
            "Type": "AWS::EC2::Subnet",
            "Properties": {
                "VpcId": {
                    "Ref": "RDSVPC"
                },
                "CidrBlock": "10.20.3.0/24",
                "AvailabilityZone": {
                    "Fn::Select": [
                        2,
                        {
                            "Fn::GetAZs": ""
                        }
                    ]
                },
                "Tags": [
                    {
                        "Key": "Name",
                        "Value": {
                            "Fn::Join": [
                                "-",
                                [
                                    {
                                        "Ref": "AWS::StackName"
                                    },
                                    "Subnet3"
                                ]
                            ]
                        }
                    }
                ]
            }
        },
        "Subnet4": {
            "Type": "AWS::EC2::Subnet",
            "Properties": {
                "VpcId": {
                    "Ref": "RDSVPC"
                },
                "CidrBlock": "10.20.4.0/24",
                "AvailabilityZone": {
                    "Fn::Select": [
                        2,
                        {
                            "Fn::GetAZs": ""
                        }
                    ]
                },
                "Tags": [
                    {
                        "Key": "Name",
                        "Value": {
                            "Fn::Join": [
                                "-",
                                [
                                    {
                                        "Ref": "AWS::StackName"
                                    },
                                    "Subnet4"
                                ]
                            ]
                        }
                    }
                ]
            }
        },
        "InternetGateway": {
            "Type": "AWS::EC2::InternetGateway",
            "Properties": {
                "Tags": [
                    {
                        "Key": "Name",
                        "Value": {
                            "Fn::Join": [
                                "-",
                                [
                                    {
                                        "Ref": "AWS::StackName"
                                    },
                                    "InternetGateway"
                                ]
                            ]
                        }
                    }
                ]
            }
        },
        "AttachGateway": {
            "Type": "AWS::EC2::VPCGatewayAttachment",
            "Properties": {
                "VpcId": {
                    "Ref": "RDSVPC"
                },
                "InternetGatewayId": {
                    "Ref": "InternetGateway"
                }
            }
        },
        "RouteTablePvt": {
            "Type": "AWS::EC2::RouteTable",
            "Properties": {
                "VpcId": {
                    "Ref": "RDSVPC"
                },
                "Tags": [
                    {
                        "Key": "Name",
                        "Value": {
                            "Fn::Join": [
                                "-",
                                [
                                    {
                                        "Ref": "AWS::StackName"
                                    },
                                    "RouteTablePvt"
                                ]
                            ]
                        }
                    }
                ]
            }
        },
        "RouteTablePub": {
            "Type": "AWS::EC2::RouteTable",
            "Properties": {
                "VpcId": {
                    "Ref": "RDSVPC"
                },
                "Tags": [
                    {
                        "Key": "Name",
                        "Value": {
                            "Fn::Join": [
                                "-",
                                [
                                    {
                                        "Ref": "AWS::StackName"
                                    },
                                    "RouteTablePub"
                                ]
                            ]
                        }
                    }
                ]
            }
        },
        "RoutePub": {
            "Type": "AWS::EC2::Route",
            "DependsOn": "AttachGateway",
            "Properties": {
                "RouteTableId": {
                    "Ref": "RouteTablePub"
                },
                "DestinationCidrBlock": "0.0.0.0/0",
                "GatewayId": {
                    "Ref": "InternetGateway"
                }
            }
        },
        "Subnet1RouteTableAssociation": {
            "Type": "AWS::EC2::SubnetRouteTableAssociation",
            "Properties": {
                "SubnetId": {
                    "Ref": "Subnet1"
                },
                "RouteTableId": {
                    "Ref": "RouteTablePvt"
                }
            }
        },
        "Subnet2RouteTableAssociation": {
            "Type": "AWS::EC2::SubnetRouteTableAssociation",
            "Properties": {
                "SubnetId": {
                    "Ref": "Subnet2"
                },
                "RouteTableId": {
                    "Ref": "RouteTablePvt"
                }
            }
        },
        "Subnet3RouteTableAssociation": {
            "Type": "AWS::EC2::SubnetRouteTableAssociation",
            "Properties": {
                "SubnetId": {
                    "Ref": "Subnet3"
                },
                "RouteTableId": {
                    "Ref": "RouteTablePvt"
                }
            }
        },
        "Subnet4RouteTableAssociation": {
            "Type": "AWS::EC2::SubnetRouteTableAssociation",
            "Properties": {
                "SubnetId": {
                    "Ref": "Subnet4"
                },
                "RouteTableId": {
                    "Ref": "RouteTablePub"
                }
            }
        },
        "RDSSG": {
            "Type": "AWS::EC2::SecurityGroup",
            "Properties": {
                "GroupDescription": "Security Group for RDS Oracle Custom instances",
                "GroupName": "rds-custom-db-sg",
                "SecurityGroupIngress": [
                    {
                        "IpProtocol": "tcp",
                        "FromPort": "0",
                        "ToPort": "65535",
                        "CidrIp": "10.20.0.0/16",
                        "Description": "Allows all traffic from within the same VPC"
                    }
                ],
                "SecurityGroupEgress": [
                    {
                        "IpProtocol": -1,
                        "CidrIp": "0.0.0.0/0",
                        "Description": "Allows outbound communication"
                    }
                ],
                "VpcId": {
                    "Ref": "RDSVPC"
                }
            }
        },
        "VPCESG": {
            "Type": "AWS::EC2::SecurityGroup",
            "Properties": {
                "GroupDescription": "Security Group for VPC Endpoints",
                "GroupName": "rds-custom-vpce-sg",
                "SecurityGroupIngress": [
                    {
                        "IpProtocol": "tcp",
                        "FromPort": "443",
                        "ToPort": "443",
                        "CidrIp": "10.20.0.0/16",
                        "Description": "Allows SSM access from the RDS Oracle DB instance"
                    }
                ],
                "SecurityGroupEgress": [
                    {
                        "IpProtocol": -1,
                        "CidrIp": "0.0.0.0/0",
                        "Description": "Allows outbound communication"
                    }
                ],
                "VpcId": {
                    "Ref": "RDSVPC"
                }
            }
        },
        "DBSubnetGroup": {
            "Type": "AWS::RDS::DBSubnetGroup",
            "Properties": {
                "DBSubnetGroupName": "rds-custom-private",
                "DBSubnetGroupDescription": "RDS Custom Private Network",
                "SubnetIds": [
                    {
                        "Ref": "Subnet1"
                    },
                    {
                        "Ref": "Subnet2"
                    },
                    {
                        "Ref": "Subnet3"
                    }
                ]
            }
        },
        "vpceS3": {
            "Type": "AWS::EC2::VPCEndpoint",
            "Properties": {
                "RouteTableIds": [
                    {
                        "Ref": "RouteTablePvt"
                    }
                ],
                "ServiceName": {
                    "Fn::Sub": "com.amazonaws.${AWS::Region}.s3"
                },
                "VpcId": {
                    "Ref": "RDSVPC"
                }
            }
        },
        "vpceEC2": {
            "Type": "AWS::EC2::VPCEndpoint",
            "Properties": {
                "VpcEndpointType": "Interface",
                "PrivateDnsEnabled": true,
                "SubnetIds": [
                    {
                        "Ref": "Subnet1"
                    },
                    {
                        "Ref": "Subnet2"
                    },
                    {
                        "Ref": "Subnet3"
                    }
                ],
                "ServiceName": {
                    "Fn::Sub": "com.amazonaws.${AWS::Region}.ec2"
                },
                "VpcId": {
                    "Ref": "RDSVPC"
                },
                "SecurityGroupIds": [
                    {
                        "Ref": "VPCESG"
                    }
                ]
            }
        },
        "vpceEC2Messages": {
            "Type": "AWS::EC2::VPCEndpoint",
            "Properties": {
                "VpcEndpointType": "Interface",
                "PrivateDnsEnabled": true,
                "SubnetIds": [
                    {
                        "Ref": "Subnet1"
                    },
                    {
                        "Ref": "Subnet2"
                    },
                    {
                        "Ref": "Subnet3"
                    }
                ],
                "ServiceName": {
                    "Fn::Sub": "com.amazonaws.${AWS::Region}.ec2messages"
                },
                "VpcId": {
                    "Ref": "RDSVPC"
                },
                "SecurityGroupIds": [
                    {
                        "Ref": "VPCESG"
                    }
                ]
            }
        },
        "vpceMonitoring": {
            "Type": "AWS::EC2::VPCEndpoint",
            "Properties": {
                "VpcEndpointType": "Interface",
                "PrivateDnsEnabled": true,
                "SubnetIds": [
                    {
                        "Ref": "Subnet1"
                    },
                    {
                        "Ref": "Subnet2"
                    },
                    {
                        "Ref": "Subnet3"
                    }
                ],
                "ServiceName": {
                    "Fn::Sub": "com.amazonaws.${AWS::Region}.monitoring"
                },
                "VpcId": {
                    "Ref": "RDSVPC"
                },
                "SecurityGroupIds": [
                    {
                        "Ref": "VPCESG"
                    }
                ]
            }
        },
        "vpceSSM": {
            "Type": "AWS::EC2::VPCEndpoint",
            "Properties": {
                "VpcEndpointType": "Interface",
                "PrivateDnsEnabled": true,
                "SubnetIds": [
                    {
                        "Ref": "Subnet1"
                    },
                    {
                        "Ref": "Subnet2"
                    },
                    {
                        "Ref": "Subnet3"
                    }
                ],
                "ServiceName": {
                    "Fn::Sub": "com.amazonaws.${AWS::Region}.ssm"
                },
                "VpcId": {
                    "Ref": "RDSVPC"
                },
                "SecurityGroupIds": [
                    {
                        "Ref": "VPCESG"
                    }
                ]
            }
        },
        "vpceSSMMessages": {
            "Type": "AWS::EC2::VPCEndpoint",
            "Properties": {
                "VpcEndpointType": "Interface",
                "PrivateDnsEnabled": true,
                "SubnetIds": [
                    {
                        "Ref": "Subnet1"
                    },
                    {
                        "Ref": "Subnet2"
                    },
                    {
                        "Ref": "Subnet3"
                    }
                ],
                "ServiceName": {
                    "Fn::Sub": "com.amazonaws.${AWS::Region}.ssmmessages"
                },
                "VpcId": {
                    "Ref": "RDSVPC"
                },
                "SecurityGroupIds": [
                    {
                        "Ref": "VPCESG"
                    }
                ]
            }
        },
        "vpceLogs": {
            "Type": "AWS::EC2::VPCEndpoint",
            "Properties": {
                "VpcEndpointType": "Interface",
                "PrivateDnsEnabled": true,
                "SubnetIds": [
                    {
                        "Ref": "Subnet1"
                    },
                    {
                        "Ref": "Subnet2"
                    },
                    {
                        "Ref": "Subnet3"
                    }
                ],
                "ServiceName": {
                    "Fn::Sub": "com.amazonaws.${AWS::Region}.logs"
                },
                "VpcId": {
                    "Ref": "RDSVPC"
                },
                "SecurityGroupIds": [
                    {
                        "Ref": "VPCESG"
                    }
                ]
            }
        },
        "vpceEvents": {
            "Type": "AWS::EC2::VPCEndpoint",
            "Properties": {
                "VpcEndpointType": "Interface",
                "PrivateDnsEnabled": true,
                "SubnetIds": [
                    {
                        "Ref": "Subnet1"
                    },
                    {
                        "Ref": "Subnet2"
                    },
                    {
                        "Ref": "Subnet3"
                    }
                ],
                "ServiceName": {
                    "Fn::Sub": "com.amazonaws.${AWS::Region}.events"
                },
                "VpcId": {
                    "Ref": "RDSVPC"
                },
                "SecurityGroupIds": [
                    {
                        "Ref": "VPCESG"
                    }
                ]
            }
        },
        "vpceSecretsManager": {
            "Type": "AWS::EC2::VPCEndpoint",
            "Properties": {
                "VpcEndpointType": "Interface",
                "PrivateDnsEnabled": true,
                "SubnetIds": [
                    {
                        "Ref": "Subnet1"
                    },
                    {
                        "Ref": "Subnet2"
                    },
                    {
                        "Ref": "Subnet3"
                    }
                ],
                "ServiceName": {
                    "Fn::Sub": "com.amazonaws.${AWS::Region}.secretsmanager"
                },
                "VpcId": {
                    "Ref": "RDSVPC"
                },
                "SecurityGroupIds": [
                    {
                        "Ref": "VPCESG"
                    }
                ]
            }
        },
        "vpceSQS": {
            "Type": "AWS::EC2::VPCEndpoint",
            "Properties": {
                "VpcEndpointType": "Interface",
                "PrivateDnsEnabled": true,
                "SubnetIds": [
                    {
                        "Ref": "Subnet1"
                    },
                    {
                        "Ref": "Subnet2"
                    },
                    {
                        "Ref": "Subnet3"
                    }
                ],
                "ServiceName": {
                    "Fn::Sub": "com.amazonaws.${AWS::Region}.sqs"
                },
                "VpcId": {
                    "Ref": "RDSVPC"
                },
                "SecurityGroupIds": [
                    {
                        "Ref": "VPCESG"
                    }
                ]
            }
        },
        "KMSKey": {
            "Type": "AWS::KMS::Key",
            "Properties": {
                "Description": "Symmetric key for the CEV",
                "Enabled": true,
                "EnableKeyRotation": false,
                "KeyPolicy": {
                    "Version": "2012-10-17"		 	 	 ,
                    "Id": "key-default-1",
                    "Statement": {
                        "Sid": "Enable IAM policies",
                        "Effect": "Allow",
                        "Principal": {
                            "AWS": {
                                "Fn::Join": [
                                    ":",
                                    [
                                        "arn",
                                        {
                                            "Ref": "AWS::Partition"
                                        },
                                        "iam:",
                                        {
                                            "Ref": "AWS::AccountId"
                                        },
                                        "root"
                                    ]
                                ]
                            }
                        },
                        "Action": "kms:*",
                        "Resource": "*"
                    }
                },
                "KeySpec": "SYMMETRIC_DEFAULT",
                "KeyUsage": "ENCRYPT_DECRYPT",
                "MultiRegion": false
            }
        },
        "KMSKeyAlias": {
            "Type": "AWS::KMS::Alias",
            "Properties": {
                "AliasName": "alias/rds-custom",
                "TargetKeyId": {
                    "Ref": "KMSKey"
                }
            }
        },
        "RDSCustomInstanceServiceRole": {
            "Type": "AWS::IAM::Role",
            "Properties": {
                "RoleName": {
                    "Fn::Sub": "AWSRDSCustomInstanceRole-${AWS::Region}"
                },
                "AssumeRolePolicyDocument": {
                    "Version": "2012-10-17"		 	 	 ,
                    "Statement": [
                        {
                            "Action": "sts:AssumeRole",
                            "Effect": "Allow",
                            "Principal": {
                                "Service": "ec2.amazonaws.com"
                            }
                        }
                    ]
                },
                "Path": "/",
                "Policies": [
                    {
                        "PolicyName": "AWSRDSCustomEc2InstanceRolePolicy",
                        "PolicyDocument": {
                            "Version": "2012-10-17"		 	 	 ,
                            "Statement": [
                                {
                                    "Sid": "1",
                                    "Effect": "Allow",
                                    "Action": [
                                        "ssm:DescribeAssociation",
                                        "ssm:GetDeployablePatchSnapshotForInstance",
                                        "ssm:GetDocument",
                                        "ssm:DescribeDocument",
                                        "ssm:GetManifest",
                                        "ssm:GetParameter",
                                        "ssm:GetParameters",
                                        "ssm:ListAssociations",
                                        "ssm:ListInstanceAssociations",
                                        "ssm:PutInventory",
                                        "ssm:PutComplianceItems",
                                        "ssm:PutConfigurePackageResult",
                                        "ssm:UpdateAssociationStatus",
                                        "ssm:UpdateInstanceAssociationStatus",
                                        "ssm:UpdateInstanceInformation",
                                        "ssm:GetConnectionStatus",
                                        "ssm:DescribeInstanceInformation",
                                        "ssmmessages:CreateControlChannel",
                                        "ssmmessages:CreateDataChannel",
                                        "ssmmessages:OpenControlChannel",
                                        "ssmmessages:OpenDataChannel"
                                    ],
                                    "Resource": [
                                        "*"
                                    ]
                                },
                                {
                                    "Sid": "2",
                                    "Effect": "Allow",
                                    "Action": [
                                        "ec2messages:AcknowledgeMessage",
                                        "ec2messages:DeleteMessage",
                                        "ec2messages:FailMessage",
                                        "ec2messages:GetEndpoint",
                                        "ec2messages:GetMessages",
                                        "ec2messages:SendReply"
                                    ],
                                    "Resource": [
                                        "*"
                                    ]
                                },
                                {
                                    "Sid": "3",
                                    "Effect": "Allow",
                                    "Action": [
                                        "logs:PutRetentionPolicy",
                                        "logs:PutLogEvents",
                                        "logs:DescribeLogStreams",
                                        "logs:DescribeLogGroups",
                                        "logs:CreateLogStream",
                                        "logs:CreateLogGroup"
                                    ],
                                    "Resource": [
                                        {
                                            "Fn::Sub": "arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:rds-custom-instance*"
                                        }
                                    ]
                                },
                                {
                                    "Sid": "4",
                                    "Effect": "Allow",
                                    "Action": [
                                        "s3:putObject",
                                        "s3:getObject",
                                        "s3:getObjectVersion"
                                    ],
                                    "Resource": [
                                        {
                                            "Fn::Sub": "arn:${AWS::Partition}:s3:::do-not-delete-rds-custom-*/*"
                                        }
                                    ]
                                },
                                {
                                    "Sid": "5",
                                    "Effect": "Allow",
                                    "Action": [
                                        "cloudwatch:PutMetricData"
                                    ],
                                    "Resource": [
                                        "*"
                                    ],
                                    "Condition": {
                                        "StringEquals": {
                                            "cloudwatch:namespace": [
                                                "RDSCustomForOracle/Agent"
                                            ]
                                        }
                                    }
                                },
                                {
                                    "Sid": "6",
                                    "Effect": "Allow",
                                    "Action": [
                                        "events:PutEvents"
                                    ],
                                    "Resource": [
                                        "*"
                                    ]
                                },
                                {
                                    "Sid": "7",
                                    "Effect": "Allow",
                                    "Action": [
                                        "secretsmanager:GetSecretValue",
                                        "secretsmanager:DescribeSecret"
                                    ],
                                    "Resource": [
                                        {
                                            "Fn::Sub": "arn:${AWS::Partition}:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:do-not-delete-rds-custom-*"
                                        },
                                        {
                                            "Fn::Sub": "arn:${AWS::Partition}:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:rds-custom!oracle-do-not-delete-*"
                                        }
                                    ]
                                },
                                {
                                    "Sid": "8",
                                    "Effect": "Allow",
                                    "Action": [
                                        "s3:ListBucketVersions"
                                    ],
                                    "Resource": [
                                        {
                                            "Fn::Sub": "arn:${AWS::Partition}:s3:::do-not-delete-rds-custom-*"
                                        }
                                    ]
                                },
                                {
                                    "Sid": "9",
                                    "Effect": "Allow",
                                    "Action": "ec2:CreateSnapshots",
                                    "Resource": [
                                        {
                                            "Fn::Sub": "arn:${AWS::Partition}:ec2:*:*:instance/*"
                                        },
                                        {
                                            "Fn::Sub": "arn:${AWS::Partition}:ec2:*:*:volume/*"
                                        }
                                    ],
                                    "Condition": {
                                        "StringEquals": {
                                            "ec2:ResourceTag/AWSRDSCustom": "custom-oracle"
                                        }
                                    }
                                },
                                {
                                    "Sid": "10",
                                    "Effect": "Allow",
                                    "Action": "ec2:CreateSnapshots",
                                    "Resource": [
                                        {
                                            "Fn::Sub": "arn:${AWS::Partition}:ec2:*::snapshot/*"
                                        }
                                    ]
                                },
                                {
                                    "Sid": "11",
                                    "Effect": "Allow",
                                    "Action": [
                                        "kms:Decrypt",
                                        "kms:GenerateDataKey"
                                    ],
                                    "Resource": [
                                        {
                                            "Fn::GetAtt": [
                                                "KMSKey",
                                                "Arn"
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "Sid": "12",
                                    "Effect": "Allow",
                                    "Action": "ec2:CreateTags",
                                    "Resource": "*",
                                    "Condition": {
                                        "StringLike": {
                                            "ec2:CreateAction": [
                                                "CreateSnapshots"
                                            ]
                                        }
                                    }
                                },
                                {
                                    "Sid": "13",
                                    "Effect": "Allow",
                                    "Action": [
                                        "sqs:SendMessage",
                                        "sqs:ReceiveMessage",
                                        "sqs:DeleteMessage",
                                        "sqs:GetQueueUrl"
                                    ],
                                    "Resource": [
                                        {
                                            "Fn::Sub": "arn:${AWS::Partition}:sqs:${AWS::Region}:${AWS::AccountId}:do-not-delete-rds-custom-*"
                                        }
                                    ],
                                    "Condition": {
                                        "StringLike": {
                                            "aws:ResourceTag/AWSRDSCustom": "custom-oracle"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                ]
            }
        },
        "RDSCustomInstanceProfile": {
            "Type": "AWS::IAM::InstanceProfile",
            "Properties": {
                "InstanceProfileName": "AWSRDSCustomInstanceProfileForRdsCustomInstance",
                "Path": "/",
                "Roles": [
                    {
                        "Ref": "RDSCustomInstanceServiceRole"
                    }
                ]
            }
        },
        "PublicSubnetParameter": {
            "Type": "AWS::SSM::Parameter",
            "Properties": {
                "Description": "The subnet ID of the public subnet",
                "Name": "PublicSubnetParameter",
                "Type": "String",
                "Value": {
                    "Ref": "Subnet4"
                }
            }
        },
        "RDSSGParameter": {
            "Type": "AWS::SSM::Parameter",
            "Properties": {
                "Description": "The security group ID of the RDSSG",
                "Name": "RDSSGParameter",
                "Type": "String",
                "Value": {
                    "Fn::GetAtt": [
                        "RDSSG",
                        "GroupId"
                    ]
                }
            }
        },
        "RDSKMSParameter": {
            "Type": "AWS::SSM::Parameter",
            "Properties": {
                "Description": "KMS Key",
                "Name": "KMSParameter",
                "Type": "String",
                "Value": {
                    "Fn::GetAtt": [
                        "KMSKey",
                        "KeyId"
                    ]
                }
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-dbinstance--examples--Deploying_RDS_Custom_for_Oracle_with_single_and_multiple_Availability_Zones--yaml"></a>

```
# AWSTemplateFormatVersion: 2010-09-09
# RDS Custom for AWS RDS Oracle
# 06/15/2025  created by Sharath Chandra Kampili

AWSTemplateFormatVersion: '2010-09-09'
Description: CloudFormation Template for the pre-reqs of RDS Custom for Oracle

Resources:
  RDSVPC:
    Type: AWS::EC2::VPC
    Properties:
      EnableDnsSupport: 'true'
      EnableDnsHostnames: 'true'
      CidrBlock: 10.20.0.0/16
      Tags:
      - Key: Name
        Value:
          Fn::Join:
          - "-"
          - - !Ref AWS::StackName
            - RDSVPC
  Subnet1:
    Type: AWS::EC2::Subnet
    Properties:
      VpcId: !Ref RDSVPC
      CidrBlock: 10.20.1.0/24
      AvailabilityZone: !Select [0, !GetAZs ]
      Tags:
      - Key: Name
        Value:
          Fn::Join:
          - "-"
          - - !Ref AWS::StackName
            - Subnet1
  Subnet2:
    Type: AWS::EC2::Subnet
    Properties:
      VpcId: !Ref RDSVPC
      CidrBlock: 10.20.2.0/24
      AvailabilityZone: !Select [1, !GetAZs ]
      Tags:
      - Key: Name
        Value:
          Fn::Join:
          - "-"
          - - !Ref AWS::StackName
            - Subnet2
  Subnet3:
    Type: AWS::EC2::Subnet
    Properties:
      VpcId: !Ref RDSVPC
      CidrBlock: 10.20.3.0/24
      AvailabilityZone: !Select [2, !GetAZs ]
      Tags:
      - Key: Name
        Value:
          Fn::Join:
          - "-"
          - - !Ref AWS::StackName
            - Subnet3
  Subnet4:
    Type: AWS::EC2::Subnet
    Properties:
      VpcId: !Ref RDSVPC
      CidrBlock: 10.20.4.0/24
      AvailabilityZone: !Select [2, !GetAZs ]
      Tags:
      - Key: Name
        Value:
          Fn::Join:
          - "-"
          - - !Ref AWS::StackName
            - Subnet4
  
  InternetGateway:
    Type: AWS::EC2::InternetGateway
    Properties:
      Tags:
      - Key: Name
        Value:
          Fn::Join:
          - "-"
          - - !Ref AWS::StackName
            - InternetGateway
  AttachGateway:
    Type: AWS::EC2::VPCGatewayAttachment
    Properties:
      VpcId: !Ref RDSVPC
      InternetGatewayId: !Ref InternetGateway

  RouteTablePvt:
    Type: AWS::EC2::RouteTable
    Properties:
      VpcId: !Ref RDSVPC
      Tags:
      - Key: Name
        Value:
          Fn::Join:
          - "-"
          - - !Ref AWS::StackName
            - RouteTablePvt
  RouteTablePub:
    Type: AWS::EC2::RouteTable
    Properties:
      VpcId: !Ref RDSVPC
      Tags:
      - Key: Name
        Value:
          Fn::Join:
          - "-"
          - - !Ref AWS::StackName
            - RouteTablePub
  RoutePub:
    Type: AWS::EC2::Route
    DependsOn: AttachGateway
    Properties:
      RouteTableId: !Ref RouteTablePub
      DestinationCidrBlock: 0.0.0.0/0
      GatewayId: !Ref InternetGateway

  Subnet1RouteTableAssociation:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      SubnetId: !Ref Subnet1
      RouteTableId: !Ref RouteTablePvt
  Subnet2RouteTableAssociation:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      SubnetId: !Ref Subnet2
      RouteTableId: !Ref RouteTablePvt
  Subnet3RouteTableAssociation:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      SubnetId: !Ref Subnet3
      RouteTableId: !Ref RouteTablePvt
  Subnet4RouteTableAssociation:
    Type: AWS::EC2::SubnetRouteTableAssociation
    Properties:
      SubnetId: !Ref Subnet4
      RouteTableId: !Ref RouteTablePub



  RDSSG:
    Type: AWS::EC2::SecurityGroup
    Properties: 
      GroupDescription: Security Group for RDS Oracle Custom instances
      GroupName: rds-custom-db-sg
      SecurityGroupIngress:
        - IpProtocol: tcp
          FromPort: '0'
          ToPort: '65535'
          CidrIp: 10.20.0.0/16
          Description: Allows all traffic from within the same VPC
      SecurityGroupEgress:
        - IpProtocol: -1
          CidrIp: 0.0.0.0/0
          Description: Allows outbound communication
      VpcId: !Ref RDSVPC
  VPCESG:
    Type: AWS::EC2::SecurityGroup
    Properties: 
      GroupDescription: Security Group for VPC Endpoints
      GroupName: rds-custom-vpce-sg
      SecurityGroupIngress:
        - IpProtocol: tcp
          FromPort: '443'
          ToPort: '443'
          CidrIp: 10.20.0.0/16
          Description: Allows SSM access from the RDS Oracle DB instance
      SecurityGroupEgress:
        - IpProtocol: -1
          CidrIp: 0.0.0.0/0
          Description: Allows outbound communication
      VpcId: !Ref RDSVPC

  DBSubnetGroup:
    Type: AWS::RDS::DBSubnetGroup
    Properties:
      DBSubnetGroupName: rds-custom-private
      DBSubnetGroupDescription: RDS Custom Private Network
      SubnetIds:
      - !Ref Subnet1
      - !Ref Subnet2
      - !Ref Subnet3
  vpceS3:
    Type: AWS::EC2::VPCEndpoint
    Properties:
      RouteTableIds:
      - Ref: RouteTablePvt
      ServiceName:
        Fn::Sub: com.amazonaws.${AWS::Region}.s3
      VpcId: !Ref RDSVPC
  vpceEC2:
    Type: AWS::EC2::VPCEndpoint
    Properties:
      VpcEndpointType: Interface
      PrivateDnsEnabled: true
      SubnetIds:
      - !Ref Subnet1
      - !Ref Subnet2
      - !Ref Subnet3
      ServiceName:
        Fn::Sub: com.amazonaws.${AWS::Region}.ec2
      VpcId: !Ref RDSVPC
      SecurityGroupIds: 
      - !Ref VPCESG
  vpceEC2Messages:
    Type: AWS::EC2::VPCEndpoint
    Properties:
      VpcEndpointType: Interface
      PrivateDnsEnabled: true
      SubnetIds:
      - !Ref Subnet1
      - !Ref Subnet2
      - !Ref Subnet3
      ServiceName:
        Fn::Sub: com.amazonaws.${AWS::Region}.ec2messages
      VpcId: !Ref RDSVPC
      SecurityGroupIds: 
      - !Ref VPCESG
  vpceMonitoring:
    Type: AWS::EC2::VPCEndpoint
    Properties:
      VpcEndpointType: Interface
      PrivateDnsEnabled: true
      SubnetIds:
      - !Ref Subnet1
      - !Ref Subnet2
      - !Ref Subnet3
      ServiceName:
        Fn::Sub: com.amazonaws.${AWS::Region}.monitoring
      VpcId: !Ref RDSVPC
      SecurityGroupIds: 
      - !Ref VPCESG
  vpceSSM:
    Type: AWS::EC2::VPCEndpoint
    Properties:
      VpcEndpointType: Interface
      PrivateDnsEnabled: true
      SubnetIds:
      - !Ref Subnet1
      - !Ref Subnet2
      - !Ref Subnet3
      ServiceName:
        Fn::Sub: com.amazonaws.${AWS::Region}.ssm
      VpcId: !Ref RDSVPC
      SecurityGroupIds: 
      - !Ref VPCESG
  vpceSSMMessages:
    Type: AWS::EC2::VPCEndpoint
    Properties:
      VpcEndpointType: Interface
      PrivateDnsEnabled: true
      SubnetIds:
      - !Ref Subnet1
      - !Ref Subnet2
      - !Ref Subnet3
      ServiceName:
        Fn::Sub: com.amazonaws.${AWS::Region}.ssmmessages
      VpcId: !Ref RDSVPC
      SecurityGroupIds: 
      - !Ref VPCESG
  vpceLogs:
    Type: AWS::EC2::VPCEndpoint
    Properties:
      VpcEndpointType: Interface
      PrivateDnsEnabled: true
      SubnetIds:
      - !Ref Subnet1
      - !Ref Subnet2
      - !Ref Subnet3
      ServiceName:
        Fn::Sub: com.amazonaws.${AWS::Region}.logs
      VpcId: !Ref RDSVPC
      SecurityGroupIds: 
      - !Ref VPCESG
  vpceEvents:
    Type: AWS::EC2::VPCEndpoint
    Properties:
      VpcEndpointType: Interface
      PrivateDnsEnabled: true
      SubnetIds:
      - !Ref Subnet1
      - !Ref Subnet2
      - !Ref Subnet3
      ServiceName:
        Fn::Sub: com.amazonaws.${AWS::Region}.events
      VpcId: !Ref RDSVPC
      SecurityGroupIds: 
      - !Ref VPCESG
  vpceSecretsManager:
    Type: AWS::EC2::VPCEndpoint
    Properties:
      VpcEndpointType: Interface
      PrivateDnsEnabled: true
      SubnetIds:
      - !Ref Subnet1
      - !Ref Subnet2
      - !Ref Subnet3
      ServiceName:
        Fn::Sub: com.amazonaws.${AWS::Region}.secretsmanager
      VpcId: !Ref RDSVPC
      SecurityGroupIds: 
      - !Ref VPCESG
  vpceSQS:
    Type: AWS::EC2::VPCEndpoint
    Properties:
      VpcEndpointType: Interface
      PrivateDnsEnabled: true
      SubnetIds:
      - !Ref Subnet1
      - !Ref Subnet2
      - !Ref Subnet3
      ServiceName:
        Fn::Sub: com.amazonaws.${AWS::Region}.sqs
      VpcId: !Ref RDSVPC
      SecurityGroupIds: 
      - !Ref VPCESG      
  KMSKey:
    Type: "AWS::KMS::Key"
    Properties: 
      Description: "Symmetric key for the CEV"
      Enabled: true
      EnableKeyRotation: false
      KeyPolicy: 
        Version: "2012-10-17"
        Id: "key-default-1"
        Statement:
          Sid: "Enable IAM policies"
          Effect: "Allow"
          Principal:
            AWS: !Join [ ':', [ 'arn', !Ref AWS::Partition, 'iam:', !Ref AWS::AccountId, 'root' ] ]
          Action: kms:*
          Resource: '*'
      KeySpec: "SYMMETRIC_DEFAULT"
      KeyUsage: "ENCRYPT_DECRYPT"
      MultiRegion: false
  KMSKeyAlias:
    Type: AWS::KMS::Alias
    Properties: 
      AliasName: 'alias/rds-custom'
      TargetKeyId: !Ref KMSKey
  RDSCustomInstanceServiceRole:
    Type: AWS::IAM::Role
    Properties:
      RoleName:
        Fn::Sub: AWSRDSCustomInstanceRole-${AWS::Region}
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Action: sts:AssumeRole
            Effect: Allow
            Principal:
              Service: ec2.amazonaws.com
      Path: /
      Policies:
        - PolicyName: AWSRDSCustomEc2InstanceRolePolicy
          PolicyDocument:
            Version: '2012-10-17'
            Statement:
              - Sid: '1'
                Effect: Allow
                Action:
                  - ssm:DescribeAssociation
                  - ssm:GetDeployablePatchSnapshotForInstance
                  - ssm:GetDocument
                  - ssm:DescribeDocument
                  - ssm:GetManifest
                  - ssm:GetParameter
                  - ssm:GetParameters
                  - ssm:ListAssociations
                  - ssm:ListInstanceAssociations
                  - ssm:PutInventory
                  - ssm:PutComplianceItems
                  - ssm:PutConfigurePackageResult
                  - ssm:UpdateAssociationStatus
                  - ssm:UpdateInstanceAssociationStatus
                  - ssm:UpdateInstanceInformation
                  - ssm:GetConnectionStatus
                  - ssm:DescribeInstanceInformation
                  - ssmmessages:CreateControlChannel
                  - ssmmessages:CreateDataChannel
                  - ssmmessages:OpenControlChannel
                  - ssmmessages:OpenDataChannel
                Resource:
                  - '*'
              - Sid: '2'
                Effect: Allow
                Action:
                  - ec2messages:AcknowledgeMessage
                  - ec2messages:DeleteMessage
                  - ec2messages:FailMessage
                  - ec2messages:GetEndpoint
                  - ec2messages:GetMessages
                  - ec2messages:SendReply
                Resource:
                  - '*'
              - Sid: '3'
                Effect: Allow
                Action:
                  - logs:PutRetentionPolicy
                  - logs:PutLogEvents
                  - logs:DescribeLogStreams
                  - logs:DescribeLogGroups
                  - logs:CreateLogStream
                  - logs:CreateLogGroup
                Resource:
                  - Fn::Sub: >-
                      arn:${AWS::Partition}:logs:${AWS::Region}:${AWS::AccountId}:log-group:rds-custom-instance*
              - Sid: '4'
                Effect: Allow
                Action:
                  - s3:putObject
                  - s3:getObject
                  - s3:getObjectVersion
                Resource:
                  - Fn::Sub: >-
                      arn:${AWS::Partition}:s3:::do-not-delete-rds-custom-*/*
              - Sid: '5'
                Effect: Allow
                Action:
                  - cloudwatch:PutMetricData
                Resource:
                  - '*'
                Condition:
                  StringEquals:
                    cloudwatch:namespace:
                      - RDSCustomForOracle/Agent
              - Sid: '6'
                Effect: Allow
                Action:
                  - events:PutEvents
                Resource:
                  - '*'
              - Sid: '7'
                Effect: Allow
                Action:
                  - secretsmanager:GetSecretValue
                  - secretsmanager:DescribeSecret
                Resource:
                  - Fn::Sub: arn:${AWS::Partition}:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:do-not-delete-rds-custom-*
                  - Fn::Sub: arn:${AWS::Partition}:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:rds-custom!oracle-do-not-delete-*   
              - Sid: '8'
                Effect: Allow
                Action:
                  - s3:ListBucketVersions
                Resource:
                  - Fn::Sub: >-
                      arn:${AWS::Partition}:s3:::do-not-delete-rds-custom-*
              - Sid: '9'
                Effect: Allow
                Action: ec2:CreateSnapshots
                Resource:
                  - Fn::Sub: arn:${AWS::Partition}:ec2:*:*:instance/*
                  - Fn::Sub: arn:${AWS::Partition}:ec2:*:*:volume/*
                Condition:
                  StringEquals:
                    ec2:ResourceTag/AWSRDSCustom: custom-oracle
              - Sid: '10'
                Effect: Allow
                Action: ec2:CreateSnapshots
                Resource:
                  - Fn::Sub: arn:${AWS::Partition}:ec2:*::snapshot/*
              - Sid: '11'
                Effect: Allow
                Action:
                  - kms:Decrypt
                  - kms:GenerateDataKey
                Resource:
                  - !GetAtt KMSKey.Arn
              - Sid: '12'
                Effect: Allow
                Action: ec2:CreateTags
                Resource: '*'
                Condition:
                  StringLike:
                    ec2:CreateAction:
                      - CreateSnapshots
              - Sid: '13'
                Effect: Allow
                Action:
                  - sqs:SendMessage
                  - sqs:ReceiveMessage
                  - sqs:DeleteMessage
                  - sqs:GetQueueUrl
                Resource:
                  - Fn::Sub: arn:${AWS::Partition}:sqs:${AWS::Region}:${AWS::AccountId}:do-not-delete-rds-custom-*
                Condition:
                  StringLike:
                    aws:ResourceTag/AWSRDSCustom: custom-oracle
                       
  RDSCustomInstanceProfile:
    Type: AWS::IAM::InstanceProfile
    Properties:
      InstanceProfileName: 'AWSRDSCustomInstanceProfileForRdsCustomInstance'
      Path: /
      Roles:
        - !Ref RDSCustomInstanceServiceRole

  PublicSubnetParameter:
    Type: AWS::SSM::Parameter
    Properties: 
      Description: The subnet ID of the public subnet
      Name: PublicSubnetParameter
      Type: String
      Value: !Ref Subnet4
  RDSSGParameter:
    Type: AWS::SSM::Parameter
    Properties: 
      Description: The security group ID of the RDSSG
      Name: RDSSGParameter
      Type: String
      Value: !GetAtt RDSSG.GroupId
  RDSKMSParameter:
    Type: AWS::SSM::Parameter
    Properties: 
      Description: KMS Key
      Name: KMSParameter
      Type: String
      Value: !GetAtt KMSKey.KeyId
```

#### JSON
<a name="aws-resource-rds-dbinstance--examples--Deploying_RDS_Custom_for_Oracle_with_single_and_multiple_Availability_Zones--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "CloudFormation Template for the RDS Custom for Oracle",
    "Parameters": {
        "BucketName": {
            "Type": "String",
            "MinLength": 3,
            "MaxLength": 63,
            "AllowedPattern": "[a-zA-Z0-9.-]*",
            "Description": "S3 bucket name containing Oracle installation files"
        },
        "CEVS3Prefix": {
            "Type": "String",
            "Default": "oracle_cev"
        },
        "RDSSG": {
            "Type": "AWS::SSM::Parameter::Value<String>",
            "Default": "RDSSGParameter"
        },
        "KMSParameter": {
            "Type": "AWS::SSM::Parameter::Value<String>",
            "Default": "KMSParameter"
        },
        "CEVCreation": {
            "Description": "Please select the option \"yes\" for creating the CEV , if not leave it default for creating one for you",
            "Type": "String",
            "Default": "Yes"
        },
        "DBInstanceIdentifier": {
            "Description": "RDS Instance Name for Single AZ",
            "Type": "String",
            "Default": "rds-custom"
        }
    },
    "Conditions": {
        "ShouldAddCEV": {
            "Fn::Equals": [
                {
                    "Ref": "CEVCreation"
                },
                "Yes"
            ]
        }
    },
    "Resources": {
        "SSMExecutionRole": {
            "Type": "AWS::IAM::Role",
            "Properties": {
                "RoleName": {
                    "Fn::Join": [
                        "-",
                        [
                            "SSM-Execution-Role",
                            {
                                "Fn::Select": [
                                    4,
                                    {
                                        "Fn::Split": [
                                            "-",
                                            {
                                                "Fn::Select": [
                                                    2,
                                                    {
                                                        "Fn::Split": [
                                                            "/",
                                                            {
                                                                "Ref": "AWS::StackId"
                                                            }
                                                        ]
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                ]
                            },
                            {
                                "Fn::Sub": "${AWS::Region}"
                            }
                        ]
                    ]
                },
                "ManagedPolicyArns": [
                    {
                        "Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AmazonSSMAutomationRole"
                    },
                    "arn:aws:iam::aws:policy/AmazonRDSFullAccess",
                    "arn:aws:iam::aws:policy/AmazonEC2FullAccess",
                    "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"
                ],
                "AssumeRolePolicyDocument": {
                    "Version": "2012-10-17"		 	 	 ,
                    "Statement": [
                        {
                            "Effect": "Allow",
                            "Principal": {
                                "Service": [
                                    "ec2.amazonaws.com",
                                    "ssm.amazonaws.com"
                                ]
                            },
                            "Action": "sts:AssumeRole"
                        }
                    ]
                }
            }
        },
        "EC2Role": {
            "Type": "AWS::IAM::Role",
            "Properties": {
                "Path": "/",
                "RoleName": {
                    "Fn::Join": [
                        "-",
                        [
                            "EC2-Role",
                            {
                                "Fn::Select": [
                                    4,
                                    {
                                        "Fn::Split": [
                                            "-",
                                            {
                                                "Fn::Select": [
                                                    2,
                                                    {
                                                        "Fn::Split": [
                                                            "/",
                                                            {
                                                                "Ref": "AWS::StackId"
                                                            }
                                                        ]
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                ]
                            },
                            {
                                "Fn::Sub": "${AWS::Region}"
                            }
                        ]
                    ]
                },
                "AssumeRolePolicyDocument": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"ec2.amazonaws.com\"},\"Action\":\"sts:AssumeRole\"}]}",
                "MaxSessionDuration": 43200,
                "ManagedPolicyArns": [
                    "arn:aws:iam::aws:policy/AmazonRDSFullAccess",
                    "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore",
                    "arn:aws:iam::aws:policy/IAMReadOnlyAccess"
                ],
                "Description": "Allows Lambda functions to call AWS services on your behalf.",
                "Policies": [
                    {
                        "PolicyName": {
                            "Fn::Join": [
                                "-",
                                [
                                    "cev-policy-1",
                                    {
                                        "Fn::Select": [
                                            4,
                                            {
                                                "Fn::Split": [
                                                    "-",
                                                    {
                                                        "Fn::Select": [
                                                            2,
                                                            {
                                                                "Fn::Split": [
                                                                    "/",
                                                                    {
                                                                        "Ref": "AWS::StackId"
                                                                    }
                                                                ]
                                                            }
                                                        ]
                                                    }
                                                ]
                                            }
                                        ]
                                    },
                                    {
                                        "Fn::Sub": "${AWS::Region}"
                                    }
                                ]
                            ]
                        },
                        "PolicyDocument": {
                            "Version": "2012-10-17"		 	 	 ,
                            "Statement": [
                                {
                                    "Sid": "CreateKmsGrant",
                                    "Effect": "Allow",
                                    "Action": [
                                        "kms:DescribeKey",
                                        "kms:CreateGrant"
                                    ],
                                    "Resource": "*"
                                },
                                {
                                    "Sid": "CreateS3Bucket",
                                    "Effect": "Allow",
                                    "Action": [
                                        "s3:CreateBucket",
                                        "s3:PutBucketPolicy",
                                        "s3:PutBucketObjectLockConfiguration",
                                        "s3:PutBucketVersioning"
                                    ],
                                    "Resource": "arn:aws:s3:::do-not-delete-rds-custom-*"
                                },
                                {
                                    "Sid": "AccessToS3MediaBucket",
                                    "Effect": "Allow",
                                    "Action": [
                                        "s3:GetObjectAcl",
                                        "s3:GetObject",
                                        "s3:GetObjectTagging",
                                        "s3:ListBucket"
                                    ],
                                    "Resource": [
                                        {
                                            "Fn::Sub": "arn:${AWS::Partition}:s3:::${BucketName}"
                                        },
                                        {
                                           "Fn::Sub": "arn:${AWS::Partition}:s3:::${BucketName}/*"
                                        }
                                    ]
                                },
                                {
                                    "Sid": "PermissionForByom",
                                    "Effect": "Allow",
                                    "Action": [
                                        "mediaimport:CreateDatabaseBinarySnapshot"
                                    ],
                                    "Resource": "*"
                                },
                                {
                                    "Sid": "CreateServiceLinkedRole",
                                    "Effect": "Allow",
                                    "Action": [
                                        "iam:CreateServiceLinkedRole"
                                    ],
                                    "Resource": "arn:aws:iam::*:role/aws-service-role/custom.rds.amazonaws.com/AWSServiceRoleForRDSCustom"
                                }
                            ]
                        }
                    },
                    {
                        "PolicyName": {
                            "Fn::Join": [
                                "-",
                                [
                                    "cev-policy-2",
                                    {
                                        "Fn::Select": [
                                            4,
                                            {
                                                "Fn::Split": [
                                                    "-",
                                                    {
                                                        "Fn::Select": [
                                                            2,
                                                            {
                                                                "Fn::Split": [
                                                                    "/",
                                                                    {
                                                                        "Ref": "AWS::StackId"
                                                                    }
                                                                ]
                                                            }
                                                        ]
                                                    }
                                                ]
                                            }
                                        ]
                                    },
                                    {
                                        "Fn::Sub": "${AWS::Region}"
                                    }
                                ]
                            ]
                        },
                        "PolicyDocument": {
                            "Version": "2012-10-17"		 	 	 ,
                            "Statement": [
                                {
                                    "Sid": "ValidateIamRole",
                                    "Effect": "Allow",
                                    "Action": "iam:SimulatePrincipalPolicy",
                                    "Resource": "*"
                                },
                                {
                                    "Sid": "CreateCloudTrail",
                                    "Effect": "Allow",
                                    "Action": [
                                        "cloudtrail:CreateTrail",
                                        "cloudtrail:StartLogging"
                                    ],
                                    "Resource": [
                                        {
                                            "Fn::Sub": "arn:${AWS::Partition}:cloudtrail:*:*:trail/do-not-delete-rds-custom-*"
                                        }
                                    ]
                                },
                                {
                                    "Sid": "CreateCloudWatchLogStreamAndPushEvents",
                                    "Effect": "Allow",
                                    "Action": [
                                        "logs:CreateLogStream",
                                        "logs:CreateLogGroup",
                                        "logs:DescribeLogStreams",
                                        "logs:GetLogEvents",
                                        "logs:PutLogEvents"
                                    ],
                                    "Resource": "*"
                                },
                                {
                                    "Sid": "IAMPassRole",
                                    "Effect": "Allow",
                                    "Action": [
                                        "iam:PassRole"
                                    ],
                                    "Resource": "arn:aws:iam::*:role/AWSRDSCustomInstanceRole*"
                                }
                            ]
                        }
                    }
                ]
            }
        },
        "CEVWaithandle": {
            "Condition": "ShouldAddCEV",
            "DependsOn": "CustomOracleJanPatch",
            "Type": "AWS::CloudFormation::WaitConditionHandle"
        },
        "WaitHandle": {
            "Type": "AWS::CloudFormation::WaitConditionHandle"
        },
        "WaitCondition": {
            "Type": "AWS::CloudFormation::WaitCondition",
            "Properties": {
                "Handle": {
                    "Fn::If": [
                        "ShouldAddCEV",
                        {
                            "Ref": "CEVWaithandle"
                        },
                        {
                            "Ref": "WaitHandle"
                        }
                    ]
                },
                "Timeout": "1",
                "Count": 0
            }
        },
        "RDSCustomSecret": {
            "Type": "AWS::SecretsManager::Secret",
            "Properties": {
                "Name": {
                    "Fn::Sub": "${AWS::StackName}-rds-custom-secret"
                },
                "Description": "RDS Custom Oracle Admin Password",
                "GenerateSecretString": {
                    "SecretStringTemplate": "{\"username\": \"oraadmin\"}",
                    "GenerateStringKey": "password",
                    "PasswordLength": 16,
                    "ExcludeCharacters": "\"@/\\"
                }
            }
        },    
        "CustomOracleJanPatch": {
            "DependsOn": "SSMExecutionRole",
            "Condition": "ShouldAddCEV",
            "Type": "AWS::RDS::CustomDBEngineVersion",
            "Properties": {
                "DatabaseInstallationFilesS3BucketName": {
                    "Ref": "BucketName"
                },
                "DatabaseInstallationFilesS3Prefix": {
                    "Ref": "CEVS3Prefix"
                },
                "Description": "CEV for RDS custom for Oracle",
                "Engine": "custom-oracle-ee",
                "EngineVersion": "19.18-rdscustom-oracle-jan23psu-cev",
                "KMSKeyId": {
                    "Ref": "KMSParameter"
                },
                "Manifest": "{\"mediaImportTemplateVersion\":\"2020-08-14\",\"databaseInstallationFileNames\":[\"V982063-01.zip\"],\"opatchFileNames\":[\"p6880880_190000_Linux-x86-64.zip\"],\"psuRuPatchFileNames\": [\"p34765931_190000_Linux-x86-64.zip\",\"p34786990_190000_Linux-x86-64.zip\"],\"otherPatchFileNames\": [\"p35099667_190000_Linux-x86-64.zip\",\"p35099674_190000_Generic.zip\",\"p28730253_190000_Linux-x86-64.zip\",\"p29213893_1918000DBRU_Generic.zip\",\"p33125873_1918000DBRU_Linux-x86-64.zip\",\"p35012866_1918000DBRU_Linux-x86-64.zip\"]}"
            }
        },
        "CustomOracleAprCOHMTPatch": {
            "DependsOn": "SSMExecutionRole",
            "Condition": "ShouldAddCEV",
            "Type": "AWS::RDS::CustomDBEngineVersion",
            "Properties": {
                "DatabaseInstallationFilesS3BucketName": {
                    "Ref": "BucketName"
                },
                "DatabaseInstallationFilesS3Prefix": {
                    "Ref": "CEVS3Prefix"
                },
                "Description": "CEV for RDS custom for Oracle",
                "Engine": "custom-oracle-ee-cdb",
                "EngineVersion": "19.19-custom-oracle-home-mt",
                "KMSKeyId": {
                    "Ref": "KMSParameter"
                },
                "Manifest": "{\"mediaImportTemplateVersion\":\"2020-08-14\",\"databaseInstallationFileNames\":[\"V982063-01.zip\"],\"opatchFileNames\":[\"p6880880_190000_Linux-x86-64.zip\"],\"psuRuPatchFileNames\": [\"p35042068_190000_Linux-x86-64.zip\",\"p35050341_190000_Linux-x86-64.zip\"],\"otherPatchFileNames\": [\"p28730253_190000_Linux-x86-64.zip\",\"p29213893_1919000DBRU_Generic.zip\",\"p33125873_1919000DBRU_Linux-x86-64.zip\",\"p35220732_190000_Linux-x86-64.zip\",\"p35239280_190000_Generic.zip\"],\"installationParameters\": { \"unixGroupName\": \"dba\",\"unixGroupId\": 65789,\"unixUname\": \"oracle\",\"unixUid\": 6758,\"oracleHome\": \"/opt/oracle/product/19.19/dbhome_1\",\"oracleBase\": \"/opt/oracle\"}}"
            }
        },
        "CustomOracleAprPatch": {
            "DependsOn": "SSMExecutionRole",
            "Condition": "ShouldAddCEV",
            "Type": "AWS::RDS::CustomDBEngineVersion",
            "Properties": {
                "DatabaseInstallationFilesS3BucketName": {
                    "Ref": "BucketName"
                },
                "DatabaseInstallationFilesS3Prefix": {
                    "Ref": "CEVS3Prefix"
                },
                "Description": "CEV for RDS custom for Oracle",
                "Engine": "custom-oracle-ee",
                "EngineVersion": "19.19-rdscustom-oracle-apr23psu-cev",
                "KMSKeyId": {
                    "Ref": "KMSParameter"
                },
                "Manifest": "{\"mediaImportTemplateVersion\":\"2020-08-14\",\"databaseInstallationFileNames\":[\"V982063-01.zip\"],\"opatchFileNames\":[\"p6880880_190000_Linux-x86-64.zip\"],\"psuRuPatchFileNames\": [\"p35042068_190000_Linux-x86-64.zip\",\"p35050341_190000_Linux-x86-64.zip\"],\"otherPatchFileNames\": [\"p28730253_190000_Linux-x86-64.zip\",\"p29213893_1919000DBRU_Generic.zip\",\"p33125873_1919000DBRU_Linux-x86-64.zip\",\"p35220732_190000_Linux-x86-64.zip\",\"p35239280_190000_Generic.zip\"]}"
            }
        },
        "RDSDBInstance": {
            "DependsOn": "WaitCondition",
            "Type": "AWS::RDS::DBInstance",
            "Properties": {
                "AllocatedStorage": 40,
                "DBInstanceIdentifier": {
                    "Fn::Sub": "${DBInstanceIdentifier}-saz"
                },
                "AutoMinorVersionUpgrade": false,
                "CustomIAMInstanceProfile": "AWSRDSCustomInstanceProfileForRdsCustomInstance",
                "DBInstanceClass": "db.m5.large",
                "DBSubnetGroupName": "rds-custom-private",
                "Engine": "custom-oracle-ee",
                "EngineVersion": "19.18-rdscustom-oracle-jan23psu-cev",
                "KmsKeyId": {
                    "Ref": "KMSParameter"
                },
                "MasterUsername": {
                    "Fn::Sub": "{{resolve:secretsmanager:${RDSCustomSecret}:SecretString:username}}"
                },
                "MasterUserPassword": {
                    "Fn::Sub": "{{resolve:secretsmanager:${RDSCustomSecret}:SecretString:password}}"
                },
                "StorageEncrypted": "true",
                "VPCSecurityGroups": [
                    {
                        "Ref": "RDSSG"
                    }
                ],
                "DBName": "ORCL",
                "PreferredBackupWindow": "03:00-04:00",
                "PreferredMaintenanceWindow": "Mon:05:00-Mon:06:00",
                "PubliclyAccessible": false
            }
        },
        "HARDSDBInstance": {
            "DependsOn": "WaitCondition",
            "Type": "AWS::RDS::DBInstance",
            "Properties": {
                "AllocatedStorage": 40,
                "DBInstanceIdentifier": {
                    "Fn::Sub": "${DBInstanceIdentifier}-maz"
                },
                "AutoMinorVersionUpgrade": false,
                "CustomIAMInstanceProfile": "AWSRDSCustomInstanceProfileForRdsCustomInstance",
                "DBInstanceClass": "db.m5.large",
                "DBSubnetGroupName": "rds-custom-private",
                "Engine": "custom-oracle-ee",
                "EngineVersion": "19.19-rdscustom-oracle-apr23psu-cev",
                "KmsKeyId": {
                    "Ref": "KMSParameter"
                },
                "MasterUsername": {
                    "Fn::Sub": "{{resolve:secretsmanager:${RDSCustomSecret}:SecretString:username}}"
                },
                "MasterUserPassword": {
                    "Fn::Sub": "{{resolve:secretsmanager:${RDSCustomSecret}:SecretString:password}}"
                },
                "StorageEncrypted": "true",
                "MultiAZ": "true",
                "VPCSecurityGroups": [
                    {
                        "Ref": "RDSSG"
                    }
                ],
                "DBName": "ORCL",
                "PreferredBackupWindow": "03:00-04:00",
                "PreferredMaintenanceWindow": "Mon:05:00-Mon:06:00",
                "PubliclyAccessible": false
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-dbinstance--examples--Deploying_RDS_Custom_for_Oracle_with_single_and_multiple_Availability_Zones--yaml"></a>

```
# AWSTemplateFormatVersion: 2010-09-09
# RDS Custom for AWS RDS Oracle
# 06/15/2025 created by Sharath Chandra Kampili

AWSTemplateFormatVersion: '2010-09-09'
Description: CloudFormation Template for the RDS Custom for Oracle

Parameters:
  BucketName: 
    Type: "String"
    MinLength: 3
    MaxLength: 63
    AllowedPattern: ^[a-z0-9][a-z0-9.-]*[a-z0-9]$
    Description: "S3 bucket name (must be between 3 and 63 characters)"
  CEVS3Prefix:
    Type: "String"
    Default: "oracle_cev"
  RDSSG:
    Type: 'AWS::SSM::Parameter::Value<String>'
    Default: RDSSGParameter
  KMSParameter:
    Type: 'AWS::SSM::Parameter::Value<String>'
    Default: KMSParameter
  CEVCreation:
    Description: Please select the option "yes" for creating the CEV , if not leave it default for creating one for you
    Type: String
    Default: "Yes"
  DBInstanceIdentifier:
    Description: RDS Instance Name for Single AZ
    Type: String
    Default: "rds-custom"


Conditions:
  ShouldAddCEV: !Equals [ !Ref CEVCreation, "Yes" ]

Resources:

  SSMExecutionRole: 
    Type : AWS::IAM::Role
    Properties:
      RoleName: !Join ['-', ['SSM-Execution-Role', !Select [4, !Split ['-', !Select [2, !Split ['/', !Ref AWS::StackId]]]],!Sub "${AWS::Region}"]]
      ManagedPolicyArns:
        - !Sub 'arn:${AWS::Partition}:iam::aws:policy/service-role/AmazonSSMAutomationRole'
        - arn:aws:iam::aws:policy/AmazonRDSFullAccess
        - arn:aws:iam::aws:policy/AmazonEC2FullAccess
        - arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore
      AssumeRolePolicyDocument:
        Version: "2012-10-17"
        Statement:
        - Effect: "Allow"
          Principal:
            Service:
            - "ec2.amazonaws.com"
            - "ssm.amazonaws.com"
          Action: "sts:AssumeRole"

  RDSSecret:
    Type: 'AWS::SecretsManager::Secret'
    Properties:
      Name: !Sub '${AWS::StackName}-rds-credentials'
      Description: 'RDS Custom Oracle database credentials'
      GenerateSecretString:
        SecretStringTemplate: '{"username": "oraadmin"}'
        GenerateStringKey: "password"
        PasswordLength: 16
        ExcludeCharacters: '"@/\\'

  EC2Role:
    Type: "AWS::IAM::Role"
    Properties:
      Path: "/"
      RoleName: !Join ['-', ['EC2-Role', !Select [4, !Split ['-', !Select [2, !Split ['/', !Ref AWS::StackId]]]],!Sub "${AWS::Region}"]]
      AssumeRolePolicyDocument: '{"Version": "2012-10-17"		 	 	 ,"Statement":[{"Effect":"Allow","Principal":{"Service":"ec2.amazonaws.com"},"Action":"sts:AssumeRole"}]}'
      MaxSessionDuration: 43200
      ManagedPolicyArns:
        - "arn:aws:iam::aws:policy/AmazonRDSFullAccess"
        - "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"
        - "arn:aws:iam::aws:policy/IAMReadOnlyAccess"
      Description: "Allows Lambda functions to call AWS services on your behalf."
      Policies:
        - PolicyName: !Join ['-', ['cev-policy-1', !Select [4, !Split ['-', !Select [2, !Split ['/', !Ref AWS::StackId]]]],!Sub "${AWS::Region}"]]
          PolicyDocument:
            Version: '2012-10-17'
            Statement:
            - Sid: 'CreateKmsGrant'
              Effect: 'Allow'
              Action:
              - 'kms:DescribeKey'
              - 'kms:CreateGrant'
              Resource: '*'
            - Sid: 'CreateS3Bucket'
              Effect: 'Allow'
              Action:
              - 's3:CreateBucket'
              - 's3:PutBucketPolicy'
              - 's3:PutBucketObjectLockConfiguration'
              - 's3:PutBucketVersioning'
              Resource: "arn:aws:s3:::do-not-delete-rds-custom-*"
            - Sid: 'AccessToS3MediaBucket'
              Effect: 'Allow'
              Action:
              - 's3:GetObjectAcl'
              - 's3:GetObject'
              - 's3:GetObjectTagging'
              - 's3:ListBucket'
              Resource: 
              - !Sub 'arn:${AWS::Partition}:s3:::${BucketName}'
              - !Sub 'arn:${AWS::Partition}:s3:::${BucketName}/*'
            - Sid: 'PermissionForByom'
              Effect: 'Allow'
              Action:
              - 'mediaimport:CreateDatabaseBinarySnapshot'
              Resource: "*"
            - Sid: 'CreateServiceLinkedRole'
              Effect: 'Allow'
              Action:
              - 'iam:CreateServiceLinkedRole'
              Resource: "arn:aws:iam::*:role/aws-service-role/custom.rds.amazonaws.com/AWSServiceRoleForRDSCustom"
        - PolicyName: !Join ['-', ['cev-policy-2', !Select [4, !Split ['-', !Select [2, !Split ['/', !Ref AWS::StackId]]]],!Sub "${AWS::Region}"]]
          PolicyDocument:
            Version: '2012-10-17'
            Statement:
            - Sid: 'ValidateIamRole'
              Effect: 'Allow'
              Action: 'iam:SimulatePrincipalPolicy'
              Resource: '*'
            - Sid: 'CreateCloudTrail'
              Effect: 'Allow'
              Action:
                - 'cloudtrail:CreateTrail'
                - 'cloudtrail:StartLogging'
              Resource:
                  - Fn::Sub: >-
                      arn:${AWS::Partition}:cloudtrail:*:*:trail/do-not-delete-rds-custom-*
            - Sid: 'CreateCloudWatchLogStreamAndPushEvents'
              Effect: 'Allow'
              Action:
                - 'logs:CreateLogStream'
                - 'logs:CreateLogGroup'
                - 'logs:DescribeLogStreams'
                - 'logs:GetLogEvents'
                - 'logs:PutLogEvents'
              Resource: '*'
            - Sid: 'IAMPassRole'
              Effect: 'Allow'
              Action:
                - 'iam:PassRole'
              Resource: arn:aws:iam::*:role/AWSRDSCustomInstanceRole*
            - Sid: 'SecretsManagerAccess'
              Effect: 'Allow'
              Action:
                - 'secretsmanager:GetSecretValue'
                - 'secretsmanager:DescribeSecret'
              Resource: !Ref RDSSecret  

  CEVWaithandle:
    Condition: ShouldAddCEV
    DependsOn: CustomOracleJanPatch
    Type: "AWS::CloudFormation::WaitConditionHandle"
  
  WaitHandle:
    Type: "AWS::CloudFormation::WaitConditionHandle"
  
  WaitCondition:
    Type: "AWS::CloudFormation::WaitCondition"
    Properties:
      Handle: !If [ShouldAddCEV, !Ref CEVWaithandle , !Ref WaitHandle ]
      Timeout: "1"
      Count: 0

  CustomOracleJanPatch:
    DependsOn: SSMExecutionRole
    Condition: ShouldAddCEV
    Type: AWS::RDS::CustomDBEngineVersion
    Properties:
      DatabaseInstallationFilesS3BucketName: !Ref BucketName
      DatabaseInstallationFilesS3Prefix: !Ref CEVS3Prefix
      Description: CEV for RDS custom for Oracle
      Engine: custom-oracle-ee 
      EngineVersion: 19.18-rdscustom-oracle-jan23psu-cev
      KMSKeyId: !Ref KMSParameter
      Manifest: '{"mediaImportTemplateVersion":"2020-08-14","databaseInstallationFileNames":["V982063-01.zip"],"opatchFileNames":["p6880880_190000_Linux-x86-64.zip"],"psuRuPatchFileNames": ["p34765931_190000_Linux-x86-64.zip","p34786990_190000_Linux-x86-64.zip"],"otherPatchFileNames": ["p35099667_190000_Linux-x86-64.zip","p35099674_190000_Generic.zip","p28730253_190000_Linux-x86-64.zip","p29213893_1918000DBRU_Generic.zip","p33125873_1918000DBRU_Linux-x86-64.zip","p35012866_1918000DBRU_Linux-x86-64.zip"]}'

  CustomOracleAprCOHMTPatch:
    DependsOn: SSMExecutionRole
    Condition: ShouldAddCEV
    Type: AWS::RDS::CustomDBEngineVersion
    Properties:
      DatabaseInstallationFilesS3BucketName:  !Ref BucketName
      DatabaseInstallationFilesS3Prefix: !Ref CEVS3Prefix
      Description: CEV for RDS custom for Oracle
      Engine: custom-oracle-ee-cdb
      EngineVersion: 19.19-custom-oracle-home-mt
      KMSKeyId: !Ref KMSParameter
      Manifest: '{"mediaImportTemplateVersion":"2020-08-14","databaseInstallationFileNames":["V982063-01.zip"],"opatchFileNames":["p6880880_190000_Linux-x86-64.zip"],"psuRuPatchFileNames": ["p35042068_190000_Linux-x86-64.zip","p35050341_190000_Linux-x86-64.zip"],"otherPatchFileNames": ["p28730253_190000_Linux-x86-64.zip","p29213893_1919000DBRU_Generic.zip","p33125873_1919000DBRU_Linux-x86-64.zip","p35220732_190000_Linux-x86-64.zip","p35239280_190000_Generic.zip"],"installationParameters": { "unixGroupName": "dba","unixGroupId": 65789,"unixUname": "oracle","unixUid": 6758,"oracleHome": "/opt/oracle/product/19.19/dbhome_1","oracleBase": "/opt/oracle"}}'

  CustomOracleAprPatch:
    DependsOn: SSMExecutionRole
    Condition: ShouldAddCEV
    Type: AWS::RDS::CustomDBEngineVersion
    Properties:
      DatabaseInstallationFilesS3BucketName:  !Ref BucketName
      DatabaseInstallationFilesS3Prefix: !Ref CEVS3Prefix
      Description: CEV for RDS custom for Oracle
      Engine: custom-oracle-ee
      EngineVersion: 19.19-rdscustom-oracle-apr23psu-cev
      KMSKeyId: !Ref KMSParameter
      Manifest: '{"mediaImportTemplateVersion":"2020-08-14","databaseInstallationFileNames":["V982063-01.zip"],"opatchFileNames":["p6880880_190000_Linux-x86-64.zip"],"psuRuPatchFileNames": ["p35042068_190000_Linux-x86-64.zip","p35050341_190000_Linux-x86-64.zip"],"otherPatchFileNames": ["p28730253_190000_Linux-x86-64.zip","p29213893_1919000DBRU_Generic.zip","p33125873_1919000DBRU_Linux-x86-64.zip","p35220732_190000_Linux-x86-64.zip","p35239280_190000_Generic.zip"]}'
  
  RDSDBInstance:
    DependsOn: WaitCondition
    Type: AWS::RDS::DBInstance
    Properties:
      AllocatedStorage: 40
      DBInstanceIdentifier: !Sub '${DBInstanceIdentifier}-saz'
      AutoMinorVersionUpgrade: false
      CustomIAMInstanceProfile: AWSRDSCustomInstanceProfileForRdsCustomInstance
      DBInstanceClass: db.m5.large
      DBSubnetGroupName: rds-custom-private
      Engine: custom-oracle-ee
      EngineVersion: 19.18-rdscustom-oracle-jan23psu-cev
      KmsKeyId: !Ref KMSParameter
      MasterUsername: !Sub '{{resolve:secretsmanager:${RDSSecret}:SecretString:username}}'
      MasterUserPassword: !Sub '{{resolve:secretsmanager:${RDSSecret}:SecretString:password}}'
      StorageEncrypted: 'true'
      VPCSecurityGroups: 
        - !Ref RDSSG
      DBName: ORCL
      PreferredBackupWindow: '03:00-04:00'
      PreferredMaintenanceWindow: 'Mon:05:00-Mon:06:00'
      PubliclyAccessible: false

  HARDSDBInstance:
    DependsOn: WaitCondition
    Type: AWS::RDS::DBInstance
    Properties:
      AllocatedStorage: 40
      DBInstanceIdentifier: !Sub '${DBInstanceIdentifier}-maz'
      AutoMinorVersionUpgrade: false
      CustomIAMInstanceProfile: AWSRDSCustomInstanceProfileForRdsCustomInstance
      DBInstanceClass: db.m5.large
      DBSubnetGroupName: rds-custom-private
      Engine: custom-oracle-ee
      EngineVersion: 19.19-rdscustom-oracle-apr23psu-cev
      KmsKeyId: !Ref KMSParameter
      MasterUsername: !Sub '{{resolve:secretsmanager:${RDSSecret}:SecretString:username}}'
      MasterUserPassword: !Sub '{{resolve:secretsmanager:${RDSSecret}:SecretString:password}}'
      StorageEncrypted: 'true'
      MultiAZ: 'true'
      VPCSecurityGroups: 
        - !Ref RDSSG
      DBName: ORCL
      PreferredBackupWindow: '03:00-04:00'
      PreferredMaintenanceWindow: 'Mon:05:00-Mon:06:00'
      PubliclyAccessible: false
```

### Creating a Secrets Manager secret for a master password
<a name="aws-resource-rds-dbinstance--examples--Creating_a_Secrets_Manager_secret_for_a_master_password"></a>

The following example creates an AWS::RDS::DBInstance resource with a managed master user and password. The secret used to authenticate the DB instance is shown in the `Secret` stack output. You can remove this output if you don't need to pass the value to another CloudFormation stack.

For more information about managing passwords with Secrets Manager, see [Password management with AWS Secrets Manager](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html) in the *Amazon RDS User Guide* and [Password management with AWS Secrets Manager](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-secrets-manager.html) in the *Amazon Aurora User Guide*.

#### JSON
<a name="aws-resource-rds-dbinstance--examples--Creating_a_Secrets_Manager_secret_for_a_master_password--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "A sample template",
    "Resources": {
        "MyInstance": {
            "Properties": {
                "MasterUsername": "masteruser",
                "DBInstanceClass": "db.t3.micro",
                "Engine": "mysql",
                "AllocatedStorage": 5,
                "AutoMinorVersionUpgrade": false,
                "ManageMasterUserPassword": true,
                "MasterUserSecret": {
                    "KmsKeyId": {
                        "Ref": "KMSKey"
                    }
                }
            },
            "Type": "AWS::RDS::DBInstance"
        },
        "KMSKey": {
            "Type": "AWS::KMS::Key",
            "Properties": {
                "Description": "Manual test KMS key",
                "EnableKeyRotation": true,
                "KeyPolicy": {
                    "Version": "2012-10-17"		 	 	 ,
                    "Id": {
                        "Ref": "AWS::StackName"
                    },
                    "Statement": [
                        {
                            "Sid": "Allow administration of the key",
                            "Effect": "Allow",
                            "Principal": {
                                "AWS": {
                                    "Fn::Sub": "arn:${AWS::Partition}:iam::${AWS::AccountId}:root"
                                }
                            },
                            "Action": [
                                "kms:*"
                            ],
                            "Resource": "*"
                        }
                    ]
                }
            }
        }
    },
    "Outputs": {
        "Secret": {
            "Value": {
                "Fn::GetAtt": "MyInstance.MasterUserSecret.SecretArn"
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-dbinstance--examples--Creating_a_Secrets_Manager_secret_for_a_master_password--yaml"></a>

```
AWSTemplateFormatVersion: "2010-09-09"
Description: A sample template
Resources:
  MyInstance:
    Properties:
      MasterUsername: "masteruser"
      DBInstanceClass: "db.t3.micro"
      Engine: "mysql"
      AllocatedStorage: 5
      AutoMinorVersionUpgrade: false
      ManageMasterUserPassword: true
      MasterUserSecret:
        KmsKeyId: !Ref KMSKey
    Type: "AWS::RDS::DBInstance"
  KMSKey:
    Type: 'AWS::KMS::Key'
    Properties:
      Description: Manual test KMS key
      EnableKeyRotation: True
      KeyPolicy:
        Version: "2012-10-17"
        Id: !Ref "AWS::StackName"
        Statement:
          - Sid: "Allow administration of the key"
            Effect: "Allow"
            Principal:
              AWS:
                Fn::Sub: 'arn:${AWS::Partition}:iam::${AWS::AccountId}:root'
            Action:
              - "kms:*"
            Resource: "*"

Outputs:
  Secret:
    Value:
      Fn::GetAtt: MyInstance.MasterUserSecret.SecretArn
```

### Creating a DB instance with self-managed Active Directory domain
<a name="aws-resource-rds-dbinstance--examples--Creating_a_DB_instance_with_self-managed_Active_Directory_domain"></a>

The following example creates a AWS CloudFormation stack with the AWS::RDS::DBInstance resource with Active Directory domain.

#### JSON
<a name="aws-resource-rds-dbinstance--examples--Creating_a_DB_instance_with_self-managed_Active_Directory_domain--json"></a>

```
{
    "Resources":
    {
        "RDSDBInstance":
        {
            "Type": "AWS::RDS::DBInstance",
            "Properties":
            {
                "AllocatedStorage": { "Ref" : "DBAllocatedStorage" },
                "DBInstanceClass": { "Ref" : "DBClass" },
                "DBSubnetGroupName": { "Ref" : "MyDBSubnetGroup" },
                "Engine": "sqlserver-ee",
                "LicenseModel": "license-included",
                "MasterUsername"    : { "Ref" : "DBUsername" },
                "MasterUserPassword": { "Ref" : "DBPassword" },
                "DomainAuthSecretArn": { "Ref" : "DomainSecretArn" },
                "DomainDnsIps":
                [
                    "10.0.0.1",
                    "10.0.0.2"
                ],
                "DomainFqdn": { "Ref" : "MyDomainFqdn" },
                "DomainOu": { "Ref" : "MyDomainOu" }
            },
            "UpdateReplacePolicy": "Delete",
            "DeletionPolicy": "Delete"
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-dbinstance--examples--Creating_a_DB_instance_with_self-managed_Active_Directory_domain--yaml"></a>

```
Resources:
  RDSDBInstance:
    Type: 'AWS::RDS::DBInstance'
    Properties:
      AllocatedStorage: !Ref DBAllocatedStorage
      DBInstanceClass: !Ref DBClass
      DBSubnetGroupName: !Ref MyDBSubnetGroup
      Engine: sqlserver-ee
      LicenseModel: license-included
      MasterUsername: !Ref DBUsername
      MasterUserPassword: !Ref DBPassword
      DomainAuthSecretArn: !Ref DomainSecretArn
      DomainDnsIps:
        - 10.0.0.1
        - 10.0.0.2
      DomainFqdn: !Ref MyDomainFqdn
      DomainOu: !Ref MyDomainOu
    UpdateReplacePolicy: Delete
    DeletionPolicy: Delete
```

# AWS::RDS::DBInstance AdditionalStorageVolume
<a name="aws-properties-rds-dbinstance-additionalstoragevolume"></a>

Contains details about an additional storage volume for a DB instance. RDS support additional storage volumes for RDS for Oracle and RDS for SQL Server.

## Syntax
<a name="aws-properties-rds-dbinstance-additionalstoragevolume-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbinstance-additionalstoragevolume-syntax.json"></a>

```
{
  "[AllocatedStorage](#cfn-rds-dbinstance-additionalstoragevolume-allocatedstorage)" : String,
  "[Iops](#cfn-rds-dbinstance-additionalstoragevolume-iops)" : Integer,
  "[MaxAllocatedStorage](#cfn-rds-dbinstance-additionalstoragevolume-maxallocatedstorage)" : Integer,
  "[StorageThroughput](#cfn-rds-dbinstance-additionalstoragevolume-storagethroughput)" : Integer,
  "[StorageType](#cfn-rds-dbinstance-additionalstoragevolume-storagetype)" : String,
  "[VolumeName](#cfn-rds-dbinstance-additionalstoragevolume-volumename)" : String
}
```

### YAML
<a name="aws-properties-rds-dbinstance-additionalstoragevolume-syntax.yaml"></a>

```
  [AllocatedStorage](#cfn-rds-dbinstance-additionalstoragevolume-allocatedstorage): String
  [Iops](#cfn-rds-dbinstance-additionalstoragevolume-iops): Integer
  [MaxAllocatedStorage](#cfn-rds-dbinstance-additionalstoragevolume-maxallocatedstorage): Integer
  [StorageThroughput](#cfn-rds-dbinstance-additionalstoragevolume-storagethroughput): Integer
  [StorageType](#cfn-rds-dbinstance-additionalstoragevolume-storagetype): String
  [VolumeName](#cfn-rds-dbinstance-additionalstoragevolume-volumename): String
```

## Properties
<a name="aws-properties-rds-dbinstance-additionalstoragevolume-properties"></a>

`AllocatedStorage`  <a name="cfn-rds-dbinstance-additionalstoragevolume-allocatedstorage"></a>
The amount of storage allocated for the additional storage volume, in gibibytes (GiB). The minimum is 20 GiB. The maximum is 65,536 GiB (64 TiB).  
*Required*: No  
*Type*: String  
*Pattern*: `^[0-9]*$`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Iops`  <a name="cfn-rds-dbinstance-additionalstoragevolume-iops"></a>
The number of I/O operations per second (IOPS) provisioned for the additional storage volume.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaxAllocatedStorage`  <a name="cfn-rds-dbinstance-additionalstoragevolume-maxallocatedstorage"></a>
The upper limit in gibibytes (GiB) to which RDS can automatically scale the storage of the additional storage volume.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StorageThroughput`  <a name="cfn-rds-dbinstance-additionalstoragevolume-storagethroughput"></a>
The storage throughput value for the additional storage volume, in mebibytes per second (MiBps). This setting applies only to the General Purpose SSD (`gp3`) storage type.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StorageType`  <a name="cfn-rds-dbinstance-additionalstoragevolume-storagetype"></a>
The storage type for the additional storage volume.  
Valid Values: `GP3 | IO2`  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`VolumeName`  <a name="cfn-rds-dbinstance-additionalstoragevolume-volumename"></a>
The name of the additional storage volume.  
Valid Values: `RDSDBDATA2 | RDSDBDATA3 | RDSDBDATA4`  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::RDS::DBInstance CertificateDetails
<a name="aws-properties-rds-dbinstance-certificatedetails"></a>

The details of the DB instance’s server certificate.

For more information, see [Using SSL/TLS to encrypt a connection to a DB instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL.html) in the *Amazon RDS User Guide* and [ Using SSL/TLS to encrypt a connection to a DB cluster](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.SSL.html) in the *Amazon Aurora User Guide*.

## Syntax
<a name="aws-properties-rds-dbinstance-certificatedetails-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbinstance-certificatedetails-syntax.json"></a>

```
{
  "[CAIdentifier](#cfn-rds-dbinstance-certificatedetails-caidentifier)" : String,
  "[ValidTill](#cfn-rds-dbinstance-certificatedetails-validtill)" : String
}
```

### YAML
<a name="aws-properties-rds-dbinstance-certificatedetails-syntax.yaml"></a>

```
  [CAIdentifier](#cfn-rds-dbinstance-certificatedetails-caidentifier): String
  [ValidTill](#cfn-rds-dbinstance-certificatedetails-validtill): String
```

## Properties
<a name="aws-properties-rds-dbinstance-certificatedetails-properties"></a>

`CAIdentifier`  <a name="cfn-rds-dbinstance-certificatedetails-caidentifier"></a>
The CA identifier of the CA certificate used for the DB instance's server certificate.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ValidTill`  <a name="cfn-rds-dbinstance-certificatedetails-validtill"></a>
The expiration date of the DB instance’s server certificate.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::RDS::DBInstance DBInstanceRole
<a name="aws-properties-rds-dbinstance-dbinstancerole"></a>

Information about an AWS Identity and Access Management (IAM) role that is associated with a DB instance.

## Syntax
<a name="aws-properties-rds-dbinstance-dbinstancerole-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbinstance-dbinstancerole-syntax.json"></a>

```
{
  "[FeatureName](#cfn-rds-dbinstance-dbinstancerole-featurename)" : String,
  "[RoleArn](#cfn-rds-dbinstance-dbinstancerole-rolearn)" : String
}
```

### YAML
<a name="aws-properties-rds-dbinstance-dbinstancerole-syntax.yaml"></a>

```
  [FeatureName](#cfn-rds-dbinstance-dbinstancerole-featurename): String
  [RoleArn](#cfn-rds-dbinstance-dbinstancerole-rolearn): String
```

## Properties
<a name="aws-properties-rds-dbinstance-dbinstancerole-properties"></a>

`FeatureName`  <a name="cfn-rds-dbinstance-dbinstancerole-featurename"></a>
The name of the feature associated with the AWS Identity and Access Management (IAM) role. IAM roles that are associated with a DB instance grant permission for the DB instance to access other AWS services on your behalf. For the list of supported feature names, see the `SupportedFeatureNames` description in [DBEngineVersion](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DBEngineVersion.html) in the *Amazon RDS API Reference*.   
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-rds-dbinstance-dbinstancerole-rolearn"></a>
The Amazon Resource Name (ARN) of the IAM role that is associated with the DB instance.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-rds-dbinstance-dbinstancerole--examples"></a>



### 
<a name="aws-properties-rds-dbinstance-dbinstancerole--examples--"></a>

The following specifies a role to associate with a DB instance.

#### JSON
<a name="aws-properties-rds-dbinstance-dbinstancerole--examples----json"></a>

```
"AssociatedRoles": [
    {
        "FeatureName": "s3Import",
        "RoleArn": "arn:aws:iam::123456789012:role/RDSLoadFromS3"               
    }
]
```

#### YAML
<a name="aws-properties-rds-dbinstance-dbinstancerole--examples----yaml"></a>

```
AssociatedRoles:
    - FeatureName: s3Import
      RoleArn: 'arn:aws:iam::123456789012:role/RDSLoadFromS3'
```

# AWS::RDS::DBInstance DBInstanceStatusInfo
<a name="aws-properties-rds-dbinstance-dbinstancestatusinfo"></a>

Provides a list of status information for a DB instance.

## Syntax
<a name="aws-properties-rds-dbinstance-dbinstancestatusinfo-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbinstance-dbinstancestatusinfo-syntax.json"></a>

```
{
  "[Message](#cfn-rds-dbinstance-dbinstancestatusinfo-message)" : String,
  "[Normal](#cfn-rds-dbinstance-dbinstancestatusinfo-normal)" : Boolean,
  "[Status](#cfn-rds-dbinstance-dbinstancestatusinfo-status)" : String,
  "[StatusType](#cfn-rds-dbinstance-dbinstancestatusinfo-statustype)" : String
}
```

### YAML
<a name="aws-properties-rds-dbinstance-dbinstancestatusinfo-syntax.yaml"></a>

```
  [Message](#cfn-rds-dbinstance-dbinstancestatusinfo-message): String
  [Normal](#cfn-rds-dbinstance-dbinstancestatusinfo-normal): Boolean
  [Status](#cfn-rds-dbinstance-dbinstancestatusinfo-status): String
  [StatusType](#cfn-rds-dbinstance-dbinstancestatusinfo-statustype): String
```

## Properties
<a name="aws-properties-rds-dbinstance-dbinstancestatusinfo-properties"></a>

`Message`  <a name="cfn-rds-dbinstance-dbinstancestatusinfo-message"></a>
Details of the error if there is an error for the instance. If the instance isn't in an error state, this value is blank.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Normal`  <a name="cfn-rds-dbinstance-dbinstancestatusinfo-normal"></a>
Indicates whether the instance is operating normally (TRUE) or is in an error state (FALSE).  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Status`  <a name="cfn-rds-dbinstance-dbinstancestatusinfo-status"></a>
The status of the DB instance. For a StatusType of read replica, the values can be replicating, replication stop point set, replication stop point reached, error, stopped, or terminated.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StatusType`  <a name="cfn-rds-dbinstance-dbinstancestatusinfo-statustype"></a>
This value is currently "read replication."  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::RDS::DBInstance Endpoint
<a name="aws-properties-rds-dbinstance-endpoint"></a>

This data type represents the information you need to connect to an Amazon RDS DB instance. This data type is used as a response element in the following actions:
+  `CreateDBInstance` 
+  `DescribeDBInstances` 
+  `DeleteDBInstance` 

For the data structure that represents Amazon Aurora DB cluster endpoints, see `DBClusterEndpoint`.

## Syntax
<a name="aws-properties-rds-dbinstance-endpoint-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbinstance-endpoint-syntax.json"></a>

```
{
  "[Address](#cfn-rds-dbinstance-endpoint-address)" : String,
  "[HostedZoneId](#cfn-rds-dbinstance-endpoint-hostedzoneid)" : String,
  "[Port](#cfn-rds-dbinstance-endpoint-port)" : String
}
```

### YAML
<a name="aws-properties-rds-dbinstance-endpoint-syntax.yaml"></a>

```
  [Address](#cfn-rds-dbinstance-endpoint-address): String
  [HostedZoneId](#cfn-rds-dbinstance-endpoint-hostedzoneid): String
  [Port](#cfn-rds-dbinstance-endpoint-port): String
```

## Properties
<a name="aws-properties-rds-dbinstance-endpoint-properties"></a>

`Address`  <a name="cfn-rds-dbinstance-endpoint-address"></a>
Specifies the DNS address of the DB instance.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`HostedZoneId`  <a name="cfn-rds-dbinstance-endpoint-hostedzoneid"></a>
Specifies the ID that Amazon Route 53 assigns when you create a hosted zone.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Port`  <a name="cfn-rds-dbinstance-endpoint-port"></a>
Specifies the port that the database engine is listening on.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::RDS::DBInstance MasterUserSecret
<a name="aws-properties-rds-dbinstance-masterusersecret"></a>

The `MasterUserSecret` return value specifies the secret managed by RDS in AWS Secrets Manager for the master user password.

For more information, see [Password management with AWS Secrets Manager](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-secrets-manager.html) in the *Amazon RDS User Guide* and [Password management with AWS Secrets Manager](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-secrets-manager.html) in the *Amazon Aurora User Guide.*

## Syntax
<a name="aws-properties-rds-dbinstance-masterusersecret-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbinstance-masterusersecret-syntax.json"></a>

```
{
  "[KmsKeyId](#cfn-rds-dbinstance-masterusersecret-kmskeyid)" : String,
  "[SecretArn](#cfn-rds-dbinstance-masterusersecret-secretarn)" : String
}
```

### YAML
<a name="aws-properties-rds-dbinstance-masterusersecret-syntax.yaml"></a>

```
  [KmsKeyId](#cfn-rds-dbinstance-masterusersecret-kmskeyid): String
  [SecretArn](#cfn-rds-dbinstance-masterusersecret-secretarn): String
```

## Properties
<a name="aws-properties-rds-dbinstance-masterusersecret-properties"></a>

`KmsKeyId`  <a name="cfn-rds-dbinstance-masterusersecret-kmskeyid"></a>
The AWS KMS key identifier that is used to encrypt the secret.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SecretArn`  <a name="cfn-rds-dbinstance-masterusersecret-secretarn"></a>
The Amazon Resource Name (ARN) of the secret. This parameter is a return value that you can retrieve using the `Fn::GetAtt` intrinsic function. For more information, see [Return values](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbinstance.html#aws-resource-rds-dbinstance-return-values).  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::RDS::DBInstance ProcessorFeature
<a name="aws-properties-rds-dbinstance-processorfeature"></a>

The `ProcessorFeature` property type specifies the processor features of a DB instance class.

## Syntax
<a name="aws-properties-rds-dbinstance-processorfeature-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbinstance-processorfeature-syntax.json"></a>

```
{
  "[Name](#cfn-rds-dbinstance-processorfeature-name)" : String,
  "[Value](#cfn-rds-dbinstance-processorfeature-value)" : String
}
```

### YAML
<a name="aws-properties-rds-dbinstance-processorfeature-syntax.yaml"></a>

```
  [Name](#cfn-rds-dbinstance-processorfeature-name): String
  [Value](#cfn-rds-dbinstance-processorfeature-value): String
```

## Properties
<a name="aws-properties-rds-dbinstance-processorfeature-properties"></a>

`Name`  <a name="cfn-rds-dbinstance-processorfeature-name"></a>
The name of the processor feature. Valid names are `coreCount` and `threadsPerCore`.  
*Required*: No  
*Type*: String  
*Allowed values*: `coreCount | threadsPerCore`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-rds-dbinstance-processorfeature-value"></a>
The value of a processor feature.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-rds-dbinstance-processorfeature--examples"></a>

The following example specifies processor features of an Oracle DB instance class.

### Authentication details
<a name="aws-properties-rds-dbinstance-processorfeature--examples--Authentication_details"></a>

#### JSON
<a name="aws-properties-rds-dbinstance-processorfeature--examples--Authentication_details--json"></a>

```
"ProcessorFeatures":[
   {
      "Name": "threadsPerCore",
      "Value": "4"
   },
   {
      "Name": "coreCount",
      "Value": "4"
   }
]
```

#### YAML
<a name="aws-properties-rds-dbinstance-processorfeature--examples--Authentication_details--yaml"></a>

```
ProcessorFeatures:
  - Name: threadsPerCore
    Value: 4
  - Name: coreCount
    Value: 4
```

# AWS::RDS::DBInstance Tag
<a name="aws-properties-rds-dbinstance-tag"></a>

Metadata assigned to an Amazon RDS resource consisting of a key-value pair.

For more information, see [Tagging Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) in the *Amazon RDS User Guide* or [Tagging Amazon Aurora and Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html) in the *Amazon Aurora User Guide*. 

## Syntax
<a name="aws-properties-rds-dbinstance-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbinstance-tag-syntax.json"></a>

```
{
  "[Key](#cfn-rds-dbinstance-tag-key)" : String,
  "[Value](#cfn-rds-dbinstance-tag-value)" : String
}
```

### YAML
<a name="aws-properties-rds-dbinstance-tag-syntax.yaml"></a>

```
  [Key](#cfn-rds-dbinstance-tag-key): String
  [Value](#cfn-rds-dbinstance-tag-value): String
```

## Properties
<a name="aws-properties-rds-dbinstance-tag-properties"></a>

`Key`  <a name="cfn-rds-dbinstance-tag-key"></a>
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-rds-dbinstance-tag-value"></a>
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-rds-dbinstance-tag--examples"></a>

The following example specifies a tag for a DB instance.

### 
<a name="aws-properties-rds-dbinstance-tag--examples--"></a>

#### JSON
<a name="aws-properties-rds-dbinstance-tag--examples----json"></a>

```
"Tags" : [
   {
      "Key" : "keyname1",
      "Value" : "value1"
   },
   {
      "Key" : "keyname2",
      "Value" : "value2"
   }
]
```

#### YAML
<a name="aws-properties-rds-dbinstance-tag--examples----yaml"></a>

```
Tags: 
  - Key: keyname1
    Value: value1
  - Key: keyname2
    Value: value2
```

# AWS::RDS::DBParameterGroup
<a name="aws-resource-rds-dbparametergroup"></a>

The `AWS::RDS::DBParameterGroup` resource creates a custom parameter group for an RDS database family.

This type can be declared in a template and referenced in the `DBParameterGroupName` property of an ` [AWS::RDS::DBInstance](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html) ` resource.

For information about configuring parameters for Amazon RDS DB instances, see [Working with parameter groups](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html) in the *Amazon RDS User Guide*.

For information about configuring parameters for Amazon Aurora DB instances, see [Working with parameter groups](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_WorkingWithParamGroups.html) in the *Amazon Aurora User Guide*.

**Note**  
Applying a parameter group to a DB instance may require the DB instance to reboot, resulting in a database outage for the duration of the reboot.

## Syntax
<a name="aws-resource-rds-dbparametergroup-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-rds-dbparametergroup-syntax.json"></a>

```
{
  "Type" : "AWS::RDS::DBParameterGroup",
  "Properties" : {
      "[DBParameterGroupName](#cfn-rds-dbparametergroup-dbparametergroupname)" : String,
      "[Description](#cfn-rds-dbparametergroup-description)" : String,
      "[Family](#cfn-rds-dbparametergroup-family)" : String,
      "[Parameters](#cfn-rds-dbparametergroup-parameters)" : Json,
      "[Tags](#cfn-rds-dbparametergroup-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-rds-dbparametergroup-syntax.yaml"></a>

```
Type: AWS::RDS::DBParameterGroup
Properties:
  [DBParameterGroupName](#cfn-rds-dbparametergroup-dbparametergroupname): String
  [Description](#cfn-rds-dbparametergroup-description): String
  [Family](#cfn-rds-dbparametergroup-family): String
  [Parameters](#cfn-rds-dbparametergroup-parameters): Json
  [Tags](#cfn-rds-dbparametergroup-tags): 
    - Tag
```

## Properties
<a name="aws-resource-rds-dbparametergroup-properties"></a>

`DBParameterGroupName`  <a name="cfn-rds-dbparametergroup-dbparametergroupname"></a>
The name of the DB parameter group.  
Constraints:  
+ Must be 1 to 255 letters, numbers, or hyphens.
+ First character must be a letter
+ Can't end with a hyphen or contain two consecutive hyphens
If you don't specify a value for `DBParameterGroupName` property, a name is automatically created for the DB parameter group.  
This value is stored as a lowercase string.
*Required*: No  
*Type*: String  
*Pattern*: `^[a-zA-Z]{1}(?:-?[a-zA-Z0-9])*$`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Description`  <a name="cfn-rds-dbparametergroup-description"></a>
Provides the customer-specified description for this DB parameter group.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Family`  <a name="cfn-rds-dbparametergroup-family"></a>
The DB parameter group family name. A DB parameter group can be associated with one and only one DB parameter group family, and can be applied only to a DB instance running a database engine and engine version compatible with that DB parameter group family.  
To list all of the available parameter group families for a DB engine, use the following command:  
 `aws rds describe-db-engine-versions --query "DBEngineVersions[].DBParameterGroupFamily" --engine <engine>`   
For example, to list all of the available parameter group families for the MySQL DB engine, use the following command:  
 `aws rds describe-db-engine-versions --query "DBEngineVersions[].DBParameterGroupFamily" --engine mysql`   
The output contains duplicates.
The following are the valid DB engine values:  
+  `aurora-mysql` 
+  `aurora-postgresql` 
+  `db2-ae` 
+  `db2-se` 
+  `mysql` 
+  `oracle-ee` 
+  `oracle-ee-cdb` 
+  `oracle-se2` 
+  `oracle-se2-cdb` 
+  `postgres` 
+  `sqlserver-ee` 
+  `sqlserver-se` 
+  `sqlserver-ex` 
+  `sqlserver-web` 
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Parameters`  <a name="cfn-rds-dbparametergroup-parameters"></a>
A mapping of parameter names and values for the parameter update. You must specify at least one parameter name and value.  
For more information about parameter groups, see [Working with parameter groups](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html) in the *Amazon RDS User Guide*, or [Working with parameter groups](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_WorkingWithParamGroups.html) in the *Amazon Aurora User Guide*.  
AWS CloudFormation doesn't support specifying an apply method for each individual parameter. The default apply method for each parameter is used.
*Required*: No  
*Type*: Json  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-rds-dbparametergroup-tags"></a>
Tags to assign to the DB parameter group.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-rds-dbparametergroup-tag.md)  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-rds-dbparametergroup-return-values"></a>

### Ref
<a name="aws-resource-rds-dbparametergroup-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the name of the DB parameter group.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-rds-dbparametergroup-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-rds-dbparametergroup-return-values-fn--getatt-fn--getatt"></a>

`DBParameterGroupName`  <a name="DBParameterGroupName-fn::getatt"></a>
The name of the DB parameter group.

## Examples
<a name="aws-resource-rds-dbparametergroup--examples"></a>



### Create a parameter group for a MySQL DB instance
<a name="aws-resource-rds-dbparametergroup--examples--Create_a_parameter_group_for_a_MySQL_DB_instance"></a>

The following example creates a parameter group for a MySQL DB instance and sets the `sql_mode`, `max_allowed_packet`, and `innodb_buffer_pool_size` parameters. 

#### JSON
<a name="aws-resource-rds-dbparametergroup--examples--Create_a_parameter_group_for_a_MySQL_DB_instance--json"></a>

```
"RDSDBParameterGroup": {
        "Type": "AWS::RDS::DBParameterGroup",
        "Properties": {
            "Description": "CloudFormation Sample MySQL Parameter Group",
            "Family": "mysql8.0",
            "Parameters": {
                "sql_mode": "IGNORE_SPACE",
                "max_allowed_packet": 1024,
                "innodb_buffer_pool_size": "{DBInstanceClassMemory*3/4}"
            }
        }
    }
```

#### YAML
<a name="aws-resource-rds-dbparametergroup--examples--Create_a_parameter_group_for_a_MySQL_DB_instance--yaml"></a>

```
RDSDBParameterGroup:
  Type: 'AWS::RDS::DBParameterGroup'
  Properties:
    Description: CloudFormation Sample MySQL Parameter Group
    Family: mysql8.0
    Parameters:
      sql_mode: IGNORE_SPACE
      max_allowed_packet: 1024
      innodb_buffer_pool_size: '{DBInstanceClassMemory*3/4}'
```

# AWS::RDS::DBParameterGroup Tag
<a name="aws-properties-rds-dbparametergroup-tag"></a>

Metadata assigned to an Amazon RDS resource consisting of a key-value pair.

For more information, see [Tagging Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) in the *Amazon RDS User Guide* or [Tagging Amazon Aurora and Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html) in the *Amazon Aurora User Guide*. 

## Syntax
<a name="aws-properties-rds-dbparametergroup-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbparametergroup-tag-syntax.json"></a>

```
{
  "[Key](#cfn-rds-dbparametergroup-tag-key)" : String,
  "[Value](#cfn-rds-dbparametergroup-tag-value)" : String
}
```

### YAML
<a name="aws-properties-rds-dbparametergroup-tag-syntax.yaml"></a>

```
  [Key](#cfn-rds-dbparametergroup-tag-key): String
  [Value](#cfn-rds-dbparametergroup-tag-value): String
```

## Properties
<a name="aws-properties-rds-dbparametergroup-tag-properties"></a>

`Key`  <a name="cfn-rds-dbparametergroup-tag-key"></a>
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-rds-dbparametergroup-tag-value"></a>
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-rds-dbparametergroup-tag--examples"></a>

The following example specifies a tag for a DB parameter group.

### 
<a name="aws-properties-rds-dbparametergroup-tag--examples--"></a>

#### JSON
<a name="aws-properties-rds-dbparametergroup-tag--examples----json"></a>

```
"Tags" : [
   {
      "Key" : "keyname1",
      "Value" : "value1"
   },
   {
      "Key" : "keyname2",
      "Value" : "value2"
   }
]
```

#### YAML
<a name="aws-properties-rds-dbparametergroup-tag--examples----yaml"></a>

```
Tags:
  - Key: keyname1
    Value: value1
  - Key: keyname2
    Value: value2
```

# AWS::RDS::DBProxy
<a name="aws-resource-rds-dbproxy"></a>

The `AWS::RDS::DBProxy` resource creates or updates a DB proxy.

For information about RDS Proxy for Amazon RDS, see [ Managing Connections with Amazon RDS Proxy](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy.html) in the *Amazon RDS User Guide*.

For information about RDS Proxy for Amazon Aurora, see [ Managing Connections with Amazon RDS Proxy](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-proxy.html) in the *Amazon Aurora User Guide*.

**Note**  
Limitations apply to RDS Proxy, including DB engine version limitations and AWS Region limitations.  
For information about limitations that apply to RDS Proxy for Amazon RDS, see [ Limitations for RDS Proxy](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy.html#rds-proxy.limitations) in the *Amazon RDS User Guide*.  
For information about that apply to RDS Proxy for Amazon Aurora, see [ Limitations for RDS Proxy](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-proxy.html#rds-proxy.limitations) in the *Amazon Aurora User Guide*.

## Syntax
<a name="aws-resource-rds-dbproxy-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-rds-dbproxy-syntax.json"></a>

```
{
  "Type" : "AWS::RDS::DBProxy",
  "Properties" : {
      "[Auth](#cfn-rds-dbproxy-auth)" : [ AuthFormat, ... ],
      "[DBProxyName](#cfn-rds-dbproxy-dbproxyname)" : String,
      "[DebugLogging](#cfn-rds-dbproxy-debuglogging)" : Boolean,
      "[DefaultAuthScheme](#cfn-rds-dbproxy-defaultauthscheme)" : String,
      "[EndpointNetworkType](#cfn-rds-dbproxy-endpointnetworktype)" : String,
      "[EngineFamily](#cfn-rds-dbproxy-enginefamily)" : String,
      "[IdleClientTimeout](#cfn-rds-dbproxy-idleclienttimeout)" : Integer,
      "[RequireTLS](#cfn-rds-dbproxy-requiretls)" : Boolean,
      "[RoleArn](#cfn-rds-dbproxy-rolearn)" : String,
      "[Tags](#cfn-rds-dbproxy-tags)" : [ TagFormat, ... ],
      "[TargetConnectionNetworkType](#cfn-rds-dbproxy-targetconnectionnetworktype)" : String,
      "[VpcSecurityGroupIds](#cfn-rds-dbproxy-vpcsecuritygroupids)" : [ String, ... ],
      "[VpcSubnetIds](#cfn-rds-dbproxy-vpcsubnetids)" : [ String, ... ]
    }
}
```

### YAML
<a name="aws-resource-rds-dbproxy-syntax.yaml"></a>

```
Type: AWS::RDS::DBProxy
Properties:
  [Auth](#cfn-rds-dbproxy-auth): 
    - AuthFormat
  [DBProxyName](#cfn-rds-dbproxy-dbproxyname): String
  [DebugLogging](#cfn-rds-dbproxy-debuglogging): Boolean
  [DefaultAuthScheme](#cfn-rds-dbproxy-defaultauthscheme): String
  [EndpointNetworkType](#cfn-rds-dbproxy-endpointnetworktype): String
  [EngineFamily](#cfn-rds-dbproxy-enginefamily): String
  [IdleClientTimeout](#cfn-rds-dbproxy-idleclienttimeout): Integer
  [RequireTLS](#cfn-rds-dbproxy-requiretls): Boolean
  [RoleArn](#cfn-rds-dbproxy-rolearn): String
  [Tags](#cfn-rds-dbproxy-tags): 
    - TagFormat
  [TargetConnectionNetworkType](#cfn-rds-dbproxy-targetconnectionnetworktype): String
  [VpcSecurityGroupIds](#cfn-rds-dbproxy-vpcsecuritygroupids): 
    - String
  [VpcSubnetIds](#cfn-rds-dbproxy-vpcsubnetids): 
    - String
```

## Properties
<a name="aws-resource-rds-dbproxy-properties"></a>

`Auth`  <a name="cfn-rds-dbproxy-auth"></a>
The authorization mechanism that the proxy uses.  
*Required*: No  
*Type*: Array of [AuthFormat](aws-properties-rds-dbproxy-authformat.md)  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DBProxyName`  <a name="cfn-rds-dbproxy-dbproxyname"></a>
The identifier for the proxy. This name must be unique for all proxies owned by your AWS account in the specified AWS Region. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[0-z]*`  
*Maximum*: `64`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DebugLogging`  <a name="cfn-rds-dbproxy-debuglogging"></a>
Specifies whether the proxy logs detailed connection and query information. When you enable `DebugLogging`, the proxy captures connection details and connection pool behavior from your queries. Debug logging increases CloudWatch costs and can impact proxy performance. Enable this option only when you need to troubleshoot connection or performance issues.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DefaultAuthScheme`  <a name="cfn-rds-dbproxy-defaultauthscheme"></a>
The default authentication scheme that the proxy uses for client connections to the proxy and connections from the proxy to the underlying database. Valid values are `NONE` and `IAM_AUTH`. When set to `IAM_AUTH`, the proxy uses end-to-end IAM authentication to connect to the database.   
*Required*: No  
*Type*: String  
*Allowed values*: `IAM_AUTH | NONE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EndpointNetworkType`  <a name="cfn-rds-dbproxy-endpointnetworktype"></a>
The network type of the DB proxy endpoint. The network type determines the IP version that the proxy endpoint supports.  
Valid values:  
+ `IPV4` - The proxy endpoint supports IPv4 only.
+ `IPV6` - The proxy endpoint supports IPv6 only.
+ `DUAL` - The proxy endpoint supports both IPv4 and IPv6.
*Required*: No  
*Type*: String  
*Allowed values*: `IPV4 | IPV6 | DUAL`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`EngineFamily`  <a name="cfn-rds-dbproxy-enginefamily"></a>
The kinds of databases that the proxy can connect to. This value determines which database network protocol the proxy recognizes when it interprets network traffic to and from the database. For Aurora MySQL, RDS for MariaDB, and RDS for MySQL databases, specify `MYSQL`. For Aurora PostgreSQL and RDS for PostgreSQL databases, specify `POSTGRESQL`. For RDS for Microsoft SQL Server, specify `SQLSERVER`.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `MYSQL | POSTGRESQL | SQLSERVER`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`IdleClientTimeout`  <a name="cfn-rds-dbproxy-idleclienttimeout"></a>
The number of seconds that a connection to the proxy can be inactive before the proxy disconnects it. You can set this value higher or lower than the connection timeout limit for the associated database.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RequireTLS`  <a name="cfn-rds-dbproxy-requiretls"></a>
Specifies whether Transport Layer Security (TLS) encryption is required for connections to the proxy. By enabling this setting, you can enforce encrypted TLS connections to the proxy.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-rds-dbproxy-rolearn"></a>
The Amazon Resource Name (ARN) of the IAM role that the proxy uses to access secrets in AWS Secrets Manager.  
*Required*: Yes  
*Type*: String  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-rds-dbproxy-tags"></a>
An optional set of key-value pairs to associate arbitrary data of your choosing with the proxy.  
*Required*: No  
*Type*: Array of [TagFormat](aws-properties-rds-dbproxy-tagformat.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TargetConnectionNetworkType`  <a name="cfn-rds-dbproxy-targetconnectionnetworktype"></a>
The network type that the proxy uses to connect to the target database. The network type determines the IP version that the proxy uses for connections to the database.  
Valid values:  
+ `IPV4` - The proxy connects to the database using IPv4 only.
+ `IPV6` - The proxy connects to the database using IPv6 only.
*Required*: No  
*Type*: String  
*Allowed values*: `IPV4 | IPV6`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`VpcSecurityGroupIds`  <a name="cfn-rds-dbproxy-vpcsecuritygroupids"></a>
One or more VPC security group IDs to associate with the new proxy.  
If you plan to update the resource, don't specify VPC security groups in a shared VPC.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`VpcSubnetIds`  <a name="cfn-rds-dbproxy-vpcsubnetids"></a>
One or more VPC subnet IDs to associate with the new proxy.  
*Required*: Yes  
*Type*: Array of String  
*Minimum*: `2`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-rds-dbproxy-return-values"></a>

### Ref
<a name="aws-resource-rds-dbproxy-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the name of the DB proxy.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-rds-dbproxy-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-rds-dbproxy-return-values-fn--getatt-fn--getatt"></a>

`DBProxyArn`  <a name="DBProxyArn-fn::getatt"></a>
The Amazon Resource Name (ARN) for the proxy.

`Endpoint`  <a name="Endpoint-fn::getatt"></a>
The endpoint that you can use to connect to the DB proxy. You include the endpoint value in the connection string for a database client application.

`VpcId`  <a name="VpcId-fn::getatt"></a>
The VPC ID to associate with the DB proxy.

## Examples
<a name="aws-resource-rds-dbproxy--examples"></a>

### Creating a DB proxy and registering a DB instance
<a name="aws-resource-rds-dbproxy--examples--Creating_a_DB_proxy_and_registering_a_DB_instance"></a>

The following example creates a DB proxy and registers a DB instance.

#### JSON
<a name="aws-resource-rds-dbproxy--examples--Creating_a_DB_proxy_and_registering_a_DB_instance--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Parameters": {
        "ProxyName": {
            "Type": "String",
            "Default": "exampleProxy"
        },
        "InstanceName": {
            "Type": "String",
            "Default": "database-1"
        },
        "BootstrapSecretReaderRoleArn": {
            "Type": "String",
            "Default": "arn:aws:iam::123456789012:role/RDSSecretReaderRoleForDBProxy"
        },
        "BootstrapProxySecretArn": {
            "Type": "String",
            "Default": "arn:aws:secretsmanager:us-west-2:123456789012:secret:MySecretForDBProxy"
        },
        "SubnetIds": {
            "Type": "String",
            "Default": "subnet-01b761b31fb498f20,subnet-012b9a958ef0f9949,subnet-05e8e263052025378"
        }
    },
    "Resources": {
        "TestDBProxy": {
            "Type": "AWS::RDS::DBProxy",
            "Properties": {
                "DebugLogging": true,
                "DBProxyName": {
                    "Ref": "ProxyName"
                },
                "EngineFamily": "MYSQL",
                "IdleClientTimeout": 120,
                "RequireTLS": true,
                "RoleArn": {
                    "Ref": "BootstrapSecretReaderRoleArn"
                },
                "Auth": [
                    {
                        "AuthScheme": "SECRETS",
                        "SecretArn": {
                            "Ref": "BootstrapProxySecretArn"
                        },
                        "IAMAuth": "DISABLED"
                    }
                ],
                "VpcSubnetIds": {
                    "Fn::Split": [
                        ",",
                        {
                            "Ref": "SubnetIds"
                        }
                    ]
                }
            }
        },
        "ProxyTargetGroup": {
            "Type": "AWS::RDS::DBProxyTargetGroup",
            "Properties": {
                "DBProxyName": {
                    "Ref": "TestDBProxy"
                },
                "DBInstanceIdentifiers": [
                    {
                        "Ref": "InstanceName"
                    }
                ],
                "TargetGroupName": "default",
                "ConnectionPoolConfigurationInfo": {
                    "MaxConnectionsPercent": 100,
                    "MaxIdleConnectionsPercent": 50,
                    "ConnectionBorrowTimeout": 120
                }
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-dbproxy--examples--Creating_a_DB_proxy_and_registering_a_DB_instance--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Parameters:
  ProxyName:
    Type: String
    Default: exampleProxy
  InstanceName:
    Type: String
    Default: database-1
  BootstrapSecretReaderRoleArn:
    Type: String
    Default: arn:aws:iam::123456789012:role/RDSSecretReaderRoleForDBProxy
  BootstrapProxySecretArn:
    Type: String
    Default: arn:aws:secretsmanager:us-west-2:123456789012:secret:MySecretForDBProxy
  SubnetIds:
    Type: String
    Default: subnet-01b761b31fb498f20,subnet-012b9a958ef0f9949,subnet-05e8e263052025378
Resources:
  TestDBProxy:
    Type: AWS::RDS::DBProxy
    Properties:
      DebugLogging: true
      DBProxyName: !Ref ProxyName
      EngineFamily: MYSQL
      IdleClientTimeout: 120
      RequireTLS: true
      RoleArn:
        !Ref BootstrapSecretReaderRoleArn
      Auth:
        - {AuthScheme: SECRETS, SecretArn: !Ref BootstrapProxySecretArn, IAMAuth: DISABLED}
      VpcSubnetIds:
        Fn::Split: [",", !Ref SubnetIds]
  ProxyTargetGroup:
    Type: AWS::RDS::DBProxyTargetGroup
    Properties:
      DBProxyName: !Ref TestDBProxy
      DBInstanceIdentifiers: [!Ref InstanceName]
      TargetGroupName: default
      ConnectionPoolConfigurationInfo:
          MaxConnectionsPercent: 100
          MaxIdleConnectionsPercent: 50
          ConnectionBorrowTimeout: 120
```

# AWS::RDS::DBProxy AuthFormat
<a name="aws-properties-rds-dbproxy-authformat"></a>

Specifies the details of authentication used by a proxy to log in as a specific database user.

## Syntax
<a name="aws-properties-rds-dbproxy-authformat-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbproxy-authformat-syntax.json"></a>

```
{
  "[AuthScheme](#cfn-rds-dbproxy-authformat-authscheme)" : String,
  "[ClientPasswordAuthType](#cfn-rds-dbproxy-authformat-clientpasswordauthtype)" : String,
  "[Description](#cfn-rds-dbproxy-authformat-description)" : String,
  "[IAMAuth](#cfn-rds-dbproxy-authformat-iamauth)" : String,
  "[SecretArn](#cfn-rds-dbproxy-authformat-secretarn)" : String
}
```

### YAML
<a name="aws-properties-rds-dbproxy-authformat-syntax.yaml"></a>

```
  [AuthScheme](#cfn-rds-dbproxy-authformat-authscheme): String
  [ClientPasswordAuthType](#cfn-rds-dbproxy-authformat-clientpasswordauthtype): String
  [Description](#cfn-rds-dbproxy-authformat-description): String
  [IAMAuth](#cfn-rds-dbproxy-authformat-iamauth): String
  [SecretArn](#cfn-rds-dbproxy-authformat-secretarn): String
```

## Properties
<a name="aws-properties-rds-dbproxy-authformat-properties"></a>

`AuthScheme`  <a name="cfn-rds-dbproxy-authformat-authscheme"></a>
The type of authentication that the proxy uses for connections from the proxy to the underlying database.  
*Required*: No  
*Type*: String  
*Allowed values*: `SECRETS`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ClientPasswordAuthType`  <a name="cfn-rds-dbproxy-authformat-clientpasswordauthtype"></a>
Specifies the details of authentication used by a proxy to log in as a specific database user.  
*Required*: No  
*Type*: String  
*Allowed values*: `MYSQL_NATIVE_PASSWORD | MYSQL_CACHING_SHA2_PASSWORD | POSTGRES_SCRAM_SHA_256 | POSTGRES_MD5 | SQL_SERVER_AUTHENTICATION`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Description`  <a name="cfn-rds-dbproxy-authformat-description"></a>
A user-specified description about the authentication used by a proxy to log in as a specific database user.  
*Required*: No  
*Type*: String  
*Pattern*: `.*`  
*Minimum*: `1`  
*Maximum*: `1000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IAMAuth`  <a name="cfn-rds-dbproxy-authformat-iamauth"></a>
A value that indicates whether to require or disallow AWS Identity and Access Management (IAM) authentication for connections to the proxy. The `ENABLED` value is valid only for proxies with RDS for Microsoft SQL Server.  
*Required*: No  
*Type*: String  
*Allowed values*: `DISABLED | REQUIRED | ENABLED`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SecretArn`  <a name="cfn-rds-dbproxy-authformat-secretarn"></a>
The Amazon Resource Name (ARN) representing the secret that the proxy uses to authenticate to the RDS DB instance or Aurora DB cluster. These secrets are stored within Amazon Secrets Manager.  
*Required*: No  
*Type*: String  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-rds-dbproxy-authformat--examples"></a>

The following example specifies authentication details for a proxy.

### Authentication details
<a name="aws-properties-rds-dbproxy-authformat--examples--Authentication_details"></a>

#### JSON
<a name="aws-properties-rds-dbproxy-authformat--examples--Authentication_details--json"></a>

```
"ProcessorFeatures":[
   {
      "AuthScheme": "SECRETS",
      "ClientPasswordAuthType": "MYSQL_NATIVE_PASSWORD",
      "Description": "Proxy authentication for MySQL",
      "IAMAuth": "DISABLED",
      "SecretArn": "arn:aws:secretsmanager:us-west-2:111122223333:secret:aes128-1a2b3c"
   }
]
```

#### YAML
<a name="aws-properties-rds-dbproxy-authformat--examples--Authentication_details--yaml"></a>

```
Auth:
  AuthScheme: SECRETS
  ClientPasswordAuthType: MYSQL_NATIVE_PASSWORD
  Description: Proxy authentication for MySQL
  IAMAuth: DISABLED
  SecretArn: arn:aws:secretsmanager:us-west-2:111122223333:secret:aes128-1a2b3c
```

# AWS::RDS::DBProxy TagFormat
<a name="aws-properties-rds-dbproxy-tagformat"></a>

Metadata assigned to an Amazon RDS resource consisting of a key-value pair.

For more information, see [Tagging Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) in the *Amazon RDS User Guide* or [Tagging Amazon Aurora and Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html) in the *Amazon Aurora User Guide*. 

## Syntax
<a name="aws-properties-rds-dbproxy-tagformat-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbproxy-tagformat-syntax.json"></a>

```
{
  "[Key](#cfn-rds-dbproxy-tagformat-key)" : String,
  "[Value](#cfn-rds-dbproxy-tagformat-value)" : String
}
```

### YAML
<a name="aws-properties-rds-dbproxy-tagformat-syntax.yaml"></a>

```
  [Key](#cfn-rds-dbproxy-tagformat-key): String
  [Value](#cfn-rds-dbproxy-tagformat-value): String
```

## Properties
<a name="aws-properties-rds-dbproxy-tagformat-properties"></a>

`Key`  <a name="cfn-rds-dbproxy-tagformat-key"></a>
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: No  
*Type*: String  
*Pattern*: `(\w|\d|\s|\\|-|\.:=+-)*`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-rds-dbproxy-tagformat-value"></a>
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: No  
*Type*: String  
*Pattern*: `(\w|\d|\s|\\|-|\.:=+-)*`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-rds-dbproxy-tagformat--examples"></a>

The following example specifies a tag for a DB proxy.

### 
<a name="aws-properties-rds-dbproxy-tagformat--examples--"></a>

#### JSON
<a name="aws-properties-rds-dbproxy-tagformat--examples----json"></a>

```
"Tags" : [
   {
      "Key" : "keyname1",
      "Value" : "value1"
   },
   {
      "Key" : "keyname2",
      "Value" : "value2"
   }
]
```

#### YAML
<a name="aws-properties-rds-dbproxy-tagformat--examples----yaml"></a>

```
Tags:
  - Key: keyname1
    Value: value1
  - Key: keyname2
    Value: value2
```

# AWS::RDS::DBProxyEndpoint
<a name="aws-resource-rds-dbproxyendpoint"></a>

The `AWS::RDS::DBProxyEndpoint` resource creates or updates a DB proxy endpoint. You can use custom proxy endpoints to access a proxy through a different VPC than the proxy's default VPC.

For more information about RDS Proxy, see [ AWS::RDS::DBProxy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbproxy.html).

## Syntax
<a name="aws-resource-rds-dbproxyendpoint-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-rds-dbproxyendpoint-syntax.json"></a>

```
{
  "Type" : "AWS::RDS::DBProxyEndpoint",
  "Properties" : {
      "[DBProxyEndpointName](#cfn-rds-dbproxyendpoint-dbproxyendpointname)" : String,
      "[DBProxyName](#cfn-rds-dbproxyendpoint-dbproxyname)" : String,
      "[EndpointNetworkType](#cfn-rds-dbproxyendpoint-endpointnetworktype)" : String,
      "[Tags](#cfn-rds-dbproxyendpoint-tags)" : [ TagFormat, ... ],
      "[TargetRole](#cfn-rds-dbproxyendpoint-targetrole)" : String,
      "[VpcSecurityGroupIds](#cfn-rds-dbproxyendpoint-vpcsecuritygroupids)" : [ String, ... ],
      "[VpcSubnetIds](#cfn-rds-dbproxyendpoint-vpcsubnetids)" : [ String, ... ]
    }
}
```

### YAML
<a name="aws-resource-rds-dbproxyendpoint-syntax.yaml"></a>

```
Type: AWS::RDS::DBProxyEndpoint
Properties:
  [DBProxyEndpointName](#cfn-rds-dbproxyendpoint-dbproxyendpointname): String
  [DBProxyName](#cfn-rds-dbproxyendpoint-dbproxyname): String
  [EndpointNetworkType](#cfn-rds-dbproxyendpoint-endpointnetworktype): String
  [Tags](#cfn-rds-dbproxyendpoint-tags): 
    - TagFormat
  [TargetRole](#cfn-rds-dbproxyendpoint-targetrole): String
  [VpcSecurityGroupIds](#cfn-rds-dbproxyendpoint-vpcsecuritygroupids): 
    - String
  [VpcSubnetIds](#cfn-rds-dbproxyendpoint-vpcsubnetids): 
    - String
```

## Properties
<a name="aws-resource-rds-dbproxyendpoint-properties"></a>

`DBProxyEndpointName`  <a name="cfn-rds-dbproxyendpoint-dbproxyendpointname"></a>
The name of the DB proxy endpoint to create.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[0-z]*`  
*Maximum*: `64`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DBProxyName`  <a name="cfn-rds-dbproxyendpoint-dbproxyname"></a>
The name of the DB proxy associated with the DB proxy endpoint that you create.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[0-z]*`  
*Maximum*: `64`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`EndpointNetworkType`  <a name="cfn-rds-dbproxyendpoint-endpointnetworktype"></a>
The network type of the DB proxy endpoint. The network type determines the IP version that the proxy endpoint supports.  
Valid values:  
+ `IPV4` - The proxy endpoint supports IPv4 only.
+ `IPV6` - The proxy endpoint supports IPv6 only.
+ `DUAL` - The proxy endpoint supports both IPv4 and IPv6.
*Required*: No  
*Type*: String  
*Allowed values*: `IPV4 | IPV6 | DUAL`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-rds-dbproxyendpoint-tags"></a>
An optional set of key-value pairs to associate arbitrary data of your choosing with the proxy.  
*Required*: No  
*Type*: Array of [TagFormat](aws-properties-rds-dbproxyendpoint-tagformat.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TargetRole`  <a name="cfn-rds-dbproxyendpoint-targetrole"></a>
A value that indicates whether the DB proxy endpoint can be used for read/write or read-only operations.  
*Required*: No  
*Type*: String  
*Allowed values*: `READ_WRITE | READ_ONLY`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`VpcSecurityGroupIds`  <a name="cfn-rds-dbproxyendpoint-vpcsecuritygroupids"></a>
The VPC security group IDs for the DB proxy endpoint that you create. You can specify a different set of security group IDs than for the original DB proxy. The default is the default security group for the VPC.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`VpcSubnetIds`  <a name="cfn-rds-dbproxyendpoint-vpcsubnetids"></a>
The VPC subnet IDs for the DB proxy endpoint that you create. You can specify a different set of subnet IDs than for the original DB proxy.  
*Required*: Yes  
*Type*: Array of String  
*Minimum*: `2`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-rds-dbproxyendpoint-return-values"></a>

### Ref
<a name="aws-resource-rds-dbproxyendpoint-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the name of the DB proxy endpoint.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-rds-dbproxyendpoint-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-rds-dbproxyendpoint-return-values-fn--getatt-fn--getatt"></a>

`DBProxyEndpointArn`  <a name="DBProxyEndpointArn-fn::getatt"></a>
The Amazon Resource Name (ARN) for the DB proxy endpoint.

`Endpoint`  <a name="Endpoint-fn::getatt"></a>
The endpoint that you can use to connect to the DB proxy. You include the endpoint value in the connection string for a database client application.

`IsDefault`  <a name="IsDefault-fn::getatt"></a>
Indicates whether this endpoint is the default endpoint for the associated DB proxy. Default DB proxy endpoints always have read/write capability. Other endpoints that you associate with the DB proxy can be either read/write or read-only.

`VpcId`  <a name="VpcId-fn::getatt"></a>
Provides the VPC ID of the DB proxy endpoint.

## Examples
<a name="aws-resource-rds-dbproxyendpoint--examples"></a>

### Creating a custom DB proxy endpoint
<a name="aws-resource-rds-dbproxyendpoint--examples--Creating_a_custom_DB_proxy_endpoint"></a>

The following example creates a custom DB proxy endpoint.

#### JSON
<a name="aws-resource-rds-dbproxyendpoint--examples--Creating_a_custom_DB_proxy_endpoint--json"></a>

```
{
  "AWSTemplateFormatVersion": "2010-09-09",
  "Parameters": {
    "ProxyEndpointName": {
      "Type": "String",
      "Default": "exampleProxyEndpoint"
    },
    "ProxyName": {
      "Type": "String",
      "Default": "exampleProxy"
    },
    "SecurityGroupIds": {
      "Type": "String",
      "Default": "sg-12345678"
    },
    "SubnetIds": {
      "Type": "String",
      "Default": "subnet-12345677,subnet-12345678,subnet-12345679"
    }
  },
  "Resources": {
    "TestDBProxy": {
      "Type": "AWS::RDS::DBProxyEndpoint",
      "Properties": {
        "DBProxyEndpointName": {
          "Ref": "ProxyEndpointName"
        },
        "DBProxyName": {
          "Ref": "ProxyName"
        },
        "VpcSecurityGroupIds": {
          "Fn::Split": [
            ",",
            {
              "Ref": "SecurityGroupIds"
            }
          ]
        },
        "VpcSubnetIds": {
          "Fn::Split": [
            ",",
            {
              "Ref": "SubnetIds"
            }
          ]
        },
        "TargetRole": "READ_ONLY"
      }
    }
  }
}
```

#### YAML
<a name="aws-resource-rds-dbproxyendpoint--examples--Creating_a_custom_DB_proxy_endpoint--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Parameters:
  ProxyEndpointName:
    Type: String
    Default: exampleProxyEndpoint
  ProxyName:
    Type: String
    Default: exampleProxy
  SubnetIds:
    Type: String
    Default: subnet-12345677,subnet-12345678,subnet-12345679
  SecurityGroupIds:
    Type: String
    Default: sg-12345678
Resources:
  TestDBProxyEndpoint:
    Type: AWS::RDS::DBProxyEndpoint
    Properties:
      DBProxyEndpointName: !Ref ProxyEndpointName
      DBProxyName: !Ref ProxyName
      VpcSubnetIds:
        Fn::Split: [",", !Ref SubnetIds]
      VpcSecurityGroupIds:
        Fn::Split: [",", !Ref SecurityGroupIds]
      TargetRole: READ_ONLY
```

# AWS::RDS::DBProxyEndpoint TagFormat
<a name="aws-properties-rds-dbproxyendpoint-tagformat"></a>

Metadata assigned to an Amazon RDS resource consisting of a key-value pair.

For more information, see [Tagging Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) in the *Amazon RDS User Guide* or [Tagging Amazon Aurora and Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html) in the *Amazon Aurora User Guide*. 

## Syntax
<a name="aws-properties-rds-dbproxyendpoint-tagformat-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbproxyendpoint-tagformat-syntax.json"></a>

```
{
  "[Key](#cfn-rds-dbproxyendpoint-tagformat-key)" : String,
  "[Value](#cfn-rds-dbproxyendpoint-tagformat-value)" : String
}
```

### YAML
<a name="aws-properties-rds-dbproxyendpoint-tagformat-syntax.yaml"></a>

```
  [Key](#cfn-rds-dbproxyendpoint-tagformat-key): String
  [Value](#cfn-rds-dbproxyendpoint-tagformat-value): String
```

## Properties
<a name="aws-properties-rds-dbproxyendpoint-tagformat-properties"></a>

`Key`  <a name="cfn-rds-dbproxyendpoint-tagformat-key"></a>
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: No  
*Type*: String  
*Pattern*: `(\w|\d|\s|\\|-|\.:=+-)*`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-rds-dbproxyendpoint-tagformat-value"></a>
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: No  
*Type*: String  
*Pattern*: `(\w|\d|\s|\\|-|\.:=+-)*`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-rds-dbproxyendpoint-tagformat--examples"></a>

The following example specifies a tag for a DB proxy endpoint.

### 
<a name="aws-properties-rds-dbproxyendpoint-tagformat--examples--"></a>

#### JSON
<a name="aws-properties-rds-dbproxyendpoint-tagformat--examples----json"></a>

```
"Tags" : [
   {
      "Key" : "keyname1",
      "Value" : "value1"
   },
   {
      "Key" : "keyname2",
      "Value" : "value2"
   }
]
```

#### YAML
<a name="aws-properties-rds-dbproxyendpoint-tagformat--examples----yaml"></a>

```
Tags:
  - Key: keyname1
    Value: value1
  - Key: keyname2
    Value: value2
```

# AWS::RDS::DBProxyTargetGroup
<a name="aws-resource-rds-dbproxytargetgroup"></a>

The `AWS::RDS::DBProxyTargetGroup` resource represents a set of RDS DB instances, Aurora DB clusters, or both that a proxy can connect to. Currently, each target group is associated with exactly one RDS DB instance or Aurora DB cluster.

This data type is used as a response element in the `DescribeDBProxyTargetGroups` action.

For information about RDS Proxy for Amazon RDS, see [ Managing Connections with Amazon RDS Proxy](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy.html) in the *Amazon RDS User Guide*.

For information about RDS Proxy for Amazon Aurora, see [ Managing Connections with Amazon RDS Proxy](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-proxy.html) in the *Amazon Aurora User Guide*.

For a sample template that creates a DB proxy and registers a DB instance, see [ Examples](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbproxy.html#aws-resource-rds-dbproxy--examples) in AWS::RDS::DBProxy.

**Note**  
Limitations apply to RDS Proxy, including DB engine version limitations and AWS Region limitations.  
For information about limitations that apply to RDS Proxy for Amazon RDS, see [ Limitations for RDS Proxy](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy.html#rds-proxy.limitations) in the *Amazon RDS User Guide*.  
For information about that apply to RDS Proxy for Amazon Aurora, see [ Limitations for RDS Proxy](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/rds-proxy.html#rds-proxy.limitations) in the *Amazon Aurora User Guide*.

## Syntax
<a name="aws-resource-rds-dbproxytargetgroup-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-rds-dbproxytargetgroup-syntax.json"></a>

```
{
  "Type" : "AWS::RDS::DBProxyTargetGroup",
  "Properties" : {
      "[ConnectionPoolConfigurationInfo](#cfn-rds-dbproxytargetgroup-connectionpoolconfigurationinfo)" : ConnectionPoolConfigurationInfoFormat,
      "[DBClusterIdentifiers](#cfn-rds-dbproxytargetgroup-dbclusteridentifiers)" : [ String, ... ],
      "[DBInstanceIdentifiers](#cfn-rds-dbproxytargetgroup-dbinstanceidentifiers)" : [ String, ... ],
      "[DBProxyName](#cfn-rds-dbproxytargetgroup-dbproxyname)" : String,
      "[TargetGroupName](#cfn-rds-dbproxytargetgroup-targetgroupname)" : String
    }
}
```

### YAML
<a name="aws-resource-rds-dbproxytargetgroup-syntax.yaml"></a>

```
Type: AWS::RDS::DBProxyTargetGroup
Properties:
  [ConnectionPoolConfigurationInfo](#cfn-rds-dbproxytargetgroup-connectionpoolconfigurationinfo): 
    ConnectionPoolConfigurationInfoFormat
  [DBClusterIdentifiers](#cfn-rds-dbproxytargetgroup-dbclusteridentifiers): 
    - String
  [DBInstanceIdentifiers](#cfn-rds-dbproxytargetgroup-dbinstanceidentifiers): 
    - String
  [DBProxyName](#cfn-rds-dbproxytargetgroup-dbproxyname): String
  [TargetGroupName](#cfn-rds-dbproxytargetgroup-targetgroupname): String
```

## Properties
<a name="aws-resource-rds-dbproxytargetgroup-properties"></a>

`ConnectionPoolConfigurationInfo`  <a name="cfn-rds-dbproxytargetgroup-connectionpoolconfigurationinfo"></a>
Displays the settings that control the size and behavior of the connection pool associated with a `DBProxyTarget`.  
*Required*: No  
*Type*: [ConnectionPoolConfigurationInfoFormat](aws-properties-rds-dbproxytargetgroup-connectionpoolconfigurationinfoformat.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DBClusterIdentifiers`  <a name="cfn-rds-dbproxytargetgroup-dbclusteridentifiers"></a>
One or more DB cluster identifiers.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DBInstanceIdentifiers`  <a name="cfn-rds-dbproxytargetgroup-dbinstanceidentifiers"></a>
One or more DB instance identifiers.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DBProxyName`  <a name="cfn-rds-dbproxytargetgroup-dbproxyname"></a>
The identifier of the `DBProxy` that is associated with the `DBProxyTargetGroup`.  
*Required*: Yes  
*Type*: String  
*Pattern*: `[A-z][0-z]*`  
*Maximum*: `64`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`TargetGroupName`  <a name="cfn-rds-dbproxytargetgroup-targetgroupname"></a>
The identifier for the target group.  
Currently, this property must be set to `default`.
*Required*: Yes  
*Type*: String  
*Allowed values*: `default`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-rds-dbproxytargetgroup-return-values"></a>

### Ref
<a name="aws-resource-rds-dbproxytargetgroup-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ARN of the target group.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-rds-dbproxytargetgroup-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-rds-dbproxytargetgroup-return-values-fn--getatt-fn--getatt"></a>

`TargetGroupArn`  <a name="TargetGroupArn-fn::getatt"></a>
The Amazon Resource Name (ARN) representing the target group.

# AWS::RDS::DBProxyTargetGroup ConnectionPoolConfigurationInfoFormat
<a name="aws-properties-rds-dbproxytargetgroup-connectionpoolconfigurationinfoformat"></a>

Specifies the settings that control the size and behavior of the connection pool associated with a `DBProxyTargetGroup`.

## Syntax
<a name="aws-properties-rds-dbproxytargetgroup-connectionpoolconfigurationinfoformat-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbproxytargetgroup-connectionpoolconfigurationinfoformat-syntax.json"></a>

```
{
  "[ConnectionBorrowTimeout](#cfn-rds-dbproxytargetgroup-connectionpoolconfigurationinfoformat-connectionborrowtimeout)" : Integer,
  "[InitQuery](#cfn-rds-dbproxytargetgroup-connectionpoolconfigurationinfoformat-initquery)" : String,
  "[MaxConnectionsPercent](#cfn-rds-dbproxytargetgroup-connectionpoolconfigurationinfoformat-maxconnectionspercent)" : Integer,
  "[MaxIdleConnectionsPercent](#cfn-rds-dbproxytargetgroup-connectionpoolconfigurationinfoformat-maxidleconnectionspercent)" : Integer,
  "[SessionPinningFilters](#cfn-rds-dbproxytargetgroup-connectionpoolconfigurationinfoformat-sessionpinningfilters)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-rds-dbproxytargetgroup-connectionpoolconfigurationinfoformat-syntax.yaml"></a>

```
  [ConnectionBorrowTimeout](#cfn-rds-dbproxytargetgroup-connectionpoolconfigurationinfoformat-connectionborrowtimeout): Integer
  [InitQuery](#cfn-rds-dbproxytargetgroup-connectionpoolconfigurationinfoformat-initquery): String
  [MaxConnectionsPercent](#cfn-rds-dbproxytargetgroup-connectionpoolconfigurationinfoformat-maxconnectionspercent): Integer
  [MaxIdleConnectionsPercent](#cfn-rds-dbproxytargetgroup-connectionpoolconfigurationinfoformat-maxidleconnectionspercent): Integer
  [SessionPinningFilters](#cfn-rds-dbproxytargetgroup-connectionpoolconfigurationinfoformat-sessionpinningfilters): 
    - String
```

## Properties
<a name="aws-properties-rds-dbproxytargetgroup-connectionpoolconfigurationinfoformat-properties"></a>

`ConnectionBorrowTimeout`  <a name="cfn-rds-dbproxytargetgroup-connectionpoolconfigurationinfoformat-connectionborrowtimeout"></a>
The number of seconds for a proxy to wait for a connection to become available in the connection pool. This setting only applies when the proxy has opened its maximum number of connections and all connections are busy with client sessions.  
Default: `120`  
Constraints:  
+ Must be between 0 and 300.
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`InitQuery`  <a name="cfn-rds-dbproxytargetgroup-connectionpoolconfigurationinfoformat-initquery"></a>
Add an initialization query, or modify the current one. You can specify one or more SQL statements for the proxy to run when opening each new database connection. The setting is typically used with `SET` statements to make sure that each connection has identical settings. Make sure the query added here is valid. This is an optional field, so you can choose to leave it empty. For including multiple variables in a single SET statement, use a comma separator.  
For example: `SET variable1=value1, variable2=value2`  
Default: no initialization query  
Since you can access initialization query as part of target group configuration, it is not protected by authentication or cryptographic methods. Anyone with access to view or manage your proxy target group configuration can view the initialization query. You should not add sensitive data, such as passwords or long-lived encryption keys, to this option.
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaxConnectionsPercent`  <a name="cfn-rds-dbproxytargetgroup-connectionpoolconfigurationinfoformat-maxconnectionspercent"></a>
The maximum size of the connection pool for each target in a target group. The value is expressed as a percentage of the `max_connections` setting for the RDS DB instance or Aurora DB cluster used by the target group.  
If you specify `MaxIdleConnectionsPercent`, then you must also include a value for this parameter.  
Default: `10` for RDS for Microsoft SQL Server, and `100` for all other engines  
Constraints:  
+ Must be between 1 and 100.
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `100`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaxIdleConnectionsPercent`  <a name="cfn-rds-dbproxytargetgroup-connectionpoolconfigurationinfoformat-maxidleconnectionspercent"></a>
A value that controls how actively the proxy closes idle database connections in the connection pool. The value is expressed as a percentage of the `max_connections` setting for the RDS DB instance or Aurora DB cluster used by the target group. With a high value, the proxy leaves a high percentage of idle database connections open. A low value causes the proxy to close more idle connections and return them to the database.  
If you specify this parameter, then you must also include a value for `MaxConnectionsPercent`.  
Default: The default value is half of the value of `MaxConnectionsPercent`. For example, if `MaxConnectionsPercent` is 80, then the default value of `MaxIdleConnectionsPercent` is 40. If the value of `MaxConnectionsPercent` isn't specified, then for SQL Server, `MaxIdleConnectionsPercent` is `5`, and for all other engines, the default is `50`.  
Constraints:  
+ Must be between 0 and the value of `MaxConnectionsPercent`.
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `100`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SessionPinningFilters`  <a name="cfn-rds-dbproxytargetgroup-connectionpoolconfigurationinfoformat-sessionpinningfilters"></a>
Each item in the list represents a class of SQL operations that normally cause all later statements in a session using a proxy to be pinned to the same underlying database connection. Including an item in the list exempts that class of SQL operations from the pinning behavior.  
Default: no session pinning filters  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::RDS::DBSecurityGroup
<a name="aws-resource-rds-dbsecuritygroup"></a>

The `AWS::RDS::DBSecurityGroup` resource creates or updates an Amazon RDS DB security group.

**Note**  
EC2-Classic was retired on August 15, 2022. If you haven't migrated from EC2-Classic to a VPC, we recommend that you migrate as soon as possible. For more information, see [Migrate from EC2-Classic to a VPC](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in the *Amazon EC2 User Guide*, the blog [EC2-Classic Networking is Retiring – Here’s How to Prepare](https://aws.amazon.com/blogs/aws/ec2-classic-is-retiring-heres-how-to-prepare/), and [Moving a DB instance not in a VPC into a VPC](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.Non-VPC2VPC.html) in the *Amazon RDS User Guide*.

## Syntax
<a name="aws-resource-rds-dbsecuritygroup-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-rds-dbsecuritygroup-syntax.json"></a>

```
{
  "Type" : "AWS::RDS::DBSecurityGroup",
  "Properties" : {
      "[DBSecurityGroupIngress](#cfn-rds-dbsecuritygroup-dbsecuritygroupingress)" : [ Ingress, ... ],
      "[EC2VpcId](#cfn-rds-dbsecuritygroup-ec2vpcid)" : String,
      "[GroupDescription](#cfn-rds-dbsecuritygroup-groupdescription)" : String,
      "[Tags](#cfn-rds-dbsecuritygroup-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-rds-dbsecuritygroup-syntax.yaml"></a>

```
Type: AWS::RDS::DBSecurityGroup
Properties:
  [DBSecurityGroupIngress](#cfn-rds-dbsecuritygroup-dbsecuritygroupingress): 
    - Ingress
  [EC2VpcId](#cfn-rds-dbsecuritygroup-ec2vpcid): String
  [GroupDescription](#cfn-rds-dbsecuritygroup-groupdescription): String
  [Tags](#cfn-rds-dbsecuritygroup-tags): 
    - Tag
```

## Properties
<a name="aws-resource-rds-dbsecuritygroup-properties"></a>

`DBSecurityGroupIngress`  <a name="cfn-rds-dbsecuritygroup-dbsecuritygroupingress"></a>
Ingress rules to be applied to the DB security group.  
*Required*: Yes  
*Type*: Array of [Ingress](aws-properties-rds-dbsecuritygroup-ingress.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EC2VpcId`  <a name="cfn-rds-dbsecuritygroup-ec2vpcid"></a>
The identifier of an Amazon virtual private cloud (VPC). This property indicates the VPC that this DB security group belongs to.  
This property is included for backwards compatibility and is no longer recommended for providing security information to an RDS DB instance.
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`GroupDescription`  <a name="cfn-rds-dbsecuritygroup-groupdescription"></a>
Provides the description of the DB security group.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-rds-dbsecuritygroup-tags"></a>
Metadata assigned to an Amazon RDS resource consisting of a key-value pair.  
For more information, see [Tagging Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) in the *Amazon RDS User Guide* or [Tagging Amazon Aurora and Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html) in the *Amazon Aurora User Guide*.   
*Required*: No  
*Type*: Array of [Tag](aws-properties-rds-dbsecuritygroup-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-rds-dbsecuritygroup-return-values"></a>

### Ref
<a name="aws-resource-rds-dbsecuritygroup-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the name of the DB security group.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-rds-dbsecuritygroup-return-values-fn--getatt"></a>

## Examples
<a name="aws-resource-rds-dbsecuritygroup--examples"></a>



**Topics**
+ [Creating a single VPC security group](#aws-resource-rds-dbsecuritygroup--examples--Creating_a_single_VPC_security_group)
+ [Multiple VPC security groups](#aws-resource-rds-dbsecuritygroup--examples--Multiple_VPC_security_groups)

### Creating a single VPC security group
<a name="aws-resource-rds-dbsecuritygroup--examples--Creating_a_single_VPC_security_group"></a>

The following example creates a single VPC security group, referred to by `EC2SecurityGroupName`. 

#### JSON
<a name="aws-resource-rds-dbsecuritygroup--examples--Creating_a_single_VPC_security_group--json"></a>

```
{
    "Resources": {
        "DBinstance": {
            "Type": "AWS::RDS::DBInstance",
            "Properties": {
                "DBSecurityGroups": [
                    {
                        "Ref": "DbSecurityByEC2SecurityGroup"
                    }
                ],
                "AllocatedStorage": "5",
                "DBInstanceClass": "db.t3.small",
                "Engine": "MySQL",
                "MasterUsername": "YourName",
                "MasterUserPassword": "YourPassword"
            },
            "DeletionPolicy": "Snapshot"
        },
        "DbSecurityByEC2SecurityGroup": {
            "Type": "AWS::RDS::DBSecurityGroup",
            "Properties": {
                "GroupDescription": "Ingress for Amazon EC2 security group",
                "DBSecurityGroupIngress": [
                    {
                        "EC2SecurityGroupId": "sg-b0ff1111",
                        "EC2SecurityGroupOwnerId": "111122223333"
                    },
                    {
                        "EC2SecurityGroupId": "sg-ffd722222",
                        "EC2SecurityGroupOwnerId": "111122223333"
                    }
                ]
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-dbsecuritygroup--examples--Creating_a_single_VPC_security_group--yaml"></a>

```
Resources: 
  DBinstance: 
    Type: AWS::RDS::DBInstance
    Properties: 
      DBSecurityGroups: 
        - 
          Ref: "DbSecurityByEC2SecurityGroup"
      AllocatedStorage: "5"
      DBInstanceClass: "db.t3.small"
      Engine: "MySQL"
      MasterUsername: "YourName"
      MasterUserPassword: "YourPassword"
    DeletionPolicy: "Snapshot"
  DbSecurityByEC2SecurityGroup: 
    Type: AWS::RDS::DBSecurityGroup
    Properties: 
      GroupDescription: "Ingress for Amazon EC2 security group"
      DBSecurityGroupIngress: 
        - 
          EC2SecurityGroupId: "sg-b0ff1111"
          EC2SecurityGroupOwnerId: "111122223333"
        - 
          EC2SecurityGroupId: "sg-ffd722222"
          EC2SecurityGroupOwnerId: "111122223333"
```

### Multiple VPC security groups
<a name="aws-resource-rds-dbsecuritygroup--examples--Multiple_VPC_security_groups"></a>

The following example creates or updates multiple VPC security groups. 

#### JSON
<a name="aws-resource-rds-dbsecuritygroup--examples--Multiple_VPC_security_groups--json"></a>

```
"DBSecurityGroup": {
   "Type": "AWS::RDS::DBSecurityGroup",
   "Properties": {
      "EC2VpcId" : { "Ref" : "VpcId" },
      "DBSecurityGroupIngress": [
         {"EC2SecurityGroupName": { "Ref": "WebServerSecurityGroup"}}
      ],
      "GroupDescription": "Frontend Access"
   }
}
```

#### YAML
<a name="aws-resource-rds-dbsecuritygroup--examples--Multiple_VPC_security_groups--yaml"></a>

```
DBSecurityGroup: 
  Type: AWS::RDS::DBSecurityGroup
  Properties: 
    EC2VpcId: 
      Ref: "VpcId"
    DBSecurityGroupIngress: 
      - 
        EC2SecurityGroupName: 
          Ref: "WebServerSecurityGroup"
    GroupDescription: "Frontend Access"
```

# AWS::RDS::DBSecurityGroup Ingress
<a name="aws-properties-rds-dbsecuritygroup-ingress"></a>

The `Ingress` property type specifies an individual ingress rule within an `AWS::RDS::DBSecurityGroup` resource.

**Note**  
EC2-Classic was retired on August 15, 2022. If you haven't migrated from EC2-Classic to a VPC, we recommend that you migrate as soon as possible. For more information, see [Migrate from EC2-Classic to a VPC](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in the *Amazon EC2 User Guide*, the blog [EC2-Classic Networking is Retiring – Here’s How to Prepare](https://aws.amazon.com/blogs/aws/ec2-classic-is-retiring-heres-how-to-prepare/), and [Moving a DB instance not in a VPC into a VPC](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.Non-VPC2VPC.html) in the *Amazon RDS User Guide*.

## Syntax
<a name="aws-properties-rds-dbsecuritygroup-ingress-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbsecuritygroup-ingress-syntax.json"></a>

```
{
  "[CIDRIP](#cfn-rds-dbsecuritygroup-ingress-cidrip)" : String,
  "[EC2SecurityGroupId](#cfn-rds-dbsecuritygroup-ingress-ec2securitygroupid)" : String,
  "[EC2SecurityGroupName](#cfn-rds-dbsecuritygroup-ingress-ec2securitygroupname)" : String,
  "[EC2SecurityGroupOwnerId](#cfn-rds-dbsecuritygroup-ingress-ec2securitygroupownerid)" : String
}
```

### YAML
<a name="aws-properties-rds-dbsecuritygroup-ingress-syntax.yaml"></a>

```
  [CIDRIP](#cfn-rds-dbsecuritygroup-ingress-cidrip): String
  [EC2SecurityGroupId](#cfn-rds-dbsecuritygroup-ingress-ec2securitygroupid): String
  [EC2SecurityGroupName](#cfn-rds-dbsecuritygroup-ingress-ec2securitygroupname): String
  [EC2SecurityGroupOwnerId](#cfn-rds-dbsecuritygroup-ingress-ec2securitygroupownerid): String
```

## Properties
<a name="aws-properties-rds-dbsecuritygroup-ingress-properties"></a>

`CIDRIP`  <a name="cfn-rds-dbsecuritygroup-ingress-cidrip"></a>
The IP range to authorize.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EC2SecurityGroupId`  <a name="cfn-rds-dbsecuritygroup-ingress-ec2securitygroupid"></a>
Id of the EC2 security group to authorize. For VPC DB security groups, `EC2SecurityGroupId` must be provided. Otherwise, `EC2SecurityGroupOwnerId` and either `EC2SecurityGroupName` or `EC2SecurityGroupId` must be provided.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EC2SecurityGroupName`  <a name="cfn-rds-dbsecuritygroup-ingress-ec2securitygroupname"></a>
Name of the EC2 security group to authorize. For VPC DB security groups, `EC2SecurityGroupId` must be provided. Otherwise, `EC2SecurityGroupOwnerId` and either `EC2SecurityGroupName` or `EC2SecurityGroupId` must be provided.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EC2SecurityGroupOwnerId`  <a name="cfn-rds-dbsecuritygroup-ingress-ec2securitygroupownerid"></a>
AWS account number of the owner of the EC2 security group specified in the `EC2SecurityGroupName` parameter. The AWS access key ID isn't an acceptable value. For VPC DB security groups, `EC2SecurityGroupId` must be provided. Otherwise, `EC2SecurityGroupOwnerId` and either `EC2SecurityGroupName` or `EC2SecurityGroupId` must be provided.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-rds-dbsecuritygroup-ingress--examples"></a>



### Specifying an ingress rule
<a name="aws-properties-rds-dbsecuritygroup-ingress--examples--Specifying_an_ingress_rule"></a>

The following example specifies two security group ingress rules.

#### JSON
<a name="aws-properties-rds-dbsecuritygroup-ingress--examples--Specifying_an_ingress_rule--json"></a>

```
"DBSecurityGroupIngress":[
   {
      "EC2SecurityGroupId":"sg-b0ff1111",
      "EC2SecurityGroupOwnerId":"111122223333"
   },
   {
      "EC2SecurityGroupId":"sg-ffd722222",
      "EC2SecurityGroupOwnerId":"111122223333"
   }
]
```

#### YAML
<a name="aws-properties-rds-dbsecuritygroup-ingress--examples--Specifying_an_ingress_rule--yaml"></a>

```
DBSecurityGroupIngress:
  - EC2SecurityGroupId: sg-b0ff1111
    EC2SecurityGroupOwnerId: '111122223333'
  - EC2SecurityGroupId: sg-ffd722222
    EC2SecurityGroupOwnerId: '111122223333'
```

# AWS::RDS::DBSecurityGroup Tag
<a name="aws-properties-rds-dbsecuritygroup-tag"></a>

Metadata assigned to an Amazon RDS resource consisting of a key-value pair.

For more information, see [Tagging Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) in the *Amazon RDS User Guide* or [Tagging Amazon Aurora and Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html) in the *Amazon Aurora User Guide*. 

## Syntax
<a name="aws-properties-rds-dbsecuritygroup-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbsecuritygroup-tag-syntax.json"></a>

```
{
  "[Key](#cfn-rds-dbsecuritygroup-tag-key)" : String,
  "[Value](#cfn-rds-dbsecuritygroup-tag-value)" : String
}
```

### YAML
<a name="aws-properties-rds-dbsecuritygroup-tag-syntax.yaml"></a>

```
  [Key](#cfn-rds-dbsecuritygroup-tag-key): String
  [Value](#cfn-rds-dbsecuritygroup-tag-value): String
```

## Properties
<a name="aws-properties-rds-dbsecuritygroup-tag-properties"></a>

`Key`  <a name="cfn-rds-dbsecuritygroup-tag-key"></a>
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-rds-dbsecuritygroup-tag-value"></a>
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-rds-dbsecuritygroup-tag--examples"></a>

The following example specifies a tag for a DB security group.

### 
<a name="aws-properties-rds-dbsecuritygroup-tag--examples--"></a>

#### JSON
<a name="aws-properties-rds-dbsecuritygroup-tag--examples----json"></a>

```
"Tags" : [
   {
      "Key" : "keyname1",
      "Value" : "value1"
   },
   {
      "Key" : "keyname2",
      "Value" : "value2"
   }
]
```

#### YAML
<a name="aws-properties-rds-dbsecuritygroup-tag--examples----yaml"></a>

```
Tags:
  - Key: keyname1
    Value: value1
  - Key: keyname2
    Value: value2
```

# AWS::RDS::DBSecurityGroupIngress
<a name="aws-resource-rds-dbsecuritygroupingress"></a>

The `AWS::RDS::DBSecurityGroupIngress` resource enables ingress to a DB security group using one of two forms of authorization. First, you can add EC2 or VPC security groups to the DB security group if the application using the database is running on EC2 or VPC instances. Second, IP ranges are available if the application accessing your database is running on the Internet.

This type supports updates. For more information about updating stacks, see [AWS CloudFormation Stacks Updates](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks.html).

For details about the settings for DB security group ingress, see [AuthorizeDBSecurityGroupIngress](https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_AuthorizeDBSecurityGroupIngress.html).

**Note**  
EC2-Classic was retired on August 15, 2022. If you haven't migrated from EC2-Classic to a VPC, we recommend that you migrate as soon as possible. For more information, see [Migrate from EC2-Classic to a VPC](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-migrate.html) in the *Amazon EC2 User Guide*, the blog [EC2-Classic Networking is Retiring – Here’s How to Prepare](https://aws.amazon.com/blogs/aws/ec2-classic-is-retiring-heres-how-to-prepare/), and [Moving a DB instance not in a VPC into a VPC](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.Non-VPC2VPC.html) in the *Amazon RDS User Guide*.

## Syntax
<a name="aws-resource-rds-dbsecuritygroupingress-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-rds-dbsecuritygroupingress-syntax.json"></a>

```
{
  "Type" : "AWS::RDS::DBSecurityGroupIngress",
  "Properties" : {
      "[CIDRIP](#cfn-rds-dbsecuritygroupingress-cidrip)" : String,
      "[DBSecurityGroupName](#cfn-rds-dbsecuritygroupingress-dbsecuritygroupname)" : String,
      "[EC2SecurityGroupId](#cfn-rds-dbsecuritygroupingress-ec2securitygroupid)" : String,
      "[EC2SecurityGroupName](#cfn-rds-dbsecuritygroupingress-ec2securitygroupname)" : String,
      "[EC2SecurityGroupOwnerId](#cfn-rds-dbsecuritygroupingress-ec2securitygroupownerid)" : String
    }
}
```

### YAML
<a name="aws-resource-rds-dbsecuritygroupingress-syntax.yaml"></a>

```
Type: AWS::RDS::DBSecurityGroupIngress
Properties:
  [CIDRIP](#cfn-rds-dbsecuritygroupingress-cidrip): String
  [DBSecurityGroupName](#cfn-rds-dbsecuritygroupingress-dbsecuritygroupname): String
  [EC2SecurityGroupId](#cfn-rds-dbsecuritygroupingress-ec2securitygroupid): String
  [EC2SecurityGroupName](#cfn-rds-dbsecuritygroupingress-ec2securitygroupname): String
  [EC2SecurityGroupOwnerId](#cfn-rds-dbsecuritygroupingress-ec2securitygroupownerid): String
```

## Properties
<a name="aws-resource-rds-dbsecuritygroupingress-properties"></a>

`CIDRIP`  <a name="cfn-rds-dbsecuritygroupingress-cidrip"></a>
The IP range to authorize.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DBSecurityGroupName`  <a name="cfn-rds-dbsecuritygroupingress-dbsecuritygroupname"></a>
The name of the DB security group to add authorization to.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EC2SecurityGroupId`  <a name="cfn-rds-dbsecuritygroupingress-ec2securitygroupid"></a>
Id of the EC2 security group to authorize. For VPC DB security groups, `EC2SecurityGroupId` must be provided. Otherwise, `EC2SecurityGroupOwnerId` and either `EC2SecurityGroupName` or `EC2SecurityGroupId` must be provided.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EC2SecurityGroupName`  <a name="cfn-rds-dbsecuritygroupingress-ec2securitygroupname"></a>
Name of the EC2 security group to authorize. For VPC DB security groups, `EC2SecurityGroupId` must be provided. Otherwise, `EC2SecurityGroupOwnerId` and either `EC2SecurityGroupName` or `EC2SecurityGroupId` must be provided.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EC2SecurityGroupOwnerId`  <a name="cfn-rds-dbsecuritygroupingress-ec2securitygroupownerid"></a>
AWS account number of the owner of the EC2 security group specified in the `EC2SecurityGroupName` parameter. The AWS access key ID isn't an acceptable value. For VPC DB security groups, `EC2SecurityGroupId` must be provided. Otherwise, `EC2SecurityGroupOwnerId` and either `EC2SecurityGroupName` or `EC2SecurityGroupId` must be provided.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-rds-dbsecuritygroupingress-return-values"></a>

### Ref
<a name="aws-resource-rds-dbsecuritygroupingress-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the DB security group that this ingress rule is associated with.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-rds-dbsecuritygroupingress-return-values-fn--getatt"></a>

## Examples
<a name="aws-resource-rds-dbsecuritygroupingress--examples"></a>



### Enable ingress to a DB security group
<a name="aws-resource-rds-dbsecuritygroupingress--examples--Enable_ingress_to_a_DB_security_group"></a>

The following example creates a DB security group and allows ingress to it from a specified VPC security group.

#### JSON
<a name="aws-resource-rds-dbsecuritygroupingress--examples--Enable_ingress_to_a_DB_security_group--json"></a>

```
{
  "Resources": {
    "MyDBSecurityGroupIngress": {
      "Type": "AWS::RDS::DBSecurityGroupIngress",
      "Properties": {
        "DBSecurityGroupName": {
          "Ref": "MyDBSecurityGroup"
        },
        "EC2SecurityGroupId": {
          "Ref": "MyVPCSecurityGroup"
        }
      }
    },
    "MyDBSecurityGroup": {
      "Type": "AWS::RDS::DBSecurityGroup",
      "Properties": {
        "GroupDescription": "My database security group"
      }
    },
    "MyVPCSecurityGroup": {
      "Type": "AWS::EC2::SecurityGroup",
      "Properties": {
        "GroupDescription": "My VPC security group",
        "VpcId": "vpc-12345678"
      }
    }
  }
}
```

#### YAML
<a name="aws-resource-rds-dbsecuritygroupingress--examples--Enable_ingress_to_a_DB_security_group--yaml"></a>

```
Resources:
  MyDBSecurityGroupIngress:
    Type: AWS::RDS::DBSecurityGroupIngress
    Properties:
      DBSecurityGroupName: 
        Ref: MyDBSecurityGroup
      EC2SecurityGroupId: 
        Ref: MyVPCSecurityGroup

  MyDBSecurityGroup:
    Type: AWS::RDS::DBSecurityGroup
    Properties:
      GroupDescription: My database security group

  MyVPCSecurityGroup:
    Type: AWS::EC2::SecurityGroup
    Properties:
      GroupDescription: My VPC security group
      VpcId: vpc-12345678
```

# AWS::RDS::DBShardGroup
<a name="aws-resource-rds-dbshardgroup"></a>

Creates a new DB shard group for Aurora Limitless Database. You must enable Aurora Limitless Database to create a DB shard group.

Valid for: Aurora DB clusters only

## Syntax
<a name="aws-resource-rds-dbshardgroup-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-rds-dbshardgroup-syntax.json"></a>

```
{
  "Type" : "AWS::RDS::DBShardGroup",
  "Properties" : {
      "[ComputeRedundancy](#cfn-rds-dbshardgroup-computeredundancy)" : Integer,
      "[DBClusterIdentifier](#cfn-rds-dbshardgroup-dbclusteridentifier)" : String,
      "[DBShardGroupIdentifier](#cfn-rds-dbshardgroup-dbshardgroupidentifier)" : String,
      "[MaxACU](#cfn-rds-dbshardgroup-maxacu)" : Number,
      "[MinACU](#cfn-rds-dbshardgroup-minacu)" : Number,
      "[PubliclyAccessible](#cfn-rds-dbshardgroup-publiclyaccessible)" : Boolean,
      "[Tags](#cfn-rds-dbshardgroup-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-rds-dbshardgroup-syntax.yaml"></a>

```
Type: AWS::RDS::DBShardGroup
Properties:
  [ComputeRedundancy](#cfn-rds-dbshardgroup-computeredundancy): Integer
  [DBClusterIdentifier](#cfn-rds-dbshardgroup-dbclusteridentifier): String
  [DBShardGroupIdentifier](#cfn-rds-dbshardgroup-dbshardgroupidentifier): String
  [MaxACU](#cfn-rds-dbshardgroup-maxacu): Number
  [MinACU](#cfn-rds-dbshardgroup-minacu): Number
  [PubliclyAccessible](#cfn-rds-dbshardgroup-publiclyaccessible): Boolean
  [Tags](#cfn-rds-dbshardgroup-tags): 
    - Tag
```

## Properties
<a name="aws-resource-rds-dbshardgroup-properties"></a>

`ComputeRedundancy`  <a name="cfn-rds-dbshardgroup-computeredundancy"></a>
Specifies whether to create standby standby DB data access shard for the DB shard group. Valid values are the following:  
+ 0 - Creates a DB shard group without a standby DB data access shard. This is the default value.
+ 1 - Creates a DB shard group with a standby DB data access shard in a different Availability Zone (AZ).
+ 2 - Creates a DB shard group with two standby DB data access shard in two different AZs.
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DBClusterIdentifier`  <a name="cfn-rds-dbshardgroup-dbclusteridentifier"></a>
The name of the primary DB cluster for the DB shard group.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `63`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DBShardGroupIdentifier`  <a name="cfn-rds-dbshardgroup-dbshardgroupidentifier"></a>
The name of the DB shard group.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `63`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`MaxACU`  <a name="cfn-rds-dbshardgroup-maxacu"></a>
The maximum capacity of the DB shard group in Aurora capacity units (ACUs).  
*Required*: Yes  
*Type*: Number  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MinACU`  <a name="cfn-rds-dbshardgroup-minacu"></a>
The minimum capacity of the DB shard group in Aurora capacity units (ACUs).  
*Required*: No  
*Type*: Number  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PubliclyAccessible`  <a name="cfn-rds-dbshardgroup-publiclyaccessible"></a>
Specifies whether the DB shard group is publicly accessible.  
When the DB shard group is publicly accessible, its Domain Name System (DNS) endpoint resolves to the private IP address from within the DB shard group's virtual private cloud (VPC). It resolves to the public IP address from outside of the DB shard group's VPC. Access to the DB shard group is ultimately controlled by the security group it uses. That public access is not permitted if the security group assigned to the DB shard group doesn't permit it.  
When the DB shard group isn't publicly accessible, it is an internal DB shard group with a DNS name that resolves to a private IP address.  
Default: The default behavior varies depending on whether `DBSubnetGroupName` is specified.  
If `DBSubnetGroupName` isn't specified, and `PubliclyAccessible` isn't specified, the following applies:  
+ If the default VPC in the target Region doesn’t have an internet gateway attached to it, the DB shard group is private.
+ If the default VPC in the target Region has an internet gateway attached to it, the DB shard group is public.
If `DBSubnetGroupName` is specified, and `PubliclyAccessible` isn't specified, the following applies:  
+ If the subnets are part of a VPC that doesn’t have an internet gateway attached to it, the DB shard group is private.
+ If the subnets are part of a VPC that has an internet gateway attached to it, the DB shard group is public.
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-rds-dbshardgroup-tags"></a>
An optional set of key-value pairs to associate arbitrary data of your choosing with the DB shard group.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-rds-dbshardgroup-tag.md)  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-rds-dbshardgroup-return-values"></a>

### Ref
<a name="aws-resource-rds-dbshardgroup-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the name (`DBClusterIdentifier`) of the DB cluster.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-rds-dbshardgroup-return-values-fn--getatt"></a>

#### 
<a name="aws-resource-rds-dbshardgroup-return-values-fn--getatt-fn--getatt"></a>

`DBShardGroupResourceId`  <a name="DBShardGroupResourceId-fn::getatt"></a>
The AWS Region-unique, immutable identifier for the DB shard group.

`Endpoint`  <a name="Endpoint-fn::getatt"></a>
This data type represents the information you need to connect to an Amazon RDS DB instance. This data type is used as a response element in the following actions:  
+  `CreateDBInstance` 
+  `DescribeDBInstances` 
+  `DeleteDBInstance` 
For the data structure that represents Amazon Aurora DB cluster endpoints, see `DBClusterEndpoint`.

# AWS::RDS::DBShardGroup Tag
<a name="aws-properties-rds-dbshardgroup-tag"></a>

Metadata assigned to an Amazon RDS resource consisting of a key-value pair.

For more information, see [Tagging Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) in the *Amazon RDS User Guide* or [Tagging Amazon Aurora and Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html) in the *Amazon Aurora User Guide*. 

## Syntax
<a name="aws-properties-rds-dbshardgroup-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbshardgroup-tag-syntax.json"></a>

```
{
  "[Key](#cfn-rds-dbshardgroup-tag-key)" : String,
  "[Value](#cfn-rds-dbshardgroup-tag-value)" : String
}
```

### YAML
<a name="aws-properties-rds-dbshardgroup-tag-syntax.yaml"></a>

```
  [Key](#cfn-rds-dbshardgroup-tag-key): String
  [Value](#cfn-rds-dbshardgroup-tag-value): String
```

## Properties
<a name="aws-properties-rds-dbshardgroup-tag-properties"></a>

`Key`  <a name="cfn-rds-dbshardgroup-tag-key"></a>
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-rds-dbshardgroup-tag-value"></a>
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::RDS::DBSubnetGroup
<a name="aws-resource-rds-dbsubnetgroup"></a>

The `AWS::RDS::DBSubnetGroup` resource creates a database subnet group. Subnet groups must contain at least two subnets in two different Availability Zones in the same region. 

For more information, see [ Working with DB subnet groups](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html#USER_VPC.Subnets) in the *Amazon RDS User Guide*.

## Syntax
<a name="aws-resource-rds-dbsubnetgroup-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-rds-dbsubnetgroup-syntax.json"></a>

```
{
  "Type" : "AWS::RDS::DBSubnetGroup",
  "Properties" : {
      "[DBSubnetGroupDescription](#cfn-rds-dbsubnetgroup-dbsubnetgroupdescription)" : String,
      "[DBSubnetGroupName](#cfn-rds-dbsubnetgroup-dbsubnetgroupname)" : String,
      "[SubnetIds](#cfn-rds-dbsubnetgroup-subnetids)" : [ String, ... ],
      "[Tags](#cfn-rds-dbsubnetgroup-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-rds-dbsubnetgroup-syntax.yaml"></a>

```
Type: AWS::RDS::DBSubnetGroup
Properties:
  [DBSubnetGroupDescription](#cfn-rds-dbsubnetgroup-dbsubnetgroupdescription): String
  [DBSubnetGroupName](#cfn-rds-dbsubnetgroup-dbsubnetgroupname): String
  [SubnetIds](#cfn-rds-dbsubnetgroup-subnetids): 
    - String
  [Tags](#cfn-rds-dbsubnetgroup-tags): 
    - Tag
```

## Properties
<a name="aws-resource-rds-dbsubnetgroup-properties"></a>

`DBSubnetGroupDescription`  <a name="cfn-rds-dbsubnetgroup-dbsubnetgroupdescription"></a>
The description for the DB subnet group.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DBSubnetGroupName`  <a name="cfn-rds-dbsubnetgroup-dbsubnetgroupname"></a>
The name for the DB subnet group. This value is stored as a lowercase string.  
Constraints:  
+ Must contain no more than 255 letters, numbers, periods, underscores, spaces, or hyphens.
+ Must not be default.
+ First character must be a letter.
Example: `mydbsubnetgroup`  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SubnetIds`  <a name="cfn-rds-dbsubnetgroup-subnetids"></a>
The EC2 Subnet IDs for the DB subnet group.  
*Required*: Yes  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-rds-dbsubnetgroup-tags"></a>
Tags to assign to the DB subnet group.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-rds-dbsubnetgroup-tag.md)  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-rds-dbsubnetgroup-return-values"></a>

### Ref
<a name="aws-resource-rds-dbsubnetgroup-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the name of the DB subnet group.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

## Examples
<a name="aws-resource-rds-dbsubnetgroup--examples"></a>



### Create a DB subnet group
<a name="aws-resource-rds-dbsubnetgroup--examples--Create_a_DB_subnet_group"></a>

The following example creates a DB subnet group with two subnet IDs and a set of tags.

#### JSON
<a name="aws-resource-rds-dbsubnetgroup--examples--Create_a_DB_subnet_group--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Resources": {
        "myDBSubnetGroup": {
            "Type": "AWS::RDS::DBSubnetGroup",
            "Properties": {
                "DBSubnetGroupDescription": "Description of subnet group",
                "SubnetIds": [
                    "subnet-7b5b4112",
                    "subnet-7b5b4115"
                ],
                "Tags": [
                    {
                        "Key": "mykey",
                        "Value": "myvalue"
                    }
                ]
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-dbsubnetgroup--examples--Create_a_DB_subnet_group--yaml"></a>

```
--- 
AWSTemplateFormatVersion: "2010-09-09"
Resources: 
  myDBSubnetGroup: 
    Type: AWS::RDS::DBSubnetGroup
    Properties: 
      DBSubnetGroupDescription: Description of subnet group
      SubnetIds: 
        - subnet-7b5b4112
        - subnet-7b5b4115
      Tags: 
        - Key: mykey
          Value: myvalue
```

# AWS::RDS::DBSubnetGroup Tag
<a name="aws-properties-rds-dbsubnetgroup-tag"></a>

Metadata assigned to an Amazon RDS resource consisting of a key-value pair.

For more information, see [Tagging Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) in the *Amazon RDS User Guide* or [Tagging Amazon Aurora and Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html) in the *Amazon Aurora User Guide*. 

## Syntax
<a name="aws-properties-rds-dbsubnetgroup-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-dbsubnetgroup-tag-syntax.json"></a>

```
{
  "[Key](#cfn-rds-dbsubnetgroup-tag-key)" : String,
  "[Value](#cfn-rds-dbsubnetgroup-tag-value)" : String
}
```

### YAML
<a name="aws-properties-rds-dbsubnetgroup-tag-syntax.yaml"></a>

```
  [Key](#cfn-rds-dbsubnetgroup-tag-key): String
  [Value](#cfn-rds-dbsubnetgroup-tag-value): String
```

## Properties
<a name="aws-properties-rds-dbsubnetgroup-tag-properties"></a>

`Key`  <a name="cfn-rds-dbsubnetgroup-tag-key"></a>
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-rds-dbsubnetgroup-tag-value"></a>
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-rds-dbsubnetgroup-tag--examples"></a>

The following example specifies a tag for a DB subnet group.

### 
<a name="aws-properties-rds-dbsubnetgroup-tag--examples--"></a>

#### JSON
<a name="aws-properties-rds-dbsubnetgroup-tag--examples----json"></a>

```
"Tags" : [
   {
      "Key" : "keyname1",
      "Value" : "value1"
   },
   {
      "Key" : "keyname2",
      "Value" : "value2"
   }
]
```

#### YAML
<a name="aws-properties-rds-dbsubnetgroup-tag--examples----yaml"></a>

```
Tags:
  - Key: keyname1
    Value: value1
  - Key: keyname2
    Value: value2
```

# AWS::RDS::EventSubscription
<a name="aws-resource-rds-eventsubscription"></a>

The `AWS::RDS::EventSubscription` resource allows you to receive notifications for Amazon Relational Database Service events through the Amazon Simple Notification Service (Amazon SNS). For more information, see [Using Amazon RDS Event Notification](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html) in the *Amazon RDS User Guide*. 

## Syntax
<a name="aws-resource-rds-eventsubscription-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-rds-eventsubscription-syntax.json"></a>

```
{
  "Type" : "AWS::RDS::EventSubscription",
  "Properties" : {
      "[Enabled](#cfn-rds-eventsubscription-enabled)" : Boolean,
      "[EventCategories](#cfn-rds-eventsubscription-eventcategories)" : [ String, ... ],
      "[SnsTopicArn](#cfn-rds-eventsubscription-snstopicarn)" : String,
      "[SourceIds](#cfn-rds-eventsubscription-sourceids)" : [ String, ... ],
      "[SourceType](#cfn-rds-eventsubscription-sourcetype)" : String,
      "[SubscriptionName](#cfn-rds-eventsubscription-subscriptionname)" : String,
      "[Tags](#cfn-rds-eventsubscription-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-rds-eventsubscription-syntax.yaml"></a>

```
Type: AWS::RDS::EventSubscription
Properties:
  [Enabled](#cfn-rds-eventsubscription-enabled): Boolean
  [EventCategories](#cfn-rds-eventsubscription-eventcategories): 
    - String
  [SnsTopicArn](#cfn-rds-eventsubscription-snstopicarn): String
  [SourceIds](#cfn-rds-eventsubscription-sourceids): 
    - String
  [SourceType](#cfn-rds-eventsubscription-sourcetype): String
  [SubscriptionName](#cfn-rds-eventsubscription-subscriptionname): String
  [Tags](#cfn-rds-eventsubscription-tags): 
    - Tag
```

## Properties
<a name="aws-resource-rds-eventsubscription-properties"></a>

`Enabled`  <a name="cfn-rds-eventsubscription-enabled"></a>
Specifies whether to activate the subscription. If the event notification subscription isn't activated, the subscription is created but not active.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EventCategories`  <a name="cfn-rds-eventsubscription-eventcategories"></a>
A list of event categories for a particular source type (`SourceType`) that you want to subscribe to. You can see a list of the categories for a given source type in the "Amazon RDS event categories and event messages" section of the [https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.Messages.html](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.Messages.html) or the [https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Events.Messages.html](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Events.Messages.html). You can also see this list by using the `DescribeEventCategories` operation.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SnsTopicArn`  <a name="cfn-rds-eventsubscription-snstopicarn"></a>
The Amazon Resource Name (ARN) of the SNS topic created for event notification. SNS automatically creates the ARN when you create a topic and subscribe to it.  
RDS doesn't support FIFO (first in, first out) topics. For more information, see [Message ordering and deduplication (FIFO topics)](https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html) in the *Amazon Simple Notification Service Developer Guide*.
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SourceIds`  <a name="cfn-rds-eventsubscription-sourceids"></a>
The list of identifiers of the event sources for which events are returned. If not specified, then all sources are included in the response. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens. It can't end with a hyphen or contain two consecutive hyphens.  
Constraints:  
+ If `SourceIds` are supplied, `SourceType` must also be provided.
+ If the source type is a DB instance, a `DBInstanceIdentifier` value must be supplied.
+ If the source type is a DB cluster, a `DBClusterIdentifier` value must be supplied.
+ If the source type is a DB parameter group, a `DBParameterGroupName` value must be supplied.
+ If the source type is a DB security group, a `DBSecurityGroupName` value must be supplied.
+ If the source type is a DB snapshot, a `DBSnapshotIdentifier` value must be supplied.
+ If the source type is a DB cluster snapshot, a `DBClusterSnapshotIdentifier` value must be supplied.
+ If the source type is an RDS Proxy, a `DBProxyName` value must be supplied.
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SourceType`  <a name="cfn-rds-eventsubscription-sourcetype"></a>
The type of source that is generating the events. For example, if you want to be notified of events generated by a DB instance, you set this parameter to `db-instance`. For RDS Proxy events, specify `db-proxy`. If this value isn't specified, all events are returned.  
Valid Values:` db-instance | db-cluster | db-parameter-group | db-security-group | db-snapshot | db-cluster-snapshot | db-proxy | zero-etl | custom-engine-version | blue-green-deployment `  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SubscriptionName`  <a name="cfn-rds-eventsubscription-subscriptionname"></a>
The name of the subscription.  
Constraints: The name must be less than 255 characters.  
*Required*: No  
*Type*: String  
*Maximum*: `255`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-rds-eventsubscription-tags"></a>
An optional array of key-value pairs to apply to this subscription.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-rds-eventsubscription-tag.md)  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-rds-eventsubscription-return-values"></a>

### Ref
<a name="aws-resource-rds-eventsubscription-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the name of the RDS event subscription.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

## Examples
<a name="aws-resource-rds-eventsubscription--examples"></a>



### Create an event subscription
<a name="aws-resource-rds-eventsubscription--examples--Create_an_event_subscription"></a>

The following example creates an event subscription for an existing database instance `db-instance-1` and a database with the logical ID `myDBInstance`, which is declared elsewhere in the same template. 

#### JSON
<a name="aws-resource-rds-eventsubscription--examples--Create_an_event_subscription--json"></a>

```
{
    "myEventSubscription": {
        "Type": "AWS::RDS::EventSubscription",
        "Properties": {
            "EventCategories": [
                "configuration change",
                "failure",
                "deletion"
            ],
            "SnsTopicArn": "arn:aws:sns:us-west-2:123456789012:example-topic",
            "SourceIds": [
                "db-instance-1",
                {
                    "Ref": "myDBInstance"
                }
            ],
            "SourceType": "db-instance",
            "Enabled": false
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-eventsubscription--examples--Create_an_event_subscription--yaml"></a>

```
--- 
myEventSubscription:
  Type: 'AWS::RDS::EventSubscription'
  Properties:
    EventCategories:
      - configuration change
      - failure
      - deletion
    SnsTopicArn: 'arn:aws:sns:us-west-2:123456789012:example-topic'
    SourceIds:
      - db-instance-1
      - !Ref myDBInstance
    SourceType: db-instance
    Enabled: false
```

# AWS::RDS::EventSubscription Tag
<a name="aws-properties-rds-eventsubscription-tag"></a>

Metadata assigned to an Amazon RDS resource consisting of a key-value pair.

For more information, see [Tagging Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) in the *Amazon RDS User Guide* or [Tagging Amazon Aurora and Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html) in the *Amazon Aurora User Guide*. 

## Syntax
<a name="aws-properties-rds-eventsubscription-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-eventsubscription-tag-syntax.json"></a>

```
{
  "[Key](#cfn-rds-eventsubscription-tag-key)" : String,
  "[Value](#cfn-rds-eventsubscription-tag-value)" : String
}
```

### YAML
<a name="aws-properties-rds-eventsubscription-tag-syntax.yaml"></a>

```
  [Key](#cfn-rds-eventsubscription-tag-key): String
  [Value](#cfn-rds-eventsubscription-tag-value): String
```

## Properties
<a name="aws-properties-rds-eventsubscription-tag-properties"></a>

`Key`  <a name="cfn-rds-eventsubscription-tag-key"></a>
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-rds-eventsubscription-tag-value"></a>
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-rds-eventsubscription-tag--examples"></a>

The following example specifies a tag for an event subscription.

### 
<a name="aws-properties-rds-eventsubscription-tag--examples--"></a>

#### JSON
<a name="aws-properties-rds-eventsubscription-tag--examples----json"></a>

```
"Tags" : [
   {
      "Key" : "keyname1",
      "Value" : "value1"
   },
   {
      "Key" : "keyname2",
      "Value" : "value2"
   }
]
```

#### YAML
<a name="aws-properties-rds-eventsubscription-tag--examples----yaml"></a>

```
Tags:
  - Key: keyname1
    Value: value1
  - Key: keyname2
    Value: value2
```

# AWS::RDS::GlobalCluster
<a name="aws-resource-rds-globalcluster"></a>

The `AWS::RDS::GlobalCluster` resource creates or updates an Amazon Aurora global database spread across multiple AWS Regions.

The global database contains a single primary cluster with read-write capability, and a read-only secondary cluster that receives data from the primary cluster through high-speed replication performed by the Aurora storage subsystem.

You can create a global database that is initially empty, and then add a primary cluster and a secondary cluster to it.

For information about Aurora global databases, see [ Working with Amazon Aurora Global Databases](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database.html) in the *Amazon Aurora User Guide*.

## Syntax
<a name="aws-resource-rds-globalcluster-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-rds-globalcluster-syntax.json"></a>

```
{
  "Type" : "AWS::RDS::GlobalCluster",
  "Properties" : {
      "[DeletionProtection](#cfn-rds-globalcluster-deletionprotection)" : Boolean,
      "[Engine](#cfn-rds-globalcluster-engine)" : String,
      "[EngineLifecycleSupport](#cfn-rds-globalcluster-enginelifecyclesupport)" : String,
      "[EngineVersion](#cfn-rds-globalcluster-engineversion)" : String,
      "[GlobalClusterIdentifier](#cfn-rds-globalcluster-globalclusteridentifier)" : String,
      "[SourceDBClusterIdentifier](#cfn-rds-globalcluster-sourcedbclusteridentifier)" : String,
      "[StorageEncrypted](#cfn-rds-globalcluster-storageencrypted)" : Boolean,
      "[Tags](#cfn-rds-globalcluster-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-rds-globalcluster-syntax.yaml"></a>

```
Type: AWS::RDS::GlobalCluster
Properties:
  [DeletionProtection](#cfn-rds-globalcluster-deletionprotection): Boolean
  [Engine](#cfn-rds-globalcluster-engine): String
  [EngineLifecycleSupport](#cfn-rds-globalcluster-enginelifecyclesupport): String
  [EngineVersion](#cfn-rds-globalcluster-engineversion): String
  [GlobalClusterIdentifier](#cfn-rds-globalcluster-globalclusteridentifier): String
  [SourceDBClusterIdentifier](#cfn-rds-globalcluster-sourcedbclusteridentifier): String
  [StorageEncrypted](#cfn-rds-globalcluster-storageencrypted): Boolean
  [Tags](#cfn-rds-globalcluster-tags): 
    - Tag
```

## Properties
<a name="aws-resource-rds-globalcluster-properties"></a>

`DeletionProtection`  <a name="cfn-rds-globalcluster-deletionprotection"></a>
Specifies whether to enable deletion protection for the new global database cluster. The global database can't be deleted when deletion protection is enabled.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Engine`  <a name="cfn-rds-globalcluster-engine"></a>
The database engine to use for this global database cluster.  
Valid Values: `aurora-mysql | aurora-postgresql`  
Constraints:  
+ Can't be specified if `SourceDBClusterIdentifier` is specified. In this case, Amazon Aurora uses the engine of the source DB cluster.
*Required*: Conditional  
*Type*: String  
*Allowed values*: `aurora | aurora-mysql | aurora-postgresql`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`EngineLifecycleSupport`  <a name="cfn-rds-globalcluster-enginelifecyclesupport"></a>
The life cycle type for this global database cluster.  
By default, this value is set to `open-source-rds-extended-support`, which enrolls your global cluster into Amazon RDS Extended Support. At the end of standard support, you can avoid charges for Extended Support by setting the value to `open-source-rds-extended-support-disabled`. In this case, creating the global cluster will fail if the DB major version is past its end of standard support date.
This setting only applies to Aurora PostgreSQL-based global databases.  
You can use this setting to enroll your global cluster into Amazon RDS Extended Support. With RDS Extended Support, you can run the selected major engine version on your global cluster past the end of standard support for that engine version. For more information, see [Amazon RDS Extended Support with Amazon Aurora](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/extended-support.html) in the *Amazon Aurora User Guide*.  
Valid Values: `open-source-rds-extended-support | open-source-rds-extended-support-disabled`  
Default: `open-source-rds-extended-support`  
*Required*: No  
*Type*: String  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`EngineVersion`  <a name="cfn-rds-globalcluster-engineversion"></a>
The engine version to use for this global database cluster.  
Constraints:  
+ Can't be specified if `SourceDBClusterIdentifier` is specified. In this case, Amazon Aurora uses the engine version of the source DB cluster.
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`GlobalClusterIdentifier`  <a name="cfn-rds-globalcluster-globalclusteridentifier"></a>
The cluster identifier for this global database cluster. This parameter is stored as a lowercase string.  
*Required*: Conditional  
*Type*: String  
*Pattern*: `^[a-zA-Z]{1}(?:-?[a-zA-Z0-9]){0,62}$`  
*Minimum*: `1`  
*Maximum*: `63`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SourceDBClusterIdentifier`  <a name="cfn-rds-globalcluster-sourcedbclusteridentifier"></a>
The Amazon Resource Name (ARN) to use as the primary cluster of the global database.  
If you provide a value for this parameter, don't specify values for the following settings because Amazon Aurora uses the values from the specified source DB cluster:  
+  `DatabaseName` 
+  `Engine` 
+  `EngineVersion` 
+  `StorageEncrypted` 
*Required*: Conditional  
*Type*: String  
*Pattern*: `^[a-zA-Z]{1}(?:-?[a-zA-Z0-9]){0,62}$`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`StorageEncrypted`  <a name="cfn-rds-globalcluster-storageencrypted"></a>
Specifies whether to enable storage encryption for the new global database cluster.  
Constraints:  
+ Can't be specified if `SourceDBClusterIdentifier` is specified. In this case, Amazon Aurora uses the setting from the source DB cluster.
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-rds-globalcluster-tags"></a>
Metadata assigned to an Amazon RDS resource consisting of a key-value pair.  
For more information, see [Tagging Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) in the *Amazon RDS User Guide* or [Tagging Amazon Aurora and Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html) in the *Amazon Aurora User Guide*.   
*Required*: No  
*Type*: Array of [Tag](aws-properties-rds-globalcluster-tag.md)  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-rds-globalcluster-return-values"></a>

### Ref
<a name="aws-resource-rds-globalcluster-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the name of the global database cluster.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-rds-globalcluster-return-values-fn--getatt"></a>

## Examples
<a name="aws-resource-rds-globalcluster--examples"></a>

**Topics**
+ [Creating a Global Database cluster for Aurora MySQL](#aws-resource-rds-globalcluster--examples--Creating_a_Global_Database_cluster_for_Aurora_MySQL)
+ [Creating a Global Database cluster for Aurora PostgreSQL](#aws-resource-rds-globalcluster--examples--Creating_a_Global_Database_cluster_for_Aurora_PostgreSQL)
+ [Adding a Region to an Aurora database cluster](#aws-resource-rds-globalcluster--examples--Adding_a_Region_to_an_Aurora_database_cluster)
+ [Adding a DB cluster to a Global Database cluster](#aws-resource-rds-globalcluster--examples--Adding_a_DB_cluster_to_a_Global_Database_cluster)

### Creating a Global Database cluster for Aurora MySQL
<a name="aws-resource-rds-globalcluster--examples--Creating_a_Global_Database_cluster_for_Aurora_MySQL"></a>

The following example creates a global database cluster with an Aurora MySQL DB cluster and DB instance.

#### JSON
<a name="aws-resource-rds-globalcluster--examples--Creating_a_Global_Database_cluster_for_Aurora_MySQL--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Parameters": {
        "GlobalClusterIdentifier": {
          "Type": "String",
          "Description": "Identifier used for global database cluster",
          "AllowedPattern": "^[a-zA-Z]{1}(?:-?[a-zA-Z0-9]){0,62}$"
        },
        "username": {
            "NoEcho": "true",
            "Description": "Username for MySQL database access",
            "Type": "String",
            "MinLength": "1",
            "MaxLength": "16",
            "AllowedPattern": "[a-zA-Z][a-zA-Z0-9]*",
            "ConstraintDescription": "must begin with a letter and contain only alphanumeric characters."
        },
        "password": {
            "NoEcho": "true",
            "Description": "Password for MySQL database access",
            "Type": "String",
            "MinLength": "8",
            "MaxLength": "41",
            "AllowedPattern": "[a-zA-Z0-9]*",
            "ConstraintDescription": "must contain only alphanumeric characters."
        }
    },
    "Resources": {
        "GlobalCluster": {
            "Type": "AWS::RDS::GlobalCluster",
            "Properties": {
                "GlobalClusterIdentifier": {
                    "Ref": "GlobalClusterIdentifier"
                },
                "SourceDBClusterIdentifier": {
                    "Ref": "RDSCluster"
                }
            }
        },
        "RDSCluster": {
            "Type": "AWS::RDS::DBCluster",
            "Properties": {
                "MasterUsername": {
                    "Ref": "username"
                },
                "MasterUserPassword": {
                    "Ref": "password"
                },
                "DBClusterParameterGroupName": "default.aurora-mysql5.7",
                "Engine": "aurora-mysql"
            }
        },
        "RDSDBInstance": {
            "Type": "AWS::RDS::DBInstance",
            "Properties": {
                "Engine": "aurora-mysql",
                "DBClusterIdentifier": {
                    "Ref": "RDSCluster"
                },
                "DBParameterGroupName": "default.aurora-mysql5.7",
                "PubliclyAccessible": "true",
                "DBInstanceClass": "db.r5.xlarge"
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-globalcluster--examples--Creating_a_Global_Database_cluster_for_Aurora_MySQL--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Parameters:
  GlobalClusterIdentifier:
    Type: String
    Description: Identifier used for global database cluster
    AllowedPattern: '^[a-zA-Z]{1}(?:-?[a-zA-Z0-9]){0,62}$'
  username:
    NoEcho: 'true'
    Description: Username for MySQL database access
    Type: String
    MinLength: '1'
    MaxLength: '16'
    AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
    ConstraintDescription: must begin with a letter and contain only alphanumeric characters.
  password:
    NoEcho: 'true'
    Description: Password for MySQL database access
    Type: String
    MinLength: '8'
    MaxLength: '41'
    AllowedPattern: '[a-zA-Z0-9]*'
    ConstraintDescription: must contain only alphanumeric characters.
Resources:
  GlobalCluster:
    Type: 'AWS::RDS::GlobalCluster'
    Properties:
      GlobalClusterIdentifier: !Ref GlobalClusterIdentifier
      SourceDBClusterIdentifier: !Ref RDSCluster
  RDSCluster:
    Type: 'AWS::RDS::DBCluster'
    Properties:
      MasterUsername: !Ref username
      MasterUserPassword: !Ref password
      DBClusterParameterGroupName: default.aurora-mysql5.7
      Engine: aurora-mysql
  RDSDBInstance:
    Type: 'AWS::RDS::DBInstance'
    Properties:
      Engine: aurora-mysql
      DBClusterIdentifier: !Ref RDSCluster
      DBParameterGroupName: default.aurora-mysql5.7
      PubliclyAccessible: 'true'
      DBInstanceClass: db.r5.xlarge
```

### Creating a Global Database cluster for Aurora PostgreSQL
<a name="aws-resource-rds-globalcluster--examples--Creating_a_Global_Database_cluster_for_Aurora_PostgreSQL"></a>

The following example creates a global database cluster with an Aurora PostgreSQL DB cluster and DB instance.

#### JSON
<a name="aws-resource-rds-globalcluster--examples--Creating_a_Global_Database_cluster_for_Aurora_PostgreSQL--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Parameters": {
        "GlobalClusterIdentifier": {
          "Type": "String",
          "Description": "Identifier used for global database cluster",
          "AllowedPattern": "^[a-zA-Z]{1}(?:-?[a-zA-Z0-9]){0,62}$"
        },
        "username": {
            "NoEcho": "true",
            "Description": "Username for PostgreSQL database access",
            "Type": "String",
            "MinLength": "1",
            "MaxLength": "16",
            "AllowedPattern": "[a-zA-Z][a-zA-Z0-9]*",
            "ConstraintDescription": "must begin with a letter and contain only alphanumeric characters."
        },
        "password": {
            "NoEcho": "true",
            "Description": "Password for PostgreSQL database access",
            "Type": "String",
            "MinLength": "8",
            "MaxLength": "41",
            "AllowedPattern": "[a-zA-Z0-9]*",
            "ConstraintDescription": "must contain only alphanumeric characters."
        }
    },
    "Resources": {
        "GlobalCluster": {
            "Type": "AWS::RDS::GlobalCluster",
            "Properties": {
                "GlobalClusterIdentifier": {
                    "Ref": "GlobalClusterIdentifier"
                },
                "SourceDBClusterIdentifier": {
                    "Ref": "RDSCluster"
                }
            }
        },
        "RDSCluster": {
            "Type": "AWS::RDS::DBCluster",
            "Properties": {
                "MasterUsername": {
                    "Ref": "username"
                },
                "MasterUserPassword": {
                    "Ref": "password"
                },
                "DBClusterParameterGroupName": "default.aurora-postgresql11",
                "Engine": "aurora-postgresql"
            }
        },
        "RDSDBInstance": {
            "Type": "AWS::RDS::DBInstance",
            "Properties": {
                "Engine": "aurora-postgresql",
                "DBClusterIdentifier": {
                    "Ref": "RDSCluster"
                },
                "DBParameterGroupName": "default.aurora-postgresql11",
                "PubliclyAccessible": "true",
                "DBInstanceClass": "db.r5.xlarge"
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-globalcluster--examples--Creating_a_Global_Database_cluster_for_Aurora_PostgreSQL--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Parameters:
  GlobalClusterIdentifier:
    Type: String
    Description: Identifier used for global database cluster
    AllowedPattern: '^[a-zA-Z]{1}(?:-?[a-zA-Z0-9]){0,62}$'
  username:
    NoEcho: 'true'
    Description: Username for PostgreSQL database access
    Type: String
    MinLength: '1'
    MaxLength: '16'
    AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
    ConstraintDescription: must begin with a letter and contain only alphanumeric characters.
  password:
    NoEcho: 'true'
    Description: Password for PostgreSQL database access
    Type: String
    MinLength: '8'
    MaxLength: '41'
    AllowedPattern: '[a-zA-Z0-9]*'
    ConstraintDescription: must contain only alphanumeric characters.
Resources:
  GlobalCluster:
    Type: 'AWS::RDS::GlobalCluster'
    Properties:
      GlobalClusterIdentifier: !Ref GlobalClusterIdentifier
      SourceDBClusterIdentifier: !Ref RDSCluster
  RDSCluster:
    Type: 'AWS::RDS::DBCluster'
    Properties:
      MasterUsername: !Ref username
      MasterUserPassword: !Ref password
      DBClusterParameterGroupName: default.aurora-postgresql11
      Engine: aurora-postgresql
  RDSDBInstance:
    Type: 'AWS::RDS::DBInstance'
    Properties:
      Engine: aurora-postgresql
      DBClusterIdentifier: !Ref RDSCluster
      DBParameterGroupName: default.aurora-postgresql11
      PubliclyAccessible: 'true'
      DBInstanceClass: db.r5.xlarge
```

### Adding a Region to an Aurora database cluster
<a name="aws-resource-rds-globalcluster--examples--Adding_a_Region_to_an_Aurora_database_cluster"></a>

The following example creates a new Aurora DB cluster, attaches it to a global database cluster as a read-only secondary cluster, and then adds a DB instance to the new DB cluster.

Specify the `GlobalClusterIdentifier` of a global database cluster with the primary DB cluster in a separate AWS Region.

#### JSON
<a name="aws-resource-rds-globalcluster--examples--Adding_a_Region_to_an_Aurora_database_cluster--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Parameters": {
        "GlobalClusterIdentifier": {
          "Type": "String",
          "Description": "Identifier used for global database cluster",
          "AllowedPattern": "^[a-zA-Z]{1}(?:-?[a-zA-Z0-9]){0,62}$"
        }
    },
    "Resources": {
        "RDSCluster": {
            "Type": "AWS::RDS::DBCluster",
            "Properties": {
                "GlobalClusterIdentifier": {
                    "Ref": "GlobalClusterIdentifier"
                },
                "DBClusterParameterGroupName": "default.aurora-mysql5.7",
                "Engine": "aurora-mysql"
            }
        },
        "RDSDBInstance": {
            "Type": "AWS::RDS::DBInstance",
            "Properties": {
                "Engine": "aurora-mysql",
                "DBClusterIdentifier": {
                    "Ref": "RDSCluster"
                },
                "DBParameterGroupName": "default.aurora-mysql5.7",
                "PubliclyAccessible": "true",
                "DBInstanceClass": "db.r5.xlarge"
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-globalcluster--examples--Adding_a_Region_to_an_Aurora_database_cluster--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Parameters:
  GlobalClusterIdentifier:
    Type: String
    Description: Identifier used for global database cluster
    AllowedPattern: '^[a-zA-Z]{1}(?:-?[a-zA-Z0-9]){0,62}$'
Resources:
  RDSCluster:
    Type: 'AWS::RDS::DBCluster'
    Properties:
      GlobalClusterIdentifier: !Ref GlobalClusterIdentifier
      DBClusterParameterGroupName: default.aurora-mysql5.7
      Engine: aurora-mysql
  RDSDBInstance:
    Type: 'AWS::RDS::DBInstance'
    Properties:
      Engine: aurora-mysql
      DBClusterIdentifier: !Ref RDSCluster
      DBParameterGroupName: default.aurora-mysql5.7
      PubliclyAccessible: 'true'
      DBInstanceClass: db.r5.xlarge
```

### Adding a DB cluster to a Global Database cluster
<a name="aws-resource-rds-globalcluster--examples--Adding_a_DB_cluster_to_a_Global_Database_cluster"></a>

The following example adds a DB cluster to a global database cluster.

The example includes the template that was used to create the DB cluster. After the DB cluster created by the first template exists, the second template in the example adds the DB cluster to a global database cluster.

#### JSON
<a name="aws-resource-rds-globalcluster--examples--Adding_a_DB_cluster_to_a_Global_Database_cluster--json"></a>

```
The following template was used to create DB cluster that you want to add to the global database cluster.
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Parameters": {
        "username": {
            "NoEcho": "true",
            "Description": "Username for MySQL database access",
            "Type": "String",
            "MinLength": "1",
            "MaxLength": "16",
            "AllowedPattern": "[a-zA-Z][a-zA-Z0-9]*",
            "ConstraintDescription": "must begin with a letter and contain only alphanumeric characters."
         },
         "password": {
             "NoEcho": "true",
             "Description": "Password MySQL database access",
             "Type": "String",
             "MinLength": "8",
             "MaxLength": "41",
             "AllowedPattern": "[a-zA-Z0-9]*",
             "ConstraintDescription": "must contain only alphanumeric characters."
         }
    },
    "Resources": {
        "RDSCluster": {
            "Type": "AWS::RDS::DBCluster",
            "Properties": {
                "MasterUsername": {
                    "Ref": "username"
                },
                "MasterUserPassword": {
                    "Ref": "password"
                },
                "DBClusterParameterGroupName": "default.aurora-mysql8.0",
                "Engine": "aurora-mysql",
                "EngineVersion": "8.0.mysql_aurora.8.0.30"
            }
        },
        "RDSDBInstance": {
            "Type": "AWS::RDS::DBInstance",
                "Properties": {
                    "Engine": "aurora-mysql",
                    "DBClusterIdentifier": {
                        "Ref": "RDSCluster"
                },
                "DBParameterGroupName": "default.aurora-mysql8.0",
                "PubliclyAccessible": "true",
                "DBInstanceClass": "db.r5.xlarge"
            }
        }
    }
}
                
The following template adds the DB cluster created by the previous template to a global database cluster.
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Parameters": {
        "GlobalClusterIdentifier": {
            "Description": "Global cluster identifier",
            "Type": "String"
        },
        "username": {
            "NoEcho": "true",
            "Description": "Username for MySQL database access",
            "Type": "String",
            "MinLength": "1",
            "MaxLength": "16",
            "AllowedPattern": "[a-zA-Z][a-zA-Z0-9]*",
            "ConstraintDescription": "must begin with a letter and contain only alphanumeric characters."
        },
        "password": {
            "NoEcho": "true",
            "Description": "Password MySQL database access",
            "Type": "String",
            "MinLength": "8",
            "MaxLength": "41",
            "AllowedPattern": "[a-zA-Z0-9]*",
            "ConstraintDescription": "must contain only alphanumeric characters."
        }
    },
    "Resources": {
        "GlobalCluster": {
            "Type": "AWS::RDS::GlobalCluster",
            "Properties": {
                "GlobalClusterIdentifier": {
                    "Ref": "GlobalClusterIdentifier"
                },
                "SourceDBClusterIdentifier": {
                    "Ref": "RDSCluster"
                }
            }
        },
        "RDSCluster": {
            "Type": "AWS::RDS::DBCluster",
            "Properties": {
                "MasterUsername": {
                    "Ref": "username"
                },
                "MasterUserPassword": {
                    "Ref": "password"
                },
                "DBClusterParameterGroupName": "default.aurora-mysql8.0",
                "Engine": "aurora-mysql",
                "EngineVersion": "8.0.mysql_aurora.8.0.30"
            }
        },
        "RDSDBInstance": {
            "Type": "AWS::RDS::DBInstance",
            "Properties": {
                "Engine": "aurora-mysql",
                "DBClusterIdentifier": {
                    "Ref": "RDSCluster"
                },
                "DBParameterGroupName": "default.aurora-mysql8.0",
                "PubliclyAccessible": "true",
                "DBInstanceClass": "db.r5.xlarge"
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-globalcluster--examples--Adding_a_DB_cluster_to_a_Global_Database_cluster--yaml"></a>

```
The following template created the DB cluster that you want to add to the global database cluster.
AWSTemplateFormatVersion: 2010-09-09
Parameters:
  username:
    NoEcho: 'true'
    Description: Username for MySQL database access
    Type: String
    MinLength: '1'
    MaxLength: '16'
    AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
    ConstraintDescription: must begin with a letter and contain only alphanumeric characters.
  password:
    NoEcho: 'true'
    Description: Password MySQL database access
    Type: String
    MinLength: '8'
    MaxLength: '41'
    AllowedPattern: '[a-zA-Z0-9]*'
    ConstraintDescription: must contain only alphanumeric characters.
Resources:
  RDSCluster:
    Type: 'AWS::RDS::DBCluster'
    Properties:
      MasterUsername: !Ref username
      MasterUserPassword: !Ref password
      DBClusterParameterGroupName: default.aurora-mysql8.0
      Engine: aurora-mysql
      EngineVersion: 8.0.mysql_aurora.8.0.30
  RDSDBInstance:
    Type: 'AWS::RDS::DBInstance'
    Properties:
      Engine: aurora-mysql
      DBClusterIdentifier: !Ref RDSCluster
      DBParameterGroupName: default.aurora-mysql8.0
      PubliclyAccessible: 'true'
      DBInstanceClass: db.r5.xlarge
                
The following template adds the DB cluster created by the previous template to a global database cluster.
AWSTemplateFormatVersion: 2010-09-09
Parameters:
  GlobalClusterIdentifier:
    Description: Global cluster identifier
    Type: String
  username:
    NoEcho: 'true'
    Description: Username for MySQL database access
    Type: String
    MinLength: '1'
    MaxLength: '16'
    AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
    ConstraintDescription: must begin with a letter and contain only alphanumeric characters.
  password:
    NoEcho: 'true'
    Description: Password MySQL database access
    Type: String
    MinLength: '8'
    MaxLength: '41'
    AllowedPattern: '[a-zA-Z0-9]*'
    ConstraintDescription: must contain only alphanumeric characters.
Resources:
  GlobalCluster:
    Type: 'AWS::RDS::GlobalCluster'
    Properties:
      GlobalClusterIdentifier: !Ref GlobalClusterIdentifier
      SourceDBClusterIdentifier: !Ref RDSCluster
  RDSCluster:
    Type: 'AWS::RDS::DBCluster'
    Properties:
      MasterUsername: !Ref username
      MasterUserPassword: !Ref password
      DBClusterParameterGroupName: default.aurora-mysql8.0
      Engine: aurora-mysql
      EngineVersion: 8.0.mysql_aurora.8.0.30
  RDSDBInstance:
    Type: 'AWS::RDS::DBInstance'
    Properties:
      Engine: aurora-mysql
      DBClusterIdentifier: !Ref RDSCluster
      DBParameterGroupName: default.aurora-mysql8.0
      PubliclyAccessible: 'true'
      DBInstanceClass: db.r5.xlarge
```

# AWS::RDS::GlobalCluster GlobalEndpoint
<a name="aws-properties-rds-globalcluster-globalendpoint"></a>

 The writer endpoint for the new global database cluster. This endpoint always points to the writer DB instance in the current primary cluster. 

## Syntax
<a name="aws-properties-rds-globalcluster-globalendpoint-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-globalcluster-globalendpoint-syntax.json"></a>

```
{
  "[Address](#cfn-rds-globalcluster-globalendpoint-address)" : String
}
```

### YAML
<a name="aws-properties-rds-globalcluster-globalendpoint-syntax.yaml"></a>

```
  [Address](#cfn-rds-globalcluster-globalendpoint-address): String
```

## Properties
<a name="aws-properties-rds-globalcluster-globalendpoint-properties"></a>

`Address`  <a name="cfn-rds-globalcluster-globalendpoint-address"></a>
 The writer endpoint for the new global database cluster. This endpoint always points to the writer DB instance in the current primary cluster.   
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::RDS::GlobalCluster Tag
<a name="aws-properties-rds-globalcluster-tag"></a>

Metadata assigned to an Amazon RDS resource consisting of a key-value pair.

For more information, see [Tagging Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) in the *Amazon RDS User Guide* or [Tagging Amazon Aurora and Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html) in the *Amazon Aurora User Guide*. 

## Syntax
<a name="aws-properties-rds-globalcluster-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-globalcluster-tag-syntax.json"></a>

```
{
  "[Key](#cfn-rds-globalcluster-tag-key)" : String,
  "[Value](#cfn-rds-globalcluster-tag-value)" : String
}
```

### YAML
<a name="aws-properties-rds-globalcluster-tag-syntax.yaml"></a>

```
  [Key](#cfn-rds-globalcluster-tag-key): String
  [Value](#cfn-rds-globalcluster-tag-value): String
```

## Properties
<a name="aws-properties-rds-globalcluster-tag-properties"></a>

`Key`  <a name="cfn-rds-globalcluster-tag-key"></a>
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-rds-globalcluster-tag-value"></a>
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::RDS::Integration
<a name="aws-resource-rds-integration"></a>

A zero-ETL integration with Amazon Redshift.

## Syntax
<a name="aws-resource-rds-integration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-rds-integration-syntax.json"></a>

```
{
  "Type" : "AWS::RDS::Integration",
  "Properties" : {
      "[AdditionalEncryptionContext](#cfn-rds-integration-additionalencryptioncontext)" : {Key: Value, ...},
      "[DataFilter](#cfn-rds-integration-datafilter)" : String,
      "[Description](#cfn-rds-integration-description)" : String,
      "[IntegrationName](#cfn-rds-integration-integrationname)" : String,
      "[KMSKeyId](#cfn-rds-integration-kmskeyid)" : String,
      "[SourceArn](#cfn-rds-integration-sourcearn)" : String,
      "[Tags](#cfn-rds-integration-tags)" : [ Tag, ... ],
      "[TargetArn](#cfn-rds-integration-targetarn)" : String
    }
}
```

### YAML
<a name="aws-resource-rds-integration-syntax.yaml"></a>

```
Type: AWS::RDS::Integration
Properties:
  [AdditionalEncryptionContext](#cfn-rds-integration-additionalencryptioncontext): 
    Key: Value
  [DataFilter](#cfn-rds-integration-datafilter): String
  [Description](#cfn-rds-integration-description): String
  [IntegrationName](#cfn-rds-integration-integrationname): String
  [KMSKeyId](#cfn-rds-integration-kmskeyid): String
  [SourceArn](#cfn-rds-integration-sourcearn): String
  [Tags](#cfn-rds-integration-tags): 
    - Tag
  [TargetArn](#cfn-rds-integration-targetarn): String
```

## Properties
<a name="aws-resource-rds-integration-properties"></a>

`AdditionalEncryptionContext`  <a name="cfn-rds-integration-additionalencryptioncontext"></a>
An optional set of non-secret key–value pairs that contains additional contextual information about the data. For more information, see [Encryption context](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context) in the *AWS Key Management Service Developer Guide*.  
You can only include this parameter if you specify the `KMSKeyId` parameter.  
*Required*: No  
*Type*: Object of String  
*Pattern*: `^[\s\S]*$`  
*Minimum*: `0`  
*Maximum*: `131072`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DataFilter`  <a name="cfn-rds-integration-datafilter"></a>
Data filters for the integration. These filters determine which tables from the source database are sent to the target Amazon Redshift data warehouse.   
*Required*: No  
*Type*: String  
*Pattern*: `[a-zA-Z0-9_ "\\\-$,*.:?+\/]*`  
*Minimum*: `1`  
*Maximum*: `25600`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Description`  <a name="cfn-rds-integration-description"></a>
A description of the integration.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `1000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IntegrationName`  <a name="cfn-rds-integration-integrationname"></a>
The name of the integration.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `64`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`KMSKeyId`  <a name="cfn-rds-integration-kmskeyid"></a>
The AWS Key Management System (AWS KMS) key identifier for the key to use to encrypt the integration. If you don't specify an encryption key, RDS uses a default AWS owned key.   
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SourceArn`  <a name="cfn-rds-integration-sourcearn"></a>
The Amazon Resource Name (ARN) of the database to use as the source for replication.  
*Required*: Yes  
*Type*: String  
*Pattern*: `arn:aws[a-z\-]*:rds(-[a-z]*)?:[a-z0-9\-]*:[0-9]*:(cluster|db):[a-z][a-z0-9]*(-[a-z0-9]+)*`  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-rds-integration-tags"></a>
An optional array of key-value pairs to apply to this integration.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-rds-integration-tag.md)  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TargetArn`  <a name="cfn-rds-integration-targetarn"></a>
The ARN of the Redshift data warehouse to use as the target for replication.  
*Required*: Yes  
*Type*: String  
*Minimum*: `20`  
*Maximum*: `2048`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-rds-integration-return-values"></a>

### Ref
<a name="aws-resource-rds-integration-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ARN of the integration.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-rds-integration-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-rds-integration-return-values-fn--getatt-fn--getatt"></a>

`CreateTime`  <a name="CreateTime-fn::getatt"></a>
The time when the integration was created, in Universal Coordinated Time (UTC).

`IntegrationArn`  <a name="IntegrationArn-fn::getatt"></a>
The ARN of the integration.

## Examples
<a name="aws-resource-rds-integration--examples"></a>

**Topics**
+ [Create an Aurora zero-ETL integration using an AWS owned KMS key](#aws-resource-rds-integration--examples--Create_an_Aurora_zero-ETL_integration_using_an_owned_KMS_key)
+ [Create an Aurora zero-ETL integration using a customer managed KMS key](#aws-resource-rds-integration--examples--Create_an_Aurora_zero-ETL_integration_using_a_customer_managed_KMS_key)
+ [Create an RDS zero-ETL integration using an AWS owned KMS key](#aws-resource-rds-integration--examples--Create_an_RDS_zero-ETL_integration_using_an_owned_KMS_key)
+ [Create an RDS zero-ETL integration using a customer managed KMS key](#aws-resource-rds-integration--examples--Create_an_RDS_zero-ETL_integration_using_a_customer_managed_KMS_key)

### Create an Aurora zero-ETL integration using an AWS owned KMS key
<a name="aws-resource-rds-integration--examples--Create_an_Aurora_zero-ETL_integration_using_an_owned_KMS_key"></a>

The following example creates an Amazon Aurora MySQL DB cluster, Redshift provisioned cluster, and a zero-ETL integration between the two clusters encrypted with an AWS owned KMS key. For more information, see [Working with Aurora zero-ETL integrations with Amazon Redshift](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/zero-etl.html) in the *Amazon Aurora User Guide*.

#### JSON
<a name="aws-resource-rds-integration--examples--Create_an_Aurora_zero-ETL_integration_using_an_owned_KMS_key--json"></a>

```
{
    "Parameters": {
        "Username": {
            "Description": "Username for Aurora MySQL database access",
            "Type": "String",
            "MinLength": "1",
            "MaxLength": "16",
            "Default": "bevelvoerder",
            "AllowedPattern": "[a-zA-Z][a-zA-Z0-9]*",
            "ConstraintDescription": "must begin with a letter and contain only alphanumeric characters."
        },
        "Password": {
            "NoEcho": "true",
            "Description": "Password for Aurora MySQL database access",
            "Type": "String",
            "MinLength": "8",
            "MaxLength": "41",
            "Default": "Passw0rd",
            "AllowedPattern": "[a-zA-Z0-9]*",
            "ConstraintDescription": "must contain only alphanumeric characters."
        },
        "RSUsername": {
            "Description": "Username for Redshift cluster access",
            "Type": "String",
            "MinLength": "1",
            "MaxLength": "16",
            "Default": "bevelvoerder",
            "AllowedPattern": "[a-zA-Z][a-zA-Z0-9]*",
            "ConstraintDescription": "must begin with a letter and contain only alphanumeric characters."
        },
        "RSPassword": {
            "NoEcho": "true",
            "Description": "Password for Redshift cluster access",
            "Type": "String",
            "MinLength": "8",
            "MaxLength": "41",
            "Default": "Passw0rd",
            "AllowedPattern": "[a-zA-Z0-9]*",
            "ConstraintDescription": "must contain only alphanumeric characters."
        }
    },
    "Resources": {
        "RDSDBClusterParameterGroup": {
            "Type": "AWS::RDS::DBClusterParameterGroup",
            "Properties": {
                "Description": "Enables enhanced binlog",
                "Family": "aurora-mysql8.0",
                "Parameters": {
                    "aurora_enhanced_binlog": "1",
                    "binlog_format": "ROW",
                    "binlog_backup": "0",
                    "binlog_replication_globaldb": "0",
                    "binlog_row_metadata": "full",
                    "binlog_row_image": "full"
                }
            }
        },
        "RDSDBCluster": {
            "Type": "AWS::RDS::DBCluster",
            "Properties": {
                "DBClusterParameterGroupName": {
                    "Ref": "RDSDBClusterParameterGroup"
                },
                "Engine": "aurora-mysql",
                "EngineVersion": "8.0.mysql_aurora.3.05.1",
                "MasterUsername": {
                    "Ref": "Username"
                },
                "MasterUserPassword": {
                    "Ref": "Password"
                }
            }
        },
        "RDSDBInstance": {
            "Type": "AWS::RDS::DBInstance",
            "Properties": {
                "DBClusterIdentifier": {
                    "Ref": "RDSDBCluster"
                },
                "DBInstanceClass": "db.r5.large",
                "Engine": "aurora-mysql",
                "PubliclyAccessible": true
            }
        },
        "RSClusterParameterGroup": {
            "Type": "AWS::Redshift::ClusterParameterGroup",
            "Properties": {
                "Description": "Enables case sensitivity",
                "ParameterGroupFamily": "redshift-1.0",
                "Parameters": [
                    {
                        "ParameterName": "enable_case_sensitive_identifier",
                        "ParameterValue": "true"
                    }
                ]
            }
        },
        "RSCluster": {
            "Type": "AWS::Redshift::Cluster",
            "Properties": {
                "ClusterParameterGroupName": {
                    "Ref": "RSClusterParameterGroup"
                },
                "ClusterType": "multi-node",
                "DBName": "dev",
                "Encrypted": true,
                "MasterUsername": {
                    "Ref": "RSUsername"
                },
                "MasterUserPassword": {
                    "Ref": "RSPassword"
                },
                "NodeType": "ra3.xlplus",
                "NumberOfNodes": 2,
                "NamespaceResourcePolicy": {
                    "Version": "2012-10-17"		 	 	 ,
                    "Statement": [
                        {
                            "Effect": "Allow",
                            "Principal": {
                                "Service": "redshift.amazonaws.com"
                            },
                            "Action": "redshift:AuthorizeInboundIntegration",
                            "Condition": {
                                "StringEquals": {
                                    "aws:SourceArn": {
                                        "Fn::GetAtt": [
                                            "RDSDBCluster",
                                            "DBClusterArn"
                                        ]
                                    }
                                }
                            }
                        },
                        {
                            "Effect": "Allow",
                            "Principal": {
                                "AWS": {
                                    "Fn::Join": [
                                        ":",
                                        [
                                            "arn",
                                            {
                                                "Ref": "AWS::Partition"
                                            },
                                            "iam",
                                            "",
                                            {
                                                "Ref": "AWS::AccountId"
                                            },
                                            "root"
                                        ]
                                    ]
                                }
                            },
                            "Action": "redshift:CreateInboundIntegration"
                        }
                    ]
                }
            }
        },
        "Integration": {
            "Type": "AWS::RDS::Integration",
            "Properties": {
                "SourceArn": {
                    "Fn::GetAtt": [
                        "RDSDBCluster",
                        "DBClusterArn"
                    ]
                },
                "TargetArn": {
                    "Fn::GetAtt": [
                        "RSCluster",
                        "ClusterNamespaceArn"
                    ]
                }
            }
        }
    },
    "Outputs": {
        "IntegrationARN": {
            "Description": "Integration ARN",
            "Value": {
                "Ref": "Integration"
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-integration--examples--Create_an_Aurora_zero-ETL_integration_using_an_owned_KMS_key--yaml"></a>

```
Parameters:
  Username:
    Description: Username for Aurora MySQL database access
    Type: String
    MinLength: '1'
    MaxLength: '16'
    Default: "bevelvoerder"
    AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
    ConstraintDescription: must begin with a letter and contain only alphanumeric characters.
  Password:
    NoEcho: 'true'
    Description: Password for Aurora MySQL database access
    Type: String
    MinLength: '8'
    MaxLength: '41'
    Default: "Passw0rd"
    AllowedPattern: '[a-zA-Z0-9]*'
    ConstraintDescription: must contain only alphanumeric characters.
  RSUsername:
    Description: Username for Redshift cluster access
    Type: String
    MinLength: '1'
    MaxLength: '16'
    Default: "bevelvoerder"
    AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
    ConstraintDescription: must begin with a letter and contain only alphanumeric characters.
  RSPassword:
    NoEcho: 'true'
    Description: Password for Redshift cluster access
    Type: String
    MinLength: '8'
    MaxLength: '41'
    Default: "Passw0rd"
    AllowedPattern: '[a-zA-Z0-9]*'
    ConstraintDescription: must contain only alphanumeric characters.
Resources:
  RDSDBClusterParameterGroup:
    Type: 'AWS::RDS::DBClusterParameterGroup'
    Properties:
      Description: Enables enhanced binlog
      Family: aurora-mysql8.0
      Parameters:
        aurora_enhanced_binlog: '1'
        binlog_format: ROW
        binlog_backup: '0'
        binlog_replication_globaldb: '0'
        binlog_row_metadata: full
        binlog_row_image: full
  RDSDBCluster:
    Type: 'AWS::RDS::DBCluster'
    Properties:
      DBClusterParameterGroupName: !Ref RDSDBClusterParameterGroup
      Engine: aurora-mysql
      EngineVersion: 8.0.mysql_aurora.3.05.1
      MasterUsername: !Ref Username
      MasterUserPassword: !Ref Password
  RDSDBInstance:
    Type: 'AWS::RDS::DBInstance'
    Properties:
      DBClusterIdentifier: !Ref RDSDBCluster
      DBInstanceClass: db.r5.large
      Engine: aurora-mysql
      PubliclyAccessible: true
  RSClusterParameterGroup:
    Type: 'AWS::Redshift::ClusterParameterGroup'
    Properties:
      Description: Enables case sensitivity
      ParameterGroupFamily: redshift-1.0
      Parameters:
        - ParameterName: enable_case_sensitive_identifier
          ParameterValue: 'true'
  RSCluster:
    Type: 'AWS::Redshift::Cluster'
    Properties:
      ClusterParameterGroupName: !Ref RSClusterParameterGroup
      ClusterType: multi-node
      DBName: dev
      Encrypted: true
      MasterUsername: !Ref RSUsername
      MasterUserPassword: !Ref RSPassword
      NodeType: ra3.xlplus
      NumberOfNodes: 2
      NamespaceResourcePolicy:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Principal:
              Service: redshift.amazonaws.com
            Action: redshift:AuthorizeInboundIntegration
            Condition:
              StringEquals:
                aws:SourceArn: !GetAtt RDSDBCluster.DBClusterArn
          - Effect: Allow
            Principal:
              AWS: !Join [":", ["arn", !Ref AWS::Partition, "iam", "", !Ref AWS::AccountId, "root"]]
            Action: redshift:CreateInboundIntegration
  Integration:
    Type: 'AWS::RDS::Integration'
    Properties:
      SourceArn: !GetAtt RDSDBCluster.DBClusterArn
      TargetArn: !GetAtt RSCluster.ClusterNamespaceArn
Outputs:
  IntegrationARN:
    Description: Integration ARN
    Value: !Ref Integration
```

### Create an Aurora zero-ETL integration using a customer managed KMS key
<a name="aws-resource-rds-integration--examples--Create_an_Aurora_zero-ETL_integration_using_a_customer_managed_KMS_key"></a>

The following example creates an Amazon Aurora MySQL DB cluster, Redshift provisioned cluster, and a zero-ETL integration between the two clusters encrypted with a customer managed KMS key. For more information, see [Working with Aurora zero-ETL integrations with Amazon Redshift](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/zero-etl.html) in the *Amazon Aurora User Guide*.

#### JSON
<a name="aws-resource-rds-integration--examples--Create_an_Aurora_zero-ETL_integration_using_a_customer_managed_KMS_key--json"></a>

```
{
    "Parameters": {
        "Username": {
            "Description": "Username for Aurora MySQL database access",
            "Type": "String",
            "MinLength": "1",
            "MaxLength": "16",
            "Default": "bevelvoerder",
            "AllowedPattern": "[a-zA-Z][a-zA-Z0-9]*",
            "ConstraintDescription": "must begin with a letter and contain only alphanumeric characters."
        },
        "Password": {
            "NoEcho": "true",
            "Description": "Password for Aurora MySQL database access",
            "Type": "String",
            "MinLength": "8",
            "MaxLength": "41",
            "Default": "Passw0rd",
            "AllowedPattern": "[a-zA-Z0-9]*",
            "ConstraintDescription": "must contain only alphanumeric characters."
        },
        "RSUsername": {
            "Description": "Username for Redshift cluster access",
            "Type": "String",
            "MinLength": "1",
            "MaxLength": "16",
            "Default": "bevelvoerder",
            "AllowedPattern": "[a-zA-Z][a-zA-Z0-9]*",
            "ConstraintDescription": "must begin with a letter and contain only alphanumeric characters."
        },
        "RSPassword": {
            "NoEcho": "true",
            "Description": "Password for Redshift cluster access",
            "Type": "String",
            "MinLength": "8",
            "MaxLength": "41",
            "Default": "Passw0rd",
            "AllowedPattern": "[a-zA-Z0-9]*",
            "ConstraintDescription": "must contain only alphanumeric characters."
        }
    },
    "Resources": {
        "kmsKey": {
            "Type": "AWS::KMS::Key",
            "Properties": {
                "Description": "Key used to encrypt the zero-ETL integration.",
                "KeyPolicy": {
                    "Version": "2012-10-17"		 	 	 ,
                    "Statement": [
                        {
                            "Sid": "statement1",
                            "Effect": "Allow",
                            "Principal": {
                                "Service": "redshift.amazonaws.com"
                            },
                            "Action": "kms:CreateGrant",
                            "Resource": "*"
                        },
                        {
                            "Sid": "statement2",
                            "Effect": "Allow",
                            "Principal": {
                                "AWS": {
                                    "Fn::Join": [
                                        ":",
                                        [
                                            "arn",
                                            {
                                                "Ref": "AWS::Partition"
                                            },
                                            "iam",
                                            "",
                                            {
                                                "Ref": "AWS::AccountId"
                                            },
                                            "root"
                                        ]
                                    ]
                                }
                            },
                            "Action": "kms:*",
                            "Resource": "*"
                        }
                    ]
                }
            }
        },
        "RDSDBClusterParameterGroup": {
            "Type": "AWS::RDS::DBClusterParameterGroup",
            "Properties": {
                "Description": "Enables enhanced binlog",
                "Family": "aurora-mysql8.0",
                "Parameters": {
                    "aurora_enhanced_binlog": "1",
                    "binlog_format": "ROW",
                    "binlog_backup": "0",
                    "binlog_replication_globaldb": "0",
                    "binlog_row_metadata": "full",
                    "binlog_row_image": "full"
                }
            }
        },
        "RDSDBCluster": {
            "Type": "AWS::RDS::DBCluster",
            "Properties": {
                "DBClusterParameterGroupName": {
                    "Ref": "RDSDBClusterParameterGroup"
                },
                "Engine": "aurora-mysql",
                "EngineVersion": "8.0.mysql_aurora.3.05.1",
                "MasterUsername": {
                    "Ref": "Username"
                },
                "MasterUserPassword": {
                    "Ref": "Password"
                }
            }
        },
        "RDSDBInstance": {
            "Type": "AWS::RDS::DBInstance",
            "Properties": {
                "DBClusterIdentifier": {
                    "Ref": "RDSDBCluster"
                },
                "DBInstanceClass": "db.r5.large",
                "Engine": "aurora-mysql",
                "PubliclyAccessible": true
            }
        },
        "RSClusterParameterGroup": {
            "Type": "AWS::Redshift::ClusterParameterGroup",
            "Properties": {
                "Description": "Enables case sensitivity",
                "ParameterGroupFamily": "redshift-1.0",
                "Parameters": [
                    {
                        "ParameterName": "enable_case_sensitive_identifier",
                        "ParameterValue": "true"
                    }
                ]
            }
        },
        "RSCluster": {
            "Type": "AWS::Redshift::Cluster",
            "Properties": {
                "ClusterParameterGroupName": {
                    "Ref": "RSClusterParameterGroup"
                },
                "ClusterType": "multi-node",
                "DBName": "dev",
                "Encrypted": true,
                "MasterUsername": {
                    "Ref": "RSUsername"
                },
                "MasterUserPassword": {
                    "Ref": "RSPassword"
                },
                "NodeType": "ra3.xlplus",
                "NumberOfNodes": 2,
                "NamespaceResourcePolicy": {
                    "Version": "2012-10-17"		 	 	 ,
                    "Statement": [
                        {
                            "Effect": "Allow",
                            "Principal": {
                                "Service": "redshift.amazonaws.com"
                            },
                            "Action": "redshift:AuthorizeInboundIntegration",
                            "Condition": {
                                "StringEquals": {
                                    "aws:SourceArn": {
                                        "Fn::GetAtt": [
                                            "RDSDBCluster",
                                            "DBClusterArn"
                                        ]
                                    }
                                }
                            }
                        },
                        {
                            "Effect": "Allow",
                            "Principal": {
                                "AWS": {
                                    "Fn::Join": [
                                        ":",
                                        [
                                            "arn",
                                            {
                                                "Ref": "AWS::Partition"
                                            },
                                            "iam",
                                            "",
                                            {
                                                "Ref": "AWS::AccountId"
                                            },
                                            "root"
                                        ]
                                    ]
                                }
                            },
                            "Action": "redshift:CreateInboundIntegration"
                        }
                    ]
                }
            }
        },
        "Integration": {
            "Type": "AWS::RDS::Integration",
            "Properties": {
                "SourceArn": {
                    "Fn::GetAtt": [
                        "RDSDBCluster",
                        "DBClusterArn"
                    ]
                },
                "TargetArn": {
                    "Fn::GetAtt": [
                        "RSCluster",
                        "ClusterNamespaceArn"
                    ]
                },
                "KMSKeyId": {
                    "Fn::GetAtt": [
                        "kmsKey",
                        "Arn"
                    ]
                },
                "AdditionalEncryptionContext": {
                    "custom-context-1": "custom-context-value-1",
                    "custom-context-2": "custom-context-value-2"
                }
            }
        }
    },
    "Outputs": {
        "IntegrationARN": {
            "Description": "Integration ARN",
            "Value": {
                "Ref": "Integration"
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-integration--examples--Create_an_Aurora_zero-ETL_integration_using_a_customer_managed_KMS_key--yaml"></a>

```
Parameters:
  Username:
    Description: Username for Aurora MySQL database access
    Type: String
    MinLength: '1'
    MaxLength: '16'
    Default: "bevelvoerder"
    AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
    ConstraintDescription: must begin with a letter and contain only alphanumeric characters.
  Password:
    NoEcho: 'true'
    Description: Password for Aurora MySQL database access
    Type: String
    MinLength: '8'
    MaxLength: '41'
    Default: "Passw0rd"
    AllowedPattern: '[a-zA-Z0-9]*'
    ConstraintDescription: must contain only alphanumeric characters.
  RSUsername:
    Description: Username for Redshift cluster access
    Type: String
    MinLength: '1'
    MaxLength: '16'
    Default: "bevelvoerder"
    AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
    ConstraintDescription: must begin with a letter and contain only alphanumeric characters.
  RSPassword:
    NoEcho: 'true'
    Description: Password for Redshift cluster access
    Type: String
    MinLength: '8'
    MaxLength: '41'
    Default: "Passw0rd"
    AllowedPattern: '[a-zA-Z0-9]*'
    ConstraintDescription: must contain only alphanumeric characters.
Resources:
  kmsKey:
    Type: 'AWS::KMS::Key'
    Properties:
      Description: Key used to encrypt the zero-ETL integration.
      KeyPolicy:
        Version: 2012-10-17
        Statement:
          - Sid: statement1
            Effect: Allow
            Principal:
              Service: redshift.amazonaws.com
            Action: "kms:CreateGrant"
            Resource: "*"
          - Sid: statement2
            Effect: Allow
            Principal:
              AWS: !Join [":", ["arn", !Ref AWS::Partition, "iam", "", !Ref AWS::AccountId, "root"]]
            Action: "kms:*"
            Resource: "*"
  RDSDBClusterParameterGroup:
    Type: 'AWS::RDS::DBClusterParameterGroup'
    Properties:
      Description: Enables enhanced binlog
      Family: aurora-mysql8.0
      Parameters:
        aurora_enhanced_binlog: '1'
        binlog_format: ROW
        binlog_backup: '0'
        binlog_replication_globaldb: '0'
        binlog_row_metadata: full
        binlog_row_image: full
  RDSDBCluster:
    Type: 'AWS::RDS::DBCluster'
    Properties:
      DBClusterParameterGroupName: !Ref RDSDBClusterParameterGroup
      Engine: aurora-mysql
      EngineVersion: 8.0.mysql_aurora.3.05.1
      MasterUsername: !Ref Username
      MasterUserPassword: !Ref Password
  RDSDBInstance:
    Type: 'AWS::RDS::DBInstance'
    Properties:
      DBClusterIdentifier: !Ref RDSDBCluster
      DBInstanceClass: db.r5.large
      Engine: aurora-mysql
      PubliclyAccessible: true
  RSClusterParameterGroup:
    Type: 'AWS::Redshift::ClusterParameterGroup'
    Properties:
      Description: Enables case sensitivity
      ParameterGroupFamily: redshift-1.0
      Parameters:
        - ParameterName: enable_case_sensitive_identifier
          ParameterValue: 'true'
  RSCluster:
    Type: 'AWS::Redshift::Cluster'
    Properties:
      ClusterParameterGroupName: !Ref RSClusterParameterGroup
      ClusterType: multi-node
      DBName: dev
      Encrypted: true
      MasterUsername: !Ref RSUsername
      MasterUserPassword: !Ref RSPassword
      NodeType: ra3.xlplus
      NumberOfNodes: 2
      NamespaceResourcePolicy:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Principal:
              Service: redshift.amazonaws.com
            Action: redshift:AuthorizeInboundIntegration
            Condition:
              StringEquals:
                aws:SourceArn: !GetAtt RDSDBCluster.DBClusterArn
          - Effect: Allow
            Principal:
              AWS: !Join [":", ["arn", !Ref AWS::Partition, "iam", "", !Ref AWS::AccountId, "root"]]
            Action: redshift:CreateInboundIntegration
  Integration:
    Type: 'AWS::RDS::Integration'
    Properties:
      SourceArn: !GetAtt RDSDBCluster.DBClusterArn
      TargetArn: !GetAtt RSCluster.ClusterNamespaceArn
      KMSKeyId: !GetAtt kmsKey.Arn
      AdditionalEncryptionContext:
        custom-context-1: custom-context-value-1
        custom-context-2: custom-context-value-2
Outputs:
  IntegrationARN:
    Description: Integration ARN 
    Value: !Ref Integration
```

### Create an RDS zero-ETL integration using an AWS owned KMS key
<a name="aws-resource-rds-integration--examples--Create_an_RDS_zero-ETL_integration_using_an_owned_KMS_key"></a>

The following example creates an Amazon RDS MySQL DB instance, Redshift provisioned cluster, and a zero-ETL integration between them encrypted with an AWS owned key. For more information, see [Working with RDS zero-ETL integrations with Amazon Redshift](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/zero-etl.html) in the *Amazon RDS User Guide*.

#### JSON
<a name="aws-resource-rds-integration--examples--Create_an_RDS_zero-ETL_integration_using_an_owned_KMS_key--json"></a>

```
{
    "Parameters": {
        "Username": {
            "Description": "Username for MySQL database access",
            "Type": "String",
            "MinLength": "1",
            "MaxLength": "16",
            "Default": "sqladmin",
            "AllowedPattern": "[a-zA-Z][a-zA-Z0-9]*",
            "ConstraintDescription": "must begin with a letter and contain only alphanumeric characters."
        },
        "Password": {
            "NoEcho": "true",
            "Description": "Password for MySQL database access",
            "Type": "String",
            "MinLength": "8",
            "MaxLength": "41",
            "Default": "sqladmin",
            "AllowedPattern": "[a-zA-Z0-9]*",
            "ConstraintDescription": "must contain only alphanumeric characters."
        },
        "RSUsername": {
            "Description": "Username for Redshift cluster access",
            "Type": "String",
            "MinLength": "1",
            "MaxLength": "16",
            "Default": "sqladmin",
            "AllowedPattern": "[a-zA-Z][a-zA-Z0-9]*",
            "ConstraintDescription": "must begin with a letter and contain only alphanumeric characters."
        },
        "RSPassword": {
            "NoEcho": "true",
            "Description": "Password for Redshift cluster access",
            "Type": "String",
            "MinLength": "8",
            "MaxLength": "41",
            "Default": "Sqladmin2024",
            "AllowedPattern": "[a-zA-Z0-9]*",
            "ConstraintDescription": "must contain only alphanumeric characters."
        }
    },
    "Resources": {
        "RDSDBParameterGroup": {
            "Type": "AWS::RDS::DBParameterGroup",
            "Properties": {
            	"DBParameterGroupName": "zeroetl-mysql-parameter-group",
                "Description": "Enables enhanced binlog",
                "Family": "mysql8.0",
                "Parameters": {
                    "binlog_checksum": "NONE",
                    "binlog_format": "ROW",
                    "binlog_row_image": "FULL"
                }
            }
        },
        "RDSDBInstance": {
            "Type": "AWS::RDS::DBInstance",
            "Properties": {
            	"DBInstanceIdentifier": "zeroetl-mysql-source",
                "DBParameterGroupName": {
                    "Ref": "RDSDBParameterGroup"
                },
                "Engine": "mysql",
                "EngineVersion": "8.0.33",
                "MasterUsername": {
                    "Ref": "Username"
                },
                "MasterUserPassword": {
                    "Ref": "Password"
                },
                "DBInstanceClass": "db.r5.large",
                "BackupRetentionPeriod": 1,
                "StorageType": "gp2",
                "AllocatedStorage": "100"
            }
        },
        "RSClusterParameterGroup": {
            "Type": "AWS::Redshift::ClusterParameterGroup",
            "Properties": {
            	"ParameterGroupName": "zeroetl-redshift-cluster-parameter-group",
                "Description": "Enables case sensitivity",
                "ParameterGroupFamily": "redshift-1.0",
                "Parameters": [
                    {
                        "ParameterName": "enable_case_sensitive_identifier",
                        "ParameterValue": "true"
                    }
                ]
            }
        },
        "RSCluster": {
            "Type": "AWS::Redshift::Cluster",
            "Properties": {
            	"ClusterIdentifier": "zeroetl-redshift-cluster",
                "ClusterParameterGroupName": {
                    "Ref": "RSClusterParameterGroup"
                },
                "ClusterType": "multi-node",
                "DBName": "sqladmin",
                "MaintenanceTrackName": "PREVIEW_2023",
                "Encrypted": true,
                "MasterUsername": {
                    "Ref": "RSUsername"
                },
                "MasterUserPassword": {
                    "Ref": "RSPassword"
                },
                "NodeType": "ra3.xlplus",
                "NumberOfNodes": 2,
                "NamespaceResourcePolicy": {
                    "Version": "2012-10-17"		 	 	 ,
                    "Statement": [
                        {
                            "Effect": "Allow",
                            "Principal": {
                                "Service": "redshift.amazonaws.com"
                            },
                            "Action": "redshift:AuthorizeInboundIntegration",
                            "Condition": {
                                "StringEquals": {
                                    "aws:SourceArn": {
                                        "Fn::GetAtt": [
                                            "RDSDBInstance",
                                            "DBInstanceArn"
                                        ]
                                    }
                                }
                            }
                        },
                        {
                            "Effect": "Allow",
                            "Principal": {
                                "AWS": {
                                    "Fn::Join": [
                                        ":",
                                        [
                                            "arn",
                                            {
                                                "Ref": "AWS::Partition"
                                            },
                                            "iam",
                                            "",
                                            {
                                                "Ref": "AWS::AccountId"
                                            },
                                            "root"
                                        ]
                                    ]
                                }
                            },
                            "Action": "redshift:CreateInboundIntegration"
                        }
                    ]
                }
            }
        },
        "Integration": {
            "Type": "AWS::RDS::Integration",
            "Properties": {
            	"IntegrationName": "zeroetl-integration-from-mysql-to-redshift",
                "SourceArn": {
                    "Fn::GetAtt": [
                        "RDSDBInstance",
                        "DBInstanceArn"
                    ]
                },
                "TargetArn": {
                    "Fn::GetAtt": [
                        "RSCluster",
                        "ClusterNamespaceArn"
                    ]
                }
            }
        }
    },
    "Outputs": {
    	"IntegrationCreateTime": {
    		"Description": "Integration Creation Time",
    		"Value": {
    			"Fn::GetAtt": [
    				"Integration",
    				"CreateTime"
    			]
    		}
    	},
        "IntegrationARN": {
            "Description": "Integration ARN",
            "Value": {
                "Ref": "Integration"
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-integration--examples--Create_an_RDS_zero-ETL_integration_using_an_owned_KMS_key--yaml"></a>

```
Parameters:
  Username:
    Description: Username for MySQL database access
    Type: String
    MinLength: '1'
    MaxLength: '16'
    Default: sqladmin
    AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
    ConstraintDescription: must begin with a letter and contain only alphanumeric characters.
  Password:
    NoEcho: 'true'
    Description: Password for MySQL database access
    Type: String
    MinLength: '8'
    MaxLength: '41'
    Default: sqladmin
    AllowedPattern: '[a-zA-Z0-9]*'
    ConstraintDescription: must contain only alphanumeric characters.
  RSUsername:
    Description: Username for Redshift cluster access
    Type: String
    MinLength: '1'
    MaxLength: '16'
    Default: sqladmin
    AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
    ConstraintDescription: must begin with a letter and contain only alphanumeric characters.
  RSPassword:
    NoEcho: 'true'
    Description: Password for Redshift cluster access
    Type: String
    MinLength: '8'
    MaxLength: '41'
    Default: Sqladmin2024
    AllowedPattern: '[a-zA-Z0-9]*'
    ConstraintDescription: must contain only alphanumeric characters.
Resources:
  RDSDBParameterGroup:
    Type: 'AWS::RDS::DBParameterGroup'
    Properties:
      DBParameterGroupName: zeroetl-mysql-parameter-group
      Description: Enables enhanced binlog
      Family: mysql8.0
      Parameters:
        binlog_checksum: NONE
        binlog_format: ROW
        binlog_row_image: FULL
  RDSDBInstance:
    Type: 'AWS::RDS::DBInstance'
    Properties:
      DBInstanceIdentifier: zeroetl-mysql-source
      DBParameterGroupName: !Ref RDSDBParameterGroup
      Engine: mysql
      EngineVersion: 8.0.33
      MasterUsername: !Ref Username
      MasterUserPassword: !Ref Password
      DBInstanceClass: db.r5.large
      BackupRetentionPeriod: 1
      StorageType: gp2
      AllocatedStorage: '100'
  RSClusterParameterGroup:
    Type: 'AWS::Redshift::ClusterParameterGroup'
    Properties:
      ParameterGroupName: zeroetl-redshift-cluster-parameter-group
      Description: Enables case sensitivity
      ParameterGroupFamily: redshift-1.0
      Parameters:
        - ParameterName: enable_case_sensitive_identifier
          ParameterValue: 'true'
  RSCluster:
    Type: 'AWS::Redshift::Cluster'
    Properties:
      ClusterIdentifier: zeroetl-redshift-cluster
      ClusterParameterGroupName: !Ref RSClusterParameterGroup
      ClusterType: multi-node
      DBName: sqladmin
      MaintenanceTrackName: PREVIEW_2023
      Encrypted: true
      MasterUsername: !Ref RSUsername
      MasterUserPassword: !Ref RSPassword
      NodeType: ra3.xlplus
      NumberOfNodes: 2
      NamespaceResourcePolicy:
        Version: 2012-10-17
        Statement:
          - Effect: Allow
            Principal:
              Service: redshift.amazonaws.com
            Action: 'redshift:AuthorizeInboundIntegration'
            Condition:
              StringEquals:
                'aws:SourceArn': !GetAtt 
                  - RDSDBInstance
                  - DBInstanceArn
          - Effect: Allow
            Principal:
              AWS: !Join 
                - ':'
                - - arn
                  - !Ref 'AWS::Partition'
                  - iam
                  - ''
                  - !Ref 'AWS::AccountId'
                  - root
            Action: 'redshift:CreateInboundIntegration'
  Integration:
    Type: 'AWS::RDS::Integration'
    Properties:
      IntegrationName: zeroetl-integration-from-mysql-to-redshift
      SourceArn: !GetAtt 
        - RDSDBInstance
        - DBInstanceArn
      TargetArn: !GetAtt 
        - RSCluster
        - ClusterNamespaceArn
Outputs:
  IntegrationCreateTime:
    Description: Integration Creation Time
    Value: !GetAtt 
      - Integration
      - CreateTime
  IntegrationARN:
    Description: Integration ARN
    Value: !Ref Integration
```

### Create an RDS zero-ETL integration using a customer managed KMS key
<a name="aws-resource-rds-integration--examples--Create_an_RDS_zero-ETL_integration_using_a_customer_managed_KMS_key"></a>

The following example creates an Amazon RDS MySQL DB instance, Redshift provisioned cluster, and a zero-ETL integration between them encrypted with a customer managed KMS key. For more information, see [Working with RDS zero-ETL integrations with Amazon Redshift](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/zero-etl.html) in the *Amazon RDS User Guide*.

#### JSON
<a name="aws-resource-rds-integration--examples--Create_an_RDS_zero-ETL_integration_using_a_customer_managed_KMS_key--json"></a>

```
{
    "Parameters": {
        "Username": {
            "Description": "Username for MySQL database access",
            "Type": "String",
            "MinLength": "1",
            "MaxLength": "16",
            "Default": "sqladmin",
            "AllowedPattern": "[a-zA-Z][a-zA-Z0-9]*",
            "ConstraintDescription": "must begin with a letter and contain only alphanumeric characters."
        },
        "Password": {
            "NoEcho": "true",
            "Description": "Password for MySQL database access",
            "Type": "String",
            "MinLength": "8",
            "MaxLength": "41",
            "Default": "sqladmin",
            "AllowedPattern": "[a-zA-Z0-9]*",
            "ConstraintDescription": "must contain only alphanumeric characters."
        },
        "RSUsername": {
            "Description": "Username for Redshift cluster access",
            "Type": "String",
            "MinLength": "1",
            "MaxLength": "16",
            "Default": "sqladmin",
            "AllowedPattern": "[a-zA-Z][a-zA-Z0-9]*",
            "ConstraintDescription": "must begin with a letter and contain only alphanumeric characters."
        },
        "RSPassword": {
            "NoEcho": "true",
            "Description": "Password for Redshift cluster access",
            "Type": "String",
            "MinLength": "8",
            "MaxLength": "41",
            "Default": "Sqladmin2024",
            "AllowedPattern": "[a-zA-Z0-9]*",
            "ConstraintDescription": "must contain only alphanumeric characters."
        }
    },
    "Resources": {
    	"kmsKey": {
            "Type": "AWS::KMS::Key",
            "Properties": {
                "Description": "Key used to encrypt the zero-ETL integration.",
                "KeyPolicy": {
                    "Version": "2012-10-17"		 	 	 ,
                    "Statement": [
                        {
                            "Sid": "statement1",
                            "Effect": "Allow",
                            "Principal": {
                                "Service": "redshift.amazonaws.com"
                            },
                            "Action": "kms:CreateGrant",
                            "Resource": "*"
                        },
                        {
                            "Sid": "statement2",
                            "Effect": "Allow",
                            "Principal": {
                                "AWS": {
                                    "Fn::Join": [
                                        ":",
                                        [
                                            "arn",
                                            {
                                                "Ref": "AWS::Partition"
                                            },
                                            "iam",
                                            "",
                                            {
                                                "Ref": "AWS::AccountId"
                                            },
                                            "root"
                                        ]
                                    ]
                                }
                            },
                            "Action": "kms:*",
                            "Resource": "*"
                        }
                    ]
                }
            }
        },
        "RDSDBParameterGroup": {
            "Type": "AWS::RDS::DBParameterGroup",
            "Properties": {
            	"DBParameterGroupName": "zeroetl-mysql-parameter-group",
                "Description": "Enables enhanced binlog",
                "Family": "mysql8.0",
                "Parameters": {
                    "binlog_checksum": "NONE",
                    "binlog_format": "ROW",
                    "binlog_row_image": "FULL"
                }
            }
        },
        "RDSDBInstance": {
            "Type": "AWS::RDS::DBInstance",
            "Properties": {
            	"DBInstanceIdentifier": "zeroetl-mysql-source",
                "DBParameterGroupName": {
                    "Ref": "RDSDBParameterGroup"
                },
                "Engine": "mysql",
                "EngineVersion": "8.0.33",
                "MasterUsername": {
                    "Ref": "Username"
                },
                "MasterUserPassword": {
                    "Ref": "Password"
                },
                "DBInstanceClass": "db.r5.large",
                "BackupRetentionPeriod": 1,
                "StorageType": "gp2",
                "AllocatedStorage": "100"
            }
        },
        "RSClusterParameterGroup": {
            "Type": "AWS::Redshift::ClusterParameterGroup",
            "Properties": {
            	"ParameterGroupName": "zeroetl-redshift-cluster-parameter-group",
                "Description": "Enables case sensitivity",
                "ParameterGroupFamily": "redshift-1.0",
                "Parameters": [
                    {
                        "ParameterName": "enable_case_sensitive_identifier",
                        "ParameterValue": "true"
                    }
                ]
            }
        },
        "RSCluster": {
            "Type": "AWS::Redshift::Cluster",
            "Properties": {
            	"ClusterIdentifier": "zeroetl-redshift-cluster",
                "ClusterParameterGroupName": {
                    "Ref": "RSClusterParameterGroup"
                },
                "ClusterType": "multi-node",
                "DBName": "sqladmin",
                "MaintenanceTrackName": "PREVIEW_2023",
                "Encrypted": true,
                "MasterUsername": {
                    "Ref": "RSUsername"
                },
                "MasterUserPassword": {
                    "Ref": "RSPassword"
                },
                "NodeType": "ra3.xlplus",
                "NumberOfNodes": 2,
                "NamespaceResourcePolicy": {
                    "Version": "2012-10-17"		 	 	 ,
                    "Statement": [
                        {
                            "Effect": "Allow",
                            "Principal": {
                                "Service": "redshift.amazonaws.com"
                            },
                            "Action": "redshift:AuthorizeInboundIntegration",
                            "Condition": {
                                "StringEquals": {
                                    "aws:SourceArn": {
                                        "Fn::GetAtt": [
                                            "RDSDBInstance",
                                            "DBInstanceArn"
                                        ]
                                    }
                                }
                            }
                        },
                        {
                            "Effect": "Allow",
                            "Principal": {
                                "AWS": {
                                    "Fn::Join": [
                                        ":",
                                        [
                                            "arn",
                                            {
                                                "Ref": "AWS::Partition"
                                            },
                                            "iam",
                                            "",
                                            {
                                                "Ref": "AWS::AccountId"
                                            },
                                            "root"
                                        ]
                                    ]
                                }
                            },
                            "Action": "redshift:CreateInboundIntegration"
                        }
                    ]
                }
            }
        },
        "Integration": {
            "Type": "AWS::RDS::Integration",
            "Properties": {
            	"IntegrationName": "zeroetl-integration-from-mysql-to-redshift",
                "SourceArn": {
                    "Fn::GetAtt": [
                        "RDSDBInstance",
                        "DBInstanceArn"
                    ]
                },
                "TargetArn": {
                    "Fn::GetAtt": [
                        "RSCluster",
                        "ClusterNamespaceArn"
                    ]
                },
                "KMSKeyId": {
                    "Fn::GetAtt": [
                        "kmsKey",
                        "Arn"
                    ]
                },
                "AdditionalEncryptionContext": {
                    "integrationName": "zeroetl-integration-from-mysql-to-redshift"
                }
            }
        }
    },
    "Outputs": {
    	"IntegrationCreateTime": {
    		"Description": "Integration Creation Time",
    		"Value": {
    			"Fn::GetAtt": [
    				"Integration",
    				"CreateTime"
    			]
    		}
    	},
        "IntegrationARN": {
            "Description": "Integration ARN",
            "Value": {
                "Ref": "Integration"
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-integration--examples--Create_an_RDS_zero-ETL_integration_using_a_customer_managed_KMS_key--yaml"></a>

```
Parameters:
  Username:
    Description: Username for MySQL database access
    Type: String
    MinLength: '1'
    MaxLength: '16'
    Default: sqladmin
    AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
    ConstraintDescription: must begin with a letter and contain only alphanumeric characters.
  Password:
    NoEcho: 'true'
    Description: Password for MySQL database access
    Type: String
    MinLength: '8'
    MaxLength: '41'
    Default: sqladmin
    AllowedPattern: '[a-zA-Z0-9]*'
    ConstraintDescription: must contain only alphanumeric characters.
  RSUsername:
    Description: Username for Redshift cluster access
    Type: String
    MinLength: '1'
    MaxLength: '16'
    Default: sqladmin
    AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*'
    ConstraintDescription: must begin with a letter and contain only alphanumeric characters.
  RSPassword:
    NoEcho: 'true'
    Description: Password for Redshift cluster access
    Type: String
    MinLength: '8'
    MaxLength: '41'
    Default: Sqladmin2024
    AllowedPattern: '[a-zA-Z0-9]*'
    ConstraintDescription: must contain only alphanumeric characters.
Resources:
  kmsKey:
    Type: 'AWS::KMS::Key'
    Properties:
      Description: Key used to encrypt the zero-ETL integration.
      KeyPolicy:
        Version: 2012-10-17
        Statement:
          - Sid: statement1
            Effect: Allow
            Principal:
              Service: redshift.amazonaws.com
            Action: 'kms:CreateGrant'
            Resource: '*'
          - Sid: statement2
            Effect: Allow
            Principal:
              AWS: !Join 
                - ':'
                - - arn
                  - !Ref 'AWS::Partition'
                  - iam
                  - ''
                  - !Ref 'AWS::AccountId'
                  - root
            Action: 'kms:*'
            Resource: '*'
  RDSDBParameterGroup:
    Type: 'AWS::RDS::DBParameterGroup'
    Properties:
      DBParameterGroupName: zeroetl-mysql-parameter-group
      Description: Enables enhanced binlog
      Family: mysql8.0
      Parameters:
        binlog_checksum: NONE
        binlog_format: ROW
        binlog_row_image: FULL
  RDSDBInstance:
    Type: 'AWS::RDS::DBInstance'
    Properties:
      DBInstanceIdentifier: zeroetl-mysql-source
      DBParameterGroupName: !Ref RDSDBParameterGroup
      Engine: mysql
      EngineVersion: 8.0.33
      MasterUsername: !Ref Username
      MasterUserPassword: !Ref Password
      DBInstanceClass: db.r5.large
      BackupRetentionPeriod: 1
      StorageType: gp2
      AllocatedStorage: '100'
  RSClusterParameterGroup:
    Type: 'AWS::Redshift::ClusterParameterGroup'
    Properties:
      ParameterGroupName: zeroetl-redshift-cluster-parameter-group
      Description: Enables case sensitivity
      ParameterGroupFamily: redshift-1.0
      Parameters:
        - ParameterName: enable_case_sensitive_identifier
          ParameterValue: 'true'
  RSCluster:
    Type: 'AWS::Redshift::Cluster'
    Properties:
      ClusterIdentifier: zeroetl-redshift-cluster
      ClusterParameterGroupName: !Ref RSClusterParameterGroup
      ClusterType: multi-node
      DBName: sqladmin
      MaintenanceTrackName: PREVIEW_2023
      Encrypted: true
      MasterUsername: !Ref RSUsername
      MasterUserPassword: !Ref RSPassword
      NodeType: ra3.xlplus
      NumberOfNodes: 2
      NamespaceResourcePolicy:
        Version: 2012-10-17
        Statement:
          - Effect: Allow
            Principal:
              Service: redshift.amazonaws.com
            Action: 'redshift:AuthorizeInboundIntegration'
            Condition:
              StringEquals:
                'aws:SourceArn': !GetAtt 
                  - RDSDBInstance
                  - DBInstanceArn
          - Effect: Allow
            Principal:
              AWS: !Join 
                - ':'
                - - arn
                  - !Ref 'AWS::Partition'
                  - iam
                  - ''
                  - !Ref 'AWS::AccountId'
                  - root
            Action: 'redshift:CreateInboundIntegration'
  Integration:
    Type: 'AWS::RDS::Integration'
    Properties:
      IntegrationName: zeroetl-integration-from-mysql-to-redshift
      SourceArn: !GetAtt 
        - RDSDBInstance
        - DBInstanceArn
      TargetArn: !GetAtt 
        - RSCluster
        - ClusterNamespaceArn
      KMSKeyId: !GetAtt 
        - kmsKey
        - Arn
      AdditionalEncryptionContext:
        integrationName: zeroetl-integration-from-mysql-to-redshift
Outputs:
  IntegrationCreateTime:
    Description: Integration Creation Time
    Value: !GetAtt 
      - Integration
      - CreateTime
  IntegrationARN:
    Description: Integration ARN
    Value: !Ref Integration
```

# AWS::RDS::Integration Tag
<a name="aws-properties-rds-integration-tag"></a>

Metadata assigned to an Amazon RDS resource consisting of a key-value pair.

For more information, see [Tagging Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) in the *Amazon RDS User Guide* or [Tagging Amazon Aurora and Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html) in the *Amazon Aurora User Guide*. 

## Syntax
<a name="aws-properties-rds-integration-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-integration-tag-syntax.json"></a>

```
{
  "[Key](#cfn-rds-integration-tag-key)" : String,
  "[Value](#cfn-rds-integration-tag-value)" : String
}
```

### YAML
<a name="aws-properties-rds-integration-tag-syntax.yaml"></a>

```
  [Key](#cfn-rds-integration-tag-key): String
  [Value](#cfn-rds-integration-tag-value): String
```

## Properties
<a name="aws-properties-rds-integration-tag-properties"></a>

`Key`  <a name="cfn-rds-integration-tag-key"></a>
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-rds-integration-tag-value"></a>
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-rds-integration-tag--examples"></a>

The following example specifies a tag for a zero-ETL integration.

### 
<a name="aws-properties-rds-integration-tag--examples--"></a>

#### JSON
<a name="aws-properties-rds-integration-tag--examples----json"></a>

```
"Tags" : [
   {
      "Key" : "keyname1",
      "Value" : "value1"
   },
   {
      "Key" : "keyname2",
      "Value" : "value2"
   }
]
```

#### YAML
<a name="aws-properties-rds-integration-tag--examples----yaml"></a>

```
Tags:
  - Key: keyname1
    Value: value1
  - Key: keyname2
    Value: value2
```

# AWS::RDS::OptionGroup
<a name="aws-resource-rds-optiongroup"></a>

The `AWS::RDS::OptionGroup` resource creates or updates an option group, to enable and configure features that are specific to a particular DB engine.

## Syntax
<a name="aws-resource-rds-optiongroup-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-rds-optiongroup-syntax.json"></a>

```
{
  "Type" : "AWS::RDS::OptionGroup",
  "Properties" : {
      "[EngineName](#cfn-rds-optiongroup-enginename)" : String,
      "[MajorEngineVersion](#cfn-rds-optiongroup-majorengineversion)" : String,
      "[OptionConfigurations](#cfn-rds-optiongroup-optionconfigurations)" : [ OptionConfiguration, ... ],
      "[OptionGroupDescription](#cfn-rds-optiongroup-optiongroupdescription)" : String,
      "[OptionGroupName](#cfn-rds-optiongroup-optiongroupname)" : String,
      "[Tags](#cfn-rds-optiongroup-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-rds-optiongroup-syntax.yaml"></a>

```
Type: AWS::RDS::OptionGroup
Properties:
  [EngineName](#cfn-rds-optiongroup-enginename): String
  [MajorEngineVersion](#cfn-rds-optiongroup-majorengineversion): String
  [OptionConfigurations](#cfn-rds-optiongroup-optionconfigurations): 
    - OptionConfiguration
  [OptionGroupDescription](#cfn-rds-optiongroup-optiongroupdescription): String
  [OptionGroupName](#cfn-rds-optiongroup-optiongroupname): String
  [Tags](#cfn-rds-optiongroup-tags): 
    - Tag
```

## Properties
<a name="aws-resource-rds-optiongroup-properties"></a>

`EngineName`  <a name="cfn-rds-optiongroup-enginename"></a>
Specifies the name of the engine that this option group should be associated with.  
Valid Values:   
+  `mariadb` 
+  `mysql` 
+  `oracle-ee` 
+  `oracle-ee-cdb` 
+  `oracle-se2` 
+  `oracle-se2-cdb` 
+  `postgres` 
+  `sqlserver-ee` 
+  `sqlserver-se` 
+  `sqlserver-ex` 
+  `sqlserver-web` 
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`MajorEngineVersion`  <a name="cfn-rds-optiongroup-majorengineversion"></a>
Specifies the major version of the engine that this option group should be associated with.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`OptionConfigurations`  <a name="cfn-rds-optiongroup-optionconfigurations"></a>
A list of all available options for an option group.  
*Required*: Conditional  
*Type*: Array of [OptionConfiguration](aws-properties-rds-optiongroup-optionconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`OptionGroupDescription`  <a name="cfn-rds-optiongroup-optiongroupdescription"></a>
The description of the option group.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`OptionGroupName`  <a name="cfn-rds-optiongroup-optiongroupname"></a>
The name of the option group to be created.  
Constraints:  
+ Must be 1 to 255 letters, numbers, or hyphens
+ First character must be a letter
+ Can't end with a hyphen or contain two consecutive hyphens
Example: `myoptiongroup`  
If you don't specify a value for `OptionGroupName` property, a name is automatically created for the option group.  
This value is stored as a lowercase string.
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-rds-optiongroup-tags"></a>
Tags to assign to the option group.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-rds-optiongroup-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-rds-optiongroup-return-values"></a>

### Ref
<a name="aws-resource-rds-optiongroup-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the name of the option group.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

## Examples
<a name="aws-resource-rds-optiongroup--examples"></a>



**Topics**
+ [Create an option group with multiple option configurations](#aws-resource-rds-optiongroup--examples--Create_an_option_group_with_multiple_option_configurations)
+ [Create an option group with multiple option settings](#aws-resource-rds-optiongroup--examples--Create_an_option_group_with_multiple_option_settings)
+ [Microsoft SQL Server native backup and restore option](#aws-resource-rds-optiongroup--examples--Microsoft_SQL_Server_native_backup_and_restore_option)

### Create an option group with multiple option configurations
<a name="aws-resource-rds-optiongroup--examples--Create_an_option_group_with_multiple_option_configurations"></a>

The following example creates an option group with two option configurations (`OEM` and `APEX`). For more information about these options, see [Adding options to Oracle DB instances](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.Oracle.Options.html) in the *Amazon RDS User Guide*.

#### JSON
<a name="aws-resource-rds-optiongroup--examples--Create_an_option_group_with_multiple_option_configurations--json"></a>

```
{
    "OracleOptionGroup": {
        "Type": "AWS::RDS::OptionGroup",
        "Properties": {
            "EngineName": "oracle-ee",
            "MajorEngineVersion": "12.1",
            "OptionGroupDescription": "A test option group",
            "OptionConfigurations": [
                {
                    "OptionName": "OEM",
                    "DBSecurityGroupMemberships": [
                        "default"
                    ],
                    "Port": "5500"
                },
                {
                    "OptionName": "APEX"
                }
            ]
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-optiongroup--examples--Create_an_option_group_with_multiple_option_configurations--yaml"></a>

```
--- 
OracleOptionGroup: 
  Type: AWS::RDS::OptionGroup
  Properties: 
    EngineName: oracle-ee
    MajorEngineVersion: "12.1"
    OptionConfigurations: 
      - 
        DBSecurityGroupMemberships: 
          - default
        OptionName: OEM
        Port: "5500"
      - 
        OptionName: APEX
    OptionGroupDescription: A test option group
```

### Create an option group with multiple option settings
<a name="aws-resource-rds-optiongroup--examples--Create_an_option_group_with_multiple_option_settings"></a>

The following example creates an option group that specifies two option settings for the `MEMCACHED` option. For more information about this option, see [ MySQL memcached support](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.MySQL.Options.memcached.html) in the *Amazon RDS User Guide*.

#### JSON
<a name="aws-resource-rds-optiongroup--examples--Create_an_option_group_with_multiple_option_settings--json"></a>

```
{
    "SQLOptionGroup": {
        "Type": "AWS::RDS::OptionGroup",
        "Properties": {
            "EngineName": "mysql",
            "MajorEngineVersion": "8.0",
            "OptionGroupDescription": "A test option group",
            "OptionConfigurations": [
                {
                    "OptionName": "MEMCACHED",
                    "VpcSecurityGroupMemberships": [
                        "sg-a1238db7"
                    ],
                    "Port": "1234",
                    "OptionSettings": [
                        {
                            "Name": "CHUNK_SIZE",
                            "Value": "32"
                        },
                        {
                            "Name": "BINDING_PROTOCOL",
                            "Value": "ascii"
                        }
                    ]
                }
            ]
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-optiongroup--examples--Create_an_option_group_with_multiple_option_settings--yaml"></a>

```
--- 
SQLOptionGroup: 
  Properties: 
    EngineName: mysql
    MajorEngineVersion: "8.0"
    OptionConfigurations: 
      - 
        OptionName: MEMCACHED
        OptionSettings: 
          - 
            Name: CHUNK_SIZE
            Value: "32"
          - 
            Name: BINDING_PROTOCOL
            Value: ascii
        Port: "1234"
        VpcSecurityGroupMemberships: 
          - sg-a1238db7
    OptionGroupDescription: "A test option group"
  Type: AWS::RDS::OptionGroup
```

### Microsoft SQL Server native backup and restore option
<a name="aws-resource-rds-optiongroup--examples--Microsoft_SQL_Server_native_backup_and_restore_option"></a>

The following example creates an option group that specifies the Microsoft SQL Server native backup and restore option. For more information about this option, see [ Support for Native Backup and Restore in SQL Server](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.SQLServer.Options.BackupRestore.html) in the *Amazon RDS User Guide*. 

#### JSON
<a name="aws-resource-rds-optiongroup--examples--Microsoft_SQL_Server_native_backup_and_restore_option--json"></a>

```
{
    "myOptionGroup": {
        "Type": "AWS::RDS::OptionGroup",
        "Properties": {
            "EngineName": "sqlserver-se",
            "MajorEngineVersion": "12.00",
            "OptionGroupDescription": "SQL Server Native Backup and Restore",
            "OptionConfigurations": [
                {
                    "OptionName": "SQLSERVER_BACKUP_RESTORE",
                    "OptionSettings": [
                        {
                            "Name": "IAM_ROLE_ARN",
                            "Value": "arn:aws:iam::333333333333333:role/service-role/sqlserverrestore"
                        }
                    ]
                }
            ]
        }
    }
}
```

#### YAML
<a name="aws-resource-rds-optiongroup--examples--Microsoft_SQL_Server_native_backup_and_restore_option--yaml"></a>

```
---                
myOptionGroup:
  Type: 'AWS::RDS::OptionGroup'
  Properties:
    EngineName: sqlserver-se
    MajorEngineVersion: '12.00'
    OptionGroupDescription: SQL Server Native Backup and Restore
    OptionConfigurations:
      - OptionName: SQLSERVER_BACKUP_RESTORE
        OptionSettings:
          - Name: IAM_ROLE_ARN
            Value: 'arn:aws:iam::333333333333333:role/service-role/sqlserverrestore'
```

# AWS::RDS::OptionGroup OptionConfiguration
<a name="aws-properties-rds-optiongroup-optionconfiguration"></a>

The `OptionConfiguration` property type specifies an individual option, and its settings, within an `AWS::RDS::OptionGroup` resource.

## Syntax
<a name="aws-properties-rds-optiongroup-optionconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-optiongroup-optionconfiguration-syntax.json"></a>

```
{
  "[DBSecurityGroupMemberships](#cfn-rds-optiongroup-optionconfiguration-dbsecuritygroupmemberships)" : [ String, ... ],
  "[OptionName](#cfn-rds-optiongroup-optionconfiguration-optionname)" : String,
  "[OptionSettings](#cfn-rds-optiongroup-optionconfiguration-optionsettings)" : [ OptionSetting, ... ],
  "[OptionVersion](#cfn-rds-optiongroup-optionconfiguration-optionversion)" : String,
  "[Port](#cfn-rds-optiongroup-optionconfiguration-port)" : Integer,
  "[VpcSecurityGroupMemberships](#cfn-rds-optiongroup-optionconfiguration-vpcsecuritygroupmemberships)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-rds-optiongroup-optionconfiguration-syntax.yaml"></a>

```
  [DBSecurityGroupMemberships](#cfn-rds-optiongroup-optionconfiguration-dbsecuritygroupmemberships): 
    - String
  [OptionName](#cfn-rds-optiongroup-optionconfiguration-optionname): String
  [OptionSettings](#cfn-rds-optiongroup-optionconfiguration-optionsettings): 
    - OptionSetting
  [OptionVersion](#cfn-rds-optiongroup-optionconfiguration-optionversion): String
  [Port](#cfn-rds-optiongroup-optionconfiguration-port): Integer
  [VpcSecurityGroupMemberships](#cfn-rds-optiongroup-optionconfiguration-vpcsecuritygroupmemberships): 
    - String
```

## Properties
<a name="aws-properties-rds-optiongroup-optionconfiguration-properties"></a>

`DBSecurityGroupMemberships`  <a name="cfn-rds-optiongroup-optionconfiguration-dbsecuritygroupmemberships"></a>
A list of DB security groups used for this option.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`OptionName`  <a name="cfn-rds-optiongroup-optionconfiguration-optionname"></a>
The configuration of options to include in a group.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`OptionSettings`  <a name="cfn-rds-optiongroup-optionconfiguration-optionsettings"></a>
The option settings to include in an option group.  
*Required*: No  
*Type*: Array of [OptionSetting](aws-properties-rds-optiongroup-optionsetting.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`OptionVersion`  <a name="cfn-rds-optiongroup-optionconfiguration-optionversion"></a>
The version for the option.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Port`  <a name="cfn-rds-optiongroup-optionconfiguration-port"></a>
The optional port for the option.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`VpcSecurityGroupMemberships`  <a name="cfn-rds-optiongroup-optionconfiguration-vpcsecuritygroupmemberships"></a>
A list of VPC security group names used for this option.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-rds-optiongroup-optionconfiguration--examples"></a>



### Specify an option configuration
<a name="aws-properties-rds-optiongroup-optionconfiguration--examples--Specify_an_option_configuration"></a>

The following example template uses `OptionName` and `OptionVersion` parameters when creating an `AWS::RDS::OptionGroup` resource. 

#### JSON
<a name="aws-properties-rds-optiongroup-optionconfiguration--examples--Specify_an_option_configuration--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "APEX has a dependency on XMLDB, so, there must be at least one XMLDB when there is an APEX",
    "Parameters": {
        "OptionName": {
            "Type": "String"
        },
        "OptionVersion": {
            "Type": "String"
        }
    },
    "Resources": {
        "myOptionGroup": {
            "Type": "AWS::RDS::OptionGroup",
            "Properties": {
                "EngineName": "oracle-ee",
                "MajorEngineVersion": "11.2",
                "OptionGroupDescription": "testing creating optionGroup with APEX version",
                "OptionConfigurations": [
                    {
                        "OptionName": "XMLDB"
                    },
                    {
                        "OptionName": {
                            "Ref": "OptionName"
                        },
                        "OptionVersion": {
                            "Ref": "OptionVersion"
                        }
                    }
                ]
            }
        }
    }
}
```

#### YAML
<a name="aws-properties-rds-optiongroup-optionconfiguration--examples--Specify_an_option_configuration--yaml"></a>

```
--- 
AWSTemplateFormatVersion: 2010-09-09
Description: "APEX has a dependency on XMLDB, so, there must be at least one XMLDB when there is an APEX"
Parameters: 
  OptionName: 
    Type: String
  OptionVersion: 
    Type: String
Resources: 
  myOptionGroup: 
    Properties: 
      EngineName: oracle-ee
      MajorEngineVersion: "11.2"
      OptionConfigurations: 
        - 
          OptionName: XMLDB
        - 
          OptionName: OptionName
          OptionVersion: OptionVersion
      OptionGroupDescription: "testing creating optionGroup with APEX version"
    Type: AWS::RDS::OptionGroup
```

# AWS::RDS::OptionGroup OptionSetting
<a name="aws-properties-rds-optiongroup-optionsetting"></a>

The `OptionSetting` property type specifies the value for an option within an `OptionSetting` property.

## Syntax
<a name="aws-properties-rds-optiongroup-optionsetting-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-optiongroup-optionsetting-syntax.json"></a>

```
{
  "[Name](#cfn-rds-optiongroup-optionsetting-name)" : String,
  "[Value](#cfn-rds-optiongroup-optionsetting-value)" : String
}
```

### YAML
<a name="aws-properties-rds-optiongroup-optionsetting-syntax.yaml"></a>

```
  [Name](#cfn-rds-optiongroup-optionsetting-name): String
  [Value](#cfn-rds-optiongroup-optionsetting-value): String
```

## Properties
<a name="aws-properties-rds-optiongroup-optionsetting-properties"></a>

`Name`  <a name="cfn-rds-optiongroup-optionsetting-name"></a>
The name of the option that has settings that you can set.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-rds-optiongroup-optionsetting-value"></a>
The current value of the option setting.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-rds-optiongroup-optionsetting--examples"></a>



### Enable ingress to a DB security group
<a name="aws-properties-rds-optiongroup-optionsetting--examples--Enable_ingress_to_a_DB_security_group"></a>

The following example creates an option group for the Oracle Enterprise Edition engine, version 19, and configures it with the Oracle Enterprise Manager option, specifying necessary option settings and a port.

#### JSON
<a name="aws-properties-rds-optiongroup-optionsetting--examples--Enable_ingress_to_a_DB_security_group--json"></a>

```
{
  "Resources": {
    "MyOptionGroup": {
      "Type": "AWS::RDS::OptionGroup",
      "Properties": {
        "EngineName": "oracle-ee",
        "MajorEngineVersion": "19",
        "OptionGroupDescription": "My Oracle OEM Option Group",
        "Options": [
          {
            "OptionName": "OEM",
            "Port": 5500,
            "OptionSettings": [
              {
                "Name": "OEM_HOST",
                "Value": "oem.example.com"
              },
              {
                "Name": "OEM_PORT",
                "Value": "5500"
              },
              {
                "Name": "SECURITY_GROUP_IDS",
                "Value": "sg-0123456789abcdef0"
              }
            ]
          }
        ],
        "Tags": [
          {
            "Key": "Name",
            "Value": "MyOptionGroup"
          }
        ]
      }
    }
  }
}
```

#### YAML
<a name="aws-properties-rds-optiongroup-optionsetting--examples--Enable_ingress_to_a_DB_security_group--yaml"></a>

```
Resources:
  MyOptionGroup:
    Type: AWS::RDS::OptionGroup
    Properties:
      EngineName: oracle-ee
      MajorEngineVersion: 19
      OptionGroupDescription: My Oracle OEM Option Group
      Options:
        - OptionName: OEM
          Port: 5500
          OptionSettings:
            - Name: OEM_HOST
              Value: oem.example.com
            - Name: OEM_PORT
              Value: 5500
            - Name: SECURITY_GROUP_IDS
              Value: sg-0123456789abcdef0
      Tags:
        - Key: Name
          Value: MyOptionGroup
```

# AWS::RDS::OptionGroup Tag
<a name="aws-properties-rds-optiongroup-tag"></a>

Metadata assigned to an Amazon RDS resource consisting of a key-value pair.

For more information, see [Tagging Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html) in the *Amazon RDS User Guide* or [Tagging Amazon Aurora and Amazon RDS resources](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Tagging.html) in the *Amazon Aurora User Guide*. 

## Syntax
<a name="aws-properties-rds-optiongroup-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-rds-optiongroup-tag-syntax.json"></a>

```
{
  "[Key](#cfn-rds-optiongroup-tag-key)" : String,
  "[Value](#cfn-rds-optiongroup-tag-value)" : String
}
```

### YAML
<a name="aws-properties-rds-optiongroup-tag-syntax.yaml"></a>

```
  [Key](#cfn-rds-optiongroup-tag-key): String
  [Value](#cfn-rds-optiongroup-tag-value): String
```

## Properties
<a name="aws-properties-rds-optiongroup-tag-properties"></a>

`Key`  <a name="cfn-rds-optiongroup-tag-key"></a>
A key is the required name of the tag. The string value can be from 1 to 128 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-rds-optiongroup-tag-value"></a>
A value is the optional value of the tag. The string value can be from 1 to 256 Unicode characters in length and can't be prefixed with `aws:` or `rds:`. The string can only contain only the set of Unicode letters, digits, white-space, '\$1', '.', ':', '/', '=', '\$1', '-', '@' (Java regex: "^([\$1\$1p\$1L\$1\$1\$1p\$1Z\$1\$1\$1p\$1N\$1\$1.:/=\$1\$1\$1-@]\$1)\$1").  
*Required*: No  
*Type*: String  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-rds-optiongroup-tag--examples"></a>

The following example specifies a tag for an option group.

### 
<a name="aws-properties-rds-optiongroup-tag--examples--"></a>

#### JSON
<a name="aws-properties-rds-optiongroup-tag--examples----json"></a>

```
"Tags" : [
   {
      "Key" : "keyname1",
      "Value" : "value1"
   },
   {
      "Key" : "keyname2",
      "Value" : "value2"
   }
]
```

#### YAML
<a name="aws-properties-rds-optiongroup-tag--examples----yaml"></a>

```
Tags:
  - Key: keyname1
    Value: value1
  - Key: keyname2
    Value: value2
```