Skip to content

CreateDBClusterSnapshot

Source: src/AWS/DocDB/CreateDBClusterSnapshot.ts

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

Takes an on-demand snapshot of the bound DBCluster — e.g. a backup function that snapshots before a risky migration. The cluster identifier is injected from the binding; the grant covers both the cluster ARN and the account’s cluster-snapshot ARN space (both resources must be allowed for snapshot creation). Provide the implementation with Effect.provide(AWS.DocDB.CreateDBClusterSnapshotHttp).

// init — bind the operation to the cluster
const createDBClusterSnapshot =
yield* AWS.DocDB.CreateDBClusterSnapshot(cluster);
// runtime
const { DBClusterSnapshot } = yield* createDBClusterSnapshot({
DBClusterSnapshotIdentifier: `pre-migration-${runId}`,
});