1import * as Lambda from "@/AWS/Lambda";
2import * as Duration from "effect/Duration";
3import * as Effect from "effect/Effect";
4import * as HttpServerResponse from "effect/http/HttpServerResponse";
5
6const main = import.meta.url;
7
8/**
9 * Minimal Lambda used as the Object Lambda transform target. The Object
10 * Lambda Access Point lifecycle only stores/validates the function ARN, so
11 * the handler body is irrelevant for the lifecycle tests.
12 */
13export class ObjectTransformFunction extends Lambda.Function<Lambda.Function>()(
14 "ObjectTransformFunction",
15) {}
16
17export const ObjectTransformFunctionLive = ObjectTransformFunction.make(
18 {
19 main,
20 timeout: Duration.seconds(30),
21 },
22 Effect.gen(function* () {
23 return {
24 fetch: Effect.gen(function* () {
25 return HttpServerResponse.text("ok");
26 }).pipe(Effect.orDie),
27 };
28 }),
29);
30
31export default ObjectTransformFunctionLive;