@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 17 lines 681 Bytes
Raw
1 import * as ec2 from "@distilled.cloud/aws/ec2";
2 import * as Layer from "effect/Layer";
3 import { makeVolumeHttpBinding } from "./BindingHttp.ts";
4 import { CreateSnapshot } from "./CreateSnapshot.ts";
5
6 export const CreateSnapshotHttp = Layer.effect(
7 CreateSnapshot,
8 makeVolumeHttpBinding({
9 tag: "AWS.EC2.CreateSnapshot",
10 operation: ec2.createSnapshot,
11 // `ec2:CreateTags` covers `TagSpecifications` on the new snapshot.
12 actions: ["ec2:CreateSnapshot", "ec2:CreateTags"],
13 // Snapshot creation authorizes against both the source volume and the
14 // new snapshot; snapshot ARNs carry no account id.
15 extraResources: ["arn:aws:ec2:*::snapshot/*"],
16 }),
17 );