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

main
ts 20 lines 691 Bytes
Raw
1 import * as DynamoDB from "@distilled.cloud/aws/dynamodb";
2 import * as Output from "alchemy/Output";
3 import * as Layer from "effect/Layer";
4 import { makeTableIamHttpBinding } from "./BindingHttp.ts";
5 import { ExecuteStatement } from "./ExecuteStatement.ts";
6
7 export const ExecuteStatementHttp = Layer.effect(
8 ExecuteStatement,
9 makeTableIamHttpBinding({
10 tag: "AWS.DynamoDB.ExecuteStatement",
11 operation: DynamoDB.executeStatement,
12 actions: [
13 "dynamodb:PartiQLDelete",
14 "dynamodb:PartiQLInsert",
15 "dynamodb:PartiQLSelect",
16 "dynamodb:PartiQLUpdate",
17 ],
18 resources: (table) => [table.tableArn, Output.interpolate`${table.tableArn}/index/*`],
19 }),
20 );