FailoverDBCluster - Amazon Relational Database Service


Forces a failover for a DB cluster.

A failover for a DB cluster promotes one of the Aurora Replicas (read-only instances) in the DB cluster to be the primary instance (the cluster writer).

Amazon Aurora will automatically fail over to an Aurora Replica, if one exists, when the primary instance fails. You can force a failover when you want to simulate a failure of a primary instance for testing. Because each instance in a DB cluster has its own endpoint address, you will need to clean up and re-establish any existing connections that use those endpoint addresses when the failover is complete.

For more information on Amazon Aurora, see What Is Amazon Aurora? in the Amazon Aurora User Guide.


This action only applies to Aurora DB clusters.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.


A DB cluster identifier to force a failover for. This parameter isn't case-sensitive.


  • Must match the identifier of an existing DBCluster.

Type: String

Required: Yes


The name of the instance to promote to the primary instance.

You must specify the instance identifier for an Aurora Replica in the DB cluster. For example, mydbcluster-replica1.

Type: String

Required: No

Response Elements

The following element is returned by the service.


Contains the details of an Amazon Aurora DB cluster.

This data type is used as a response element in the DescribeDBClusters, StopDBCluster, and StartDBCluster actions.

Type: DBCluster object


For information about the errors that are common to all actions, see Common Errors.


DBClusterIdentifier doesn't refer to an existing DB cluster.

HTTP Status Code: 404


The requested operation can't be performed while the cluster is in this state.

HTTP Status Code: 400


The DB instance isn't in a valid state.

HTTP Status Code: 400



This example illustrates one usage of FailoverDBCluster.

Sample Request ?Action=FailoverDBCluster &DBClusterIdentifier=sample-cluster &SignatureMethod=HmacSHA256 &SignatureVersion=4 &Version=2014-10-31 &X-Amz-Algorithm=AWS4-HMAC-SHA256 &X-Amz-Credential=AKIADQKE4SARGYLE/20150323/us-east-1/rds/aws4_request &X-Amz-Date=20150323T170232Z &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date &X-Amz-Signature=9be705fa28a68244d5072722463a29a322f9ef8eb58a63c40a6f6547174dec44

Sample Response

<FailoverDBClusterResponse xmlns=""> <FailoverDBClusterResult> <DBCluster> <Port>3306</Port> <LatestRestorableTime>2015-03-23T17:00:54.893Z</LatestRestorableTime> <Engine>aurora</Engine> <Status>available</Status> <BackupRetentionPeriod>7</BackupRetentionPeriod> <VpcSecurityGroups> <VpcSecurityGroupMembership> <Status>active</Status> <VpcSecurityGroupId>sg-922dc2fd</VpcSecurityGroupId> </VpcSecurityGroupMembership> </VpcSecurityGroups> <DBSubnetGroup>sample-group</DBSubnetGroup> <EngineVersion>5.6.10a</EngineVersion> <Endpoint></Endpoint> <DBClusterParameterGroup>default.aurora5.6</DBClusterParameterGroup> <DBClusterIdentifier>sample-cluster</DBClusterIdentifier> <PreferredBackupWindow>05:47-06:17</PreferredBackupWindow> <PreferredMaintenanceWindow>mon:10:16-mon:10:46</PreferredMaintenanceWindow> <EarliestRestorableTime>2015-03-04T23:08:59.159Z</EarliestRestorableTime> <DBClusterMembers> <DBClusterMember> <IsClusterWriter>false</IsClusterWriter> <DBInstanceIdentifier>sample-replica1</DBInstanceIdentifier> <DBClusterParameterGroupStatus>in-sync</DBClusterParameterGroupStatus> </DBClusterMember> <DBClusterMember> <IsClusterWriter>true</IsClusterWriter> <DBInstanceIdentifier>sample-primary</DBInstanceIdentifier> <DBClusterParameterGroupStatus>in-sync</DBClusterParameterGroupStatus> </DBClusterMember> </DBClusterMembers> <AllocatedStorage>1</AllocatedStorage> <MasterUsername>awsuser</MasterUsername> </DBCluster> </FailoverDBClusterResult> <ResponseMetadata> <RequestId>659c3dba-d17e-11e4-9fd0-35e9d88e2515</RequestId> </ResponseMetadata> </FailoverDBClusterResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: