CreateSnapshot
Source:
src/AWS/EC2/CreateSnapshot.ts
Runtime binding for the CreateSnapshot operation scoped to the bound
Volume (IAM actions ec2:CreateSnapshot + ec2:CreateTags on the
volume ARN and the region-wide snapshot wildcard — snapshot creation
authorizes against both the source volume and the new snapshot).
Creates a point-in-time EBS snapshot of the volume — e.g. a Lambda that
takes an application-consistent backup before a risky migration. The
snapshot is created pending and completes asynchronously. Provide the
implementation with Effect.provide(AWS.EC2.CreateSnapshotHttp).
Volume Backups
Section titled “Volume Backups”// init — bind the operation to the volumeconst createSnapshot = yield* AWS.EC2.CreateSnapshot(volume);
// runtime — take a point-in-time backupconst snapshot = yield* createSnapshot({ Description: "pre-migration backup",});console.log(snapshot.SnapshotId, snapshot.State);