Skip to content

FailoverShard

Source: src/AWS/MemoryDB/FailoverShard.ts

Runtime binding for the FailoverShard operation (IAM action memorydb:FailoverShard), scoped to one Cluster.

Fails over a shard’s primary node to a replica — designed for testing how your application behaves during a MemoryDB failover (chaos testing), not as a production remediation tool. Provide the implementation with Effect.provide(AWS.MemoryDB.FailoverShardHttp).

const failoverShard = yield* MemoryDB.FailoverShard(cluster);
const result = yield* failoverShard({ ShardName: "0001" });
// result.Cluster.Status → "updating"