Menu
Amazon Relational Database Service
Command Line Interface Reference (API Version 2014-10-31)

rds-promote-read-replica

The Amazon RDS Command Line Interface (RDS CLI) has been deprecated. Instead, use the AWS CLI for RDS. To learn how to download and use the AWS CLI, see AWS Command Line Interface User Guide. For RDS commands available in the AWS CLI, see AWS CLI Reference for Amazon RDS.

The AWS CLI does not currently support the DownloadCompleteDBLogFile REST API action. To download an entire log file at once, rather than in parts using the download-db-log-file-portion command, use the last published RDS CLI and the rds-download-db-logfile command.

Description

Creates a new DB instance from a Read Replica.

Note

We recommend that you enable automated backups on your Read Replica before promoting the Read Replica. This ensures that no backup is taken during the promotion process. Once the instance is promoted to a primary instance, backups are taken based on your backup settings.

Syntax

rds-promote-read-replica db-instance-identifier

[-r (--backup-retention-period) value ]

[-b (--preferred-backup-window) value ]

[General Options]

Options

Name Description Required

--db-instance-identifier value

The database instance identifier of the Read Replica to be promoted. The identifier consists of 1 to 63 alphanumeric characters or hyphens, is case insensitive, and is not case preserving.

This parameter is the default parameter and can be passed as the first value in the command and without a parameter name, for example: rds-promote-read-replica my-db-instance-identifier.

Yes

--backup-retention-period

-r

The number of days automated backups are retained. Setting this parameter to a positive number enables backups. Setting this parameter to 0 disables backups.

Type: Integer

Default: 1

Constraints: Must be a value from 0 to 35.

No

Output

The command returns the following information:

Note

Output values list the possible values returned by CLI commands. Not all values are returned for every call to a command. If a value is null or empty, it will not be included in the command output. For example, CLI commands to create or restore a DB instance will not return the Endpoint Address value because that value is null until the DB instance has finished being created or restored.

  • DBInstanceId—User-supplied database identifier; this is the unique key that identifies a DB instance

  • Created—When the instance was created, in UTC

  • Class—The compute and memory capacity of the DB instance

  • Engine—Name of the database engine used for this DB instance

  • Storage—Initially allocated storage size specified in GBs

  • Storage Type—The type of storage specified

  • Storage Encrypted—Indicates whether the DB instance is encrypted

  • KmsKeyId—If Storage Encrypted is true, the KMS key identifier for the encrypted DB instance

  • Resource Id—If Storage Encrypted is true, the region-unique, immutable identifier for the encrypted DB instance. This identifier is found in AWS CloudTrail log entries whenever the KMS key for the DB instance is accessed.

  • Master Username—The master username for the instance

  • Status—The current status of the instance. Valid values: available | backing-up | creating | deleted | deleting | failed | incompatible-restore | incompatible-parameters | modifying | rebooting | resetting-master-credentials | storage-full

  • Endpoint Address—Address of the DB instance

  • Port—Port used to connect to the DB instance

  • AZ—The instance's Availability Zone

  • SecondaryAZ—When the DB instance has multi-AZ support, this value is the secondary AZ.

  • Backup Retention—The number of days that automated backups are retained before deletion

  • PendingClass—The class to which the instance will be scaled during the next maintenance window, or to which it is currently being scaled if the --apply-immediately option was specified.

  • PendingCredentials—The (hidden) master user password that will be applied to the DB instance.

  • PendingVersion— The pending database engine version number. This column appears only in the --show-long view.

  • DB Name—Name of the initial database created when the instance was created or the Oracle System ID (SID) of the created DB instance (for the Oracle engine). This column appears only in the --show-long view

  • Maintenance Window—The period during which patching and instance modifications will be performed. This column appears only in the --show-long view.

  • Backup Window—The daily period during which automated backups are created. This column appears only in the --show-long view.

  • Version—The version number of the database engine.

  • Iops—The provisioned storage IOPS, expressed as I/O operations per second.

  • Auto Minor Version Upgrade—Indicates that minor version upgrades will be applied to the DB instance during the maintenance window. This column appears only in the --show-long view.

  • Name—DB security group name.

  • Status—Status of authorization. Valid values: authorizing | authorized | revoking

  • Group Name—Name of DB parameter group applied to.

  • Apply Status—Status of applying the DB parameter group. Valid values: in-sync | pending-reboot | applying

  • Multi-AZ—Indicates if this is a Multi-AZ DB instance.

  • EngineVersion—Database engine version number.

  • Replication State—The status of the Read Replica replication.

  • Change Date—The date of the last replication state change for the Read Replica.

Example

This example shows how to promote a Read Replica to be a DB instance.

Copy
PROMPT> rds-promote-read-replica mydbinstance

This example shows how to promote Read Replica instance and set backup retention to 1 day with the preferred backup window for the db to be 1 hour starting daily at 9:15 PM and ending at 10:15 AM

Copy
PROMPT> rds-promote-read-replica mydbinstance -r 1 -b 21:15-22:15