| 1 | import * as b2bi from "@distilled.cloud/aws/b2bi"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makeB2biAccountHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { GenerateMapping } from "./GenerateMapping.ts"; |
| 5 | |
| 6 | export const GenerateMappingHttp = Layer.effect( |
| 7 | GenerateMapping, |
| 8 | makeB2biAccountHttpBinding({ |
| 9 | tag: "AWS.B2BI.GenerateMapping", |
| 10 | operation: b2bi.generateMapping, |
| 11 | // GenerateMapping invokes Amazon Bedrock through the caller's session |
| 12 | // (verified live: "Access denied when invoking Bedrock's InvokeModel |
| 13 | // API" without the grant). The account must also have Bedrock model |
| 14 | // access enabled for the mapping model in the region. |
| 15 | actions: ["b2bi:GenerateMapping", "bedrock:InvokeModel"], |
| 16 | }), |
| 17 | ); |