@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, 06:00 UTC

main
ts 24 lines 948 Bytes
Raw
1 import * as b2bi from "@distilled.cloud/aws/b2bi";
2 import * as Layer from "effect/Layer";
3 import { makeTransformerScopedHttpBinding } from "./BindingHttp.ts";
4 import { StartTransformerJob } from "./StartTransformerJob.ts";
5
6 export const StartTransformerJobHttp = Layer.effect(
7 StartTransformerJob,
8 makeTransformerScopedHttpBinding({
9 tag: "AWS.B2BI.StartTransformerJob",
10 operation: b2bi.startTransformerJob,
11 actions: ["b2bi:StartTransformerJob"],
12 // B2BI reads `inputFile` and writes `outputLocation` through the
13 // caller's session (verified live: "Access denied when getting object
14 // attributes from s3://…" without these). The buckets are request-time
15 // values, so the grant cannot be resource-scoped here.
16 companionStatements: [
17 {
18 Effect: "Allow",
19 Action: ["s3:GetObject", "s3:GetObjectAttributes", "s3:PutObject", "s3:ListBucket"],
20 Resource: ["*"],
21 },
22 ],
23 }),
24 );