| 1 | import * as polly from "@distilled.cloud/aws/polly"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import { makePollyHttpBinding } from "./BindingHttp.ts"; |
| 4 | import { SynthesizeSpeech } from "./SynthesizeSpeech.ts"; |
| 5 | |
| 6 | // polly:SynthesizeSpeech only supports resource-level IAM for lexicons; the |
| 7 | // synthesis call itself is account-wide, so the grant is Resource: ["*"] |
| 8 | // (which also covers any LexiconNames in the request). |
| 9 | export const SynthesizeSpeechHttp = Layer.effect( |
| 10 | SynthesizeSpeech, |
| 11 | makePollyHttpBinding({ |
| 12 | capability: "SynthesizeSpeech", |
| 13 | iamActions: ["polly:SynthesizeSpeech"], |
| 14 | operation: polly.synthesizeSpeech, |
| 15 | }), |
| 16 | ); |