1import * as Firehose from "@distilled.cloud/aws/firehose";
2import * as Layer from "effect/Layer";
3import { makeDeliveryStreamHttpBinding } from "./BindingHttp.ts";
4import { PutRecord } from "./PutRecord.ts";
5
6/**
7 * HTTP implementation of {@link PutRecord}. At deploy time it grants
8 * `firehose:PutRecord` on the bound delivery stream; at runtime it calls the
9 * Firehose API with the host Function's credentials. Provide this layer on
10 * the Function using the binding.
11 */
12export const PutRecordHttp = Layer.effect(
13 PutRecord,
14 makeDeliveryStreamHttpBinding({
15 tag: "AWS.Firehose.PutRecord",
16 operation: Firehose.putRecord,
17 actions: ["firehose:PutRecord"],
18 }),
19);