Skip to content

FailoverDBCluster

Source: src/AWS/Neptune/FailoverDBCluster.ts

Runtime binding for the FailoverDBCluster operation (IAM action rds:FailoverDBCluster).

Forces a failover of the bound DBCluster — one of the read replicas is promoted to primary — for resilience testing or to move the writer to a specific instance. The cluster identifier is injected from the binding. Provide the implementation with Effect.provide(AWS.Neptune.FailoverDBClusterHttp).

// init — bind the operation to the cluster
const failoverDBCluster = yield* AWS.Neptune.FailoverDBCluster(cluster);
// runtime — promote a specific replica
yield* failoverDBCluster({
TargetDBInstanceIdentifier: replicaId,
});