@effect-aws/client-lambda
TypeScript icon, indicating that this package has built-in type declarations

1.6.0 • Public • Published

@effect-aws/client-lambda

npm version npm downloads

Installation

npm install --save @effect-aws/client-lambda

Usage

With default LambdaClient instance:

import { Lambda } from "@effect-aws/client-lambda";

const program = Lambda.invoke(args);

const result = pipe(
  program,
  Effect.provide(Lambda.defaultLayer),
  Effect.runPromise,
);

With custom LambdaClient instance:

import { Lambda } from "@effect-aws/client-lambda";

const program = Lambda.invoke(args);

const result = await pipe(
  program,
  Effect.provide(
    Lambda.baseLayer(() => new LambdaClient({ region: "eu-central-1" })),
  ),
  Effect.runPromise,
);

With custom LambdaClient configuration:

import { Lambda } from "@effect-aws/client-lambda";

const program = Lambda.invoke(args);

const result = await pipe(
  program,
  Effect.provide(Lambda.layer({ region: "eu-central-1" })),
  Effect.runPromiseExit,
);

or use Lambda.baseLayer((default) => new LambdaClient({ ...default, region: "eu-central-1" }))

Readme

Keywords

none

Package Sidebar

Install

npm i @effect-aws/client-lambda

Weekly Downloads

96

Version

1.6.0

License

MIT

Unpacked Size

256 kB

Total Files

22

Last publish

Collaborators

  • f1oyd