@effect-aws/client-lambda 1.4.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @effect-aws/client-lambda
2
2
 
3
+ ## 1.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#75](https://github.com/floydspace/effect-aws/pull/75) [`9dc170d`](https://github.com/floydspace/effect-aws/commit/9dc170d975c04888bbc7ca7b241b4b5265668fb5) Thanks [@godu](https://github.com/godu)! - export the HttpHandlerOptions type
8
+
9
+ ## 1.5.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`e540420`](https://github.com/floydspace/effect-aws/commit/e5404208c2438e1e1546637a8edbbdc1c9468850) Thanks [@floydspace](https://github.com/floydspace)! - integrate aws-sdk abort signal with effect interruption
14
+
3
15
  ## 1.4.0
4
16
 
5
17
  ### Minor Changes
package/README.md CHANGED
@@ -1 +1,88 @@
1
- # replace this
1
+ # @effect-aws/client-lambda
2
+
3
+ [![npm version](https://img.shields.io/npm/v/%40effect-aws%2Fclient-lambda?color=brightgreen&label=npm%20package)](https://www.npmjs.com/package/@effect-aws/client-lambda)
4
+ [![npm downloads](https://img.shields.io/npm/dm/%40effect-aws%2Fclient-lambda)](https://www.npmjs.com/package/@effect-aws/client-lambda)
5
+
6
+ ## Installation
7
+
8
+ ```bash
9
+ npm install --save @effect-aws/client-lambda
10
+ ```
11
+
12
+ ## Usage
13
+
14
+ With default LambdaClient instance:
15
+
16
+ ```typescript
17
+ import {
18
+ LambdaService,
19
+ DefaultLambdaServiceLayer,
20
+ } from "@effect-aws/client-lambda";
21
+
22
+ const program = LambdaService.invoke(args);
23
+
24
+ const result = pipe(
25
+ program,
26
+ Effect.provide(DefaultLambdaServiceLayer),
27
+ Effect.runPromise,
28
+ );
29
+ ```
30
+
31
+ With custom LambdaClient instance:
32
+
33
+ ```typescript
34
+ import {
35
+ LambdaService,
36
+ BaseLambdaServiceLayer,
37
+ LambdaClientInstance,
38
+ } from "@effect-aws/client-lambda";
39
+
40
+ const program = LambdaService.invoke(args);
41
+
42
+ const LambdaClientInstanceLayer = Layer.succeed(
43
+ LambdaClientInstance,
44
+ new LambdaClient({ region: "eu-central-1" }),
45
+ );
46
+
47
+ const result = await pipe(
48
+ program,
49
+ Effect.provide(BaseLambdaServiceLayer),
50
+ Effect.provide(LambdaClientInstanceLayer),
51
+ Effect.runPromise,
52
+ );
53
+ ```
54
+
55
+ With custom LambdaClient configuration:
56
+
57
+ ```typescript
58
+ import {
59
+ LambdaService,
60
+ BaseLambdaServiceLayer,
61
+ DefaultLambdaClientConfigLayer,
62
+ LambdaClientInstance,
63
+ LambdaClientInstanceConfig,
64
+ } from "@effect-aws/client-lambda";
65
+
66
+ const program = LambdaService.invoke(args);
67
+
68
+ const LambdaClientInstanceLayer = Layer.provide(
69
+ Layer.effect(
70
+ LambdaClientInstance,
71
+ LambdaClientInstanceConfig.pipe(
72
+ Effect.map(
73
+ (config) => new LambdaClient({ ...config, region: "eu-central-1" }),
74
+ ),
75
+ ),
76
+ ),
77
+ DefaultLambdaClientConfigLayer,
78
+ );
79
+
80
+ const result = await pipe(
81
+ program,
82
+ Effect.provide(BaseLambdaServiceLayer),
83
+ Effect.provide(LambdaClientInstanceLayer),
84
+ Effect.runPromiseExit,
85
+ );
86
+ ```
87
+
88
+ or map over `DefaultLambdaClientConfigLayer` layer context and update the configuration...