@effect-aws/client-sqs
Installation
npm install --save @effect-aws/client-sqs
Usage
With default SQSClient instance:
import { SQS } from "@effect-aws/client-sqs";
const program = SQS.sendMessage(args);
const result = pipe(
program,
Effect.provide(SQS.defaultLayer),
Effect.runPromise,
);
With custom SQSClient instance:
import { SQS } from "@effect-aws/client-sqs";
const program = SQS.sendMessage(args);
const result = await pipe(
program,
Effect.provide(
SQS.baseLayer(() => new SQSClient({ region: "eu-central-1" })),
),
Effect.runPromise,
);
With custom SQSClient configuration:
import { SQS } from "@effect-aws/client-sqs";
const program = SQS.sendMessage(args);
const result = await pipe(
program,
Effect.provide(SQS.layer({ region: "eu-central-1" })),
Effect.runPromiseExit,
);
or use SQS.baseLayer((default) => new SQSClient({ ...default, region: "eu-central-1" }))