1import * as polly from "@distilled.cloud/aws/polly";
2import * as Layer from "effect/Layer";
3import { makePollyHttpBinding } from "./BindingHttp.ts";
4import { 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).
9export const SynthesizeSpeechHttp = Layer.effect(
10 SynthesizeSpeech,
11 makePollyHttpBinding({
12 capability: "SynthesizeSpeech",
13 iamActions: ["polly:SynthesizeSpeech"],
14 operation: polly.synthesizeSpeech,
15 }),
16);