Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

666 B
Raw Blame
import * as memorydb from "@distilled.cloud/aws/memorydb";
import * as Layer from "effect/Layer";
import {
  makeMemoryDBAccountHttpBinding,
  SNAPSHOT_ARN_WILDCARD,
} from "./BindingHttp.ts";
import { CopySnapshot } from "./CopySnapshot.ts";

export const CopySnapshotHttp = Layer.effect(
  CopySnapshot,
  makeMemoryDBAccountHttpBinding({
    tag: "AWS.MemoryDB.CopySnapshot",
    operation: memorydb.copySnapshot,
    // TagResource authorizes tag-on-create for the target snapshot.
    actions: ["memorydb:CopySnapshot", "memorydb:TagResource"],
    // Both the source and target snapshot names are runtime data.
    resources: [SNAPSHOT_ARN_WILDCARD],
  }),
);