@beesolve/lambda-bun-runtime 1.0.6 → 1.2.0
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/.jsii +8603 -0
- package/API.md +1584 -0
- package/LICENSE +0 -2
- package/README.md +1 -1
- package/bun.lock +1329 -0
- package/command/buildLayer.sh +25 -0
- package/command/runtime.ts +927 -0
- package/lib/index.d.ts +25 -0
- package/lib/index.js +47 -0
- package/package.json +77 -25
- package/bun-lambda-layer.zip +0 -0
- package/dist/cdk.d.ts +0 -25
- package/dist/cdk.js +0 -4
package/API.md
ADDED
|
@@ -0,0 +1,1584 @@
|
|
|
1
|
+
# API Reference <a name="API Reference" id="api-reference"></a>
|
|
2
|
+
|
|
3
|
+
## Constructs <a name="Constructs" id="Constructs"></a>
|
|
4
|
+
|
|
5
|
+
### BunFunction <a name="BunFunction" id="@beesolve/lambda-bun-runtime.BunFunction"></a>
|
|
6
|
+
|
|
7
|
+
#### Initializers <a name="Initializers" id="@beesolve/lambda-bun-runtime.BunFunction.Initializer"></a>
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
import { BunFunction } from '@beesolve/lambda-bun-runtime'
|
|
11
|
+
|
|
12
|
+
new BunFunction(scope: Construct, id: string, props: BunFunctionProps)
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
| **Name** | **Type** | **Description** |
|
|
16
|
+
| --- | --- | --- |
|
|
17
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
|
|
18
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
|
|
19
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.Initializer.parameter.props">props</a></code> | <code><a href="#@beesolve/lambda-bun-runtime.BunFunctionProps">BunFunctionProps</a></code> | *No description.* |
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
##### `scope`<sup>Required</sup> <a name="scope" id="@beesolve/lambda-bun-runtime.BunFunction.Initializer.parameter.scope"></a>
|
|
24
|
+
|
|
25
|
+
- *Type:* constructs.Construct
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
##### `id`<sup>Required</sup> <a name="id" id="@beesolve/lambda-bun-runtime.BunFunction.Initializer.parameter.id"></a>
|
|
30
|
+
|
|
31
|
+
- *Type:* string
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
##### `props`<sup>Required</sup> <a name="props" id="@beesolve/lambda-bun-runtime.BunFunction.Initializer.parameter.props"></a>
|
|
36
|
+
|
|
37
|
+
- *Type:* <a href="#@beesolve/lambda-bun-runtime.BunFunctionProps">BunFunctionProps</a>
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
42
|
+
|
|
43
|
+
| **Name** | **Description** |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.toString">toString</a></code> | Returns a string representation of this construct. |
|
|
46
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.applyRemovalPolicy">applyRemovalPolicy</a></code> | Apply the given removal policy to this resource. |
|
|
47
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.addEventSource">addEventSource</a></code> | Adds an event source to this function. |
|
|
48
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.addEventSourceMapping">addEventSourceMapping</a></code> | Adds an event source that maps to this AWS Lambda function. |
|
|
49
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.addFunctionUrl">addFunctionUrl</a></code> | Adds a url to this lambda function. |
|
|
50
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.addPermission">addPermission</a></code> | Adds a permission to the Lambda resource policy. |
|
|
51
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.addToRolePolicy">addToRolePolicy</a></code> | Adds a statement to the IAM role assumed by the instance. |
|
|
52
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.configureAsyncInvoke">configureAsyncInvoke</a></code> | Configures options for asynchronous invocation. |
|
|
53
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.considerWarningOnInvokeFunctionPermissions">considerWarningOnInvokeFunctionPermissions</a></code> | A warning will be added to functions under the following conditions: - permissions that include `lambda:InvokeFunction` are added to the unqualified function. |
|
|
54
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.grantInvoke">grantInvoke</a></code> | Grant the given identity permissions to invoke this Lambda. |
|
|
55
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.grantInvokeCompositePrincipal">grantInvokeCompositePrincipal</a></code> | Grant multiple principals the ability to invoke this Lambda via CompositePrincipal. |
|
|
56
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.grantInvokeLatestVersion">grantInvokeLatestVersion</a></code> | Grant the given identity permissions to invoke the $LATEST version or unqualified version of this Lambda. |
|
|
57
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.grantInvokeUrl">grantInvokeUrl</a></code> | Grant the given identity permissions to invoke this Lambda Function URL. |
|
|
58
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.grantInvokeVersion">grantInvokeVersion</a></code> | Grant the given identity permissions to invoke the given version of this Lambda. |
|
|
59
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.metric">metric</a></code> | Return the given named metric for this Function. |
|
|
60
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.metricDuration">metricDuration</a></code> | How long execution of this Lambda takes. |
|
|
61
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.metricErrors">metricErrors</a></code> | How many invocations of this Lambda fail. |
|
|
62
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.metricInvocations">metricInvocations</a></code> | How often this Lambda is invoked. |
|
|
63
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.metricThrottles">metricThrottles</a></code> | How often this Lambda is throttled. |
|
|
64
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.addAlias">addAlias</a></code> | Defines an alias for this function. |
|
|
65
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.addEnvironment">addEnvironment</a></code> | Adds an environment variable to this Lambda function. |
|
|
66
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.addLayers">addLayers</a></code> | Adds one or more Lambda Layers to this Lambda function. |
|
|
67
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.invalidateVersionBasedOn">invalidateVersionBasedOn</a></code> | Mix additional information into the hash of the Version object. |
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
##### `toString` <a name="toString" id="@beesolve/lambda-bun-runtime.BunFunction.toString"></a>
|
|
72
|
+
|
|
73
|
+
```typescript
|
|
74
|
+
public toString(): string
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Returns a string representation of this construct.
|
|
78
|
+
|
|
79
|
+
##### `applyRemovalPolicy` <a name="applyRemovalPolicy" id="@beesolve/lambda-bun-runtime.BunFunction.applyRemovalPolicy"></a>
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
public applyRemovalPolicy(policy: RemovalPolicy): void
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Apply the given removal policy to this resource.
|
|
86
|
+
|
|
87
|
+
The Removal Policy controls what happens to this resource when it stops
|
|
88
|
+
being managed by CloudFormation, either because you've removed it from the
|
|
89
|
+
CDK application or because you've made a change that requires the resource
|
|
90
|
+
to be replaced.
|
|
91
|
+
|
|
92
|
+
The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
|
|
93
|
+
account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
|
|
94
|
+
|
|
95
|
+
###### `policy`<sup>Required</sup> <a name="policy" id="@beesolve/lambda-bun-runtime.BunFunction.applyRemovalPolicy.parameter.policy"></a>
|
|
96
|
+
|
|
97
|
+
- *Type:* aws-cdk-lib.RemovalPolicy
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
##### `addEventSource` <a name="addEventSource" id="@beesolve/lambda-bun-runtime.BunFunction.addEventSource"></a>
|
|
102
|
+
|
|
103
|
+
```typescript
|
|
104
|
+
public addEventSource(source: IEventSource): void
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Adds an event source to this function.
|
|
108
|
+
|
|
109
|
+
Event sources are implemented in the aws-cdk-lib/aws-lambda-event-sources module.
|
|
110
|
+
|
|
111
|
+
The following example adds an SQS Queue as an event source:
|
|
112
|
+
```
|
|
113
|
+
import { SqsEventSource } from 'aws-cdk-lib/aws-lambda-event-sources';
|
|
114
|
+
myFunction.addEventSource(new SqsEventSource(myQueue));
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
###### `source`<sup>Required</sup> <a name="source" id="@beesolve/lambda-bun-runtime.BunFunction.addEventSource.parameter.source"></a>
|
|
118
|
+
|
|
119
|
+
- *Type:* aws-cdk-lib.aws_lambda.IEventSource
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
##### `addEventSourceMapping` <a name="addEventSourceMapping" id="@beesolve/lambda-bun-runtime.BunFunction.addEventSourceMapping"></a>
|
|
124
|
+
|
|
125
|
+
```typescript
|
|
126
|
+
public addEventSourceMapping(id: string, options: EventSourceMappingOptions): EventSourceMapping
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Adds an event source that maps to this AWS Lambda function.
|
|
130
|
+
|
|
131
|
+
###### `id`<sup>Required</sup> <a name="id" id="@beesolve/lambda-bun-runtime.BunFunction.addEventSourceMapping.parameter.id"></a>
|
|
132
|
+
|
|
133
|
+
- *Type:* string
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
###### `options`<sup>Required</sup> <a name="options" id="@beesolve/lambda-bun-runtime.BunFunction.addEventSourceMapping.parameter.options"></a>
|
|
138
|
+
|
|
139
|
+
- *Type:* aws-cdk-lib.aws_lambda.EventSourceMappingOptions
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
##### `addFunctionUrl` <a name="addFunctionUrl" id="@beesolve/lambda-bun-runtime.BunFunction.addFunctionUrl"></a>
|
|
144
|
+
|
|
145
|
+
```typescript
|
|
146
|
+
public addFunctionUrl(options?: FunctionUrlOptions): FunctionUrl
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Adds a url to this lambda function.
|
|
150
|
+
|
|
151
|
+
###### `options`<sup>Optional</sup> <a name="options" id="@beesolve/lambda-bun-runtime.BunFunction.addFunctionUrl.parameter.options"></a>
|
|
152
|
+
|
|
153
|
+
- *Type:* aws-cdk-lib.aws_lambda.FunctionUrlOptions
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
##### `addPermission` <a name="addPermission" id="@beesolve/lambda-bun-runtime.BunFunction.addPermission"></a>
|
|
158
|
+
|
|
159
|
+
```typescript
|
|
160
|
+
public addPermission(id: string, permission: Permission): void
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Adds a permission to the Lambda resource policy.
|
|
164
|
+
|
|
165
|
+
> [Permission for details.](Permission for details.)
|
|
166
|
+
|
|
167
|
+
###### `id`<sup>Required</sup> <a name="id" id="@beesolve/lambda-bun-runtime.BunFunction.addPermission.parameter.id"></a>
|
|
168
|
+
|
|
169
|
+
- *Type:* string
|
|
170
|
+
|
|
171
|
+
The id for the permission construct.
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
###### `permission`<sup>Required</sup> <a name="permission" id="@beesolve/lambda-bun-runtime.BunFunction.addPermission.parameter.permission"></a>
|
|
176
|
+
|
|
177
|
+
- *Type:* aws-cdk-lib.aws_lambda.Permission
|
|
178
|
+
|
|
179
|
+
The permission to grant to this Lambda function.
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
##### `addToRolePolicy` <a name="addToRolePolicy" id="@beesolve/lambda-bun-runtime.BunFunction.addToRolePolicy"></a>
|
|
184
|
+
|
|
185
|
+
```typescript
|
|
186
|
+
public addToRolePolicy(statement: PolicyStatement): void
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Adds a statement to the IAM role assumed by the instance.
|
|
190
|
+
|
|
191
|
+
###### `statement`<sup>Required</sup> <a name="statement" id="@beesolve/lambda-bun-runtime.BunFunction.addToRolePolicy.parameter.statement"></a>
|
|
192
|
+
|
|
193
|
+
- *Type:* aws-cdk-lib.aws_iam.PolicyStatement
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
##### `configureAsyncInvoke` <a name="configureAsyncInvoke" id="@beesolve/lambda-bun-runtime.BunFunction.configureAsyncInvoke"></a>
|
|
198
|
+
|
|
199
|
+
```typescript
|
|
200
|
+
public configureAsyncInvoke(options: EventInvokeConfigOptions): void
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Configures options for asynchronous invocation.
|
|
204
|
+
|
|
205
|
+
###### `options`<sup>Required</sup> <a name="options" id="@beesolve/lambda-bun-runtime.BunFunction.configureAsyncInvoke.parameter.options"></a>
|
|
206
|
+
|
|
207
|
+
- *Type:* aws-cdk-lib.aws_lambda.EventInvokeConfigOptions
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
##### `considerWarningOnInvokeFunctionPermissions` <a name="considerWarningOnInvokeFunctionPermissions" id="@beesolve/lambda-bun-runtime.BunFunction.considerWarningOnInvokeFunctionPermissions"></a>
|
|
212
|
+
|
|
213
|
+
```typescript
|
|
214
|
+
public considerWarningOnInvokeFunctionPermissions(scope: Construct, action: string): void
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
A warning will be added to functions under the following conditions: - permissions that include `lambda:InvokeFunction` are added to the unqualified function.
|
|
218
|
+
|
|
219
|
+
function.currentVersion is invoked before or after the permission is created.
|
|
220
|
+
|
|
221
|
+
This applies only to permissions on Lambda functions, not versions or aliases.
|
|
222
|
+
This function is overridden as a noOp for QualifiedFunctionBase.
|
|
223
|
+
|
|
224
|
+
###### `scope`<sup>Required</sup> <a name="scope" id="@beesolve/lambda-bun-runtime.BunFunction.considerWarningOnInvokeFunctionPermissions.parameter.scope"></a>
|
|
225
|
+
|
|
226
|
+
- *Type:* constructs.Construct
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
###### `action`<sup>Required</sup> <a name="action" id="@beesolve/lambda-bun-runtime.BunFunction.considerWarningOnInvokeFunctionPermissions.parameter.action"></a>
|
|
231
|
+
|
|
232
|
+
- *Type:* string
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
##### `grantInvoke` <a name="grantInvoke" id="@beesolve/lambda-bun-runtime.BunFunction.grantInvoke"></a>
|
|
237
|
+
|
|
238
|
+
```typescript
|
|
239
|
+
public grantInvoke(grantee: IGrantable): Grant
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Grant the given identity permissions to invoke this Lambda.
|
|
243
|
+
|
|
244
|
+
###### `grantee`<sup>Required</sup> <a name="grantee" id="@beesolve/lambda-bun-runtime.BunFunction.grantInvoke.parameter.grantee"></a>
|
|
245
|
+
|
|
246
|
+
- *Type:* aws-cdk-lib.aws_iam.IGrantable
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
##### `grantInvokeCompositePrincipal` <a name="grantInvokeCompositePrincipal" id="@beesolve/lambda-bun-runtime.BunFunction.grantInvokeCompositePrincipal"></a>
|
|
251
|
+
|
|
252
|
+
```typescript
|
|
253
|
+
public grantInvokeCompositePrincipal(compositePrincipal: CompositePrincipal): Grant[]
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Grant multiple principals the ability to invoke this Lambda via CompositePrincipal.
|
|
257
|
+
|
|
258
|
+
###### `compositePrincipal`<sup>Required</sup> <a name="compositePrincipal" id="@beesolve/lambda-bun-runtime.BunFunction.grantInvokeCompositePrincipal.parameter.compositePrincipal"></a>
|
|
259
|
+
|
|
260
|
+
- *Type:* aws-cdk-lib.aws_iam.CompositePrincipal
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
##### `grantInvokeLatestVersion` <a name="grantInvokeLatestVersion" id="@beesolve/lambda-bun-runtime.BunFunction.grantInvokeLatestVersion"></a>
|
|
265
|
+
|
|
266
|
+
```typescript
|
|
267
|
+
public grantInvokeLatestVersion(grantee: IGrantable): Grant
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
Grant the given identity permissions to invoke the $LATEST version or unqualified version of this Lambda.
|
|
271
|
+
|
|
272
|
+
###### `grantee`<sup>Required</sup> <a name="grantee" id="@beesolve/lambda-bun-runtime.BunFunction.grantInvokeLatestVersion.parameter.grantee"></a>
|
|
273
|
+
|
|
274
|
+
- *Type:* aws-cdk-lib.aws_iam.IGrantable
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
##### `grantInvokeUrl` <a name="grantInvokeUrl" id="@beesolve/lambda-bun-runtime.BunFunction.grantInvokeUrl"></a>
|
|
279
|
+
|
|
280
|
+
```typescript
|
|
281
|
+
public grantInvokeUrl(grantee: IGrantable): Grant
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
Grant the given identity permissions to invoke this Lambda Function URL.
|
|
285
|
+
|
|
286
|
+
###### `grantee`<sup>Required</sup> <a name="grantee" id="@beesolve/lambda-bun-runtime.BunFunction.grantInvokeUrl.parameter.grantee"></a>
|
|
287
|
+
|
|
288
|
+
- *Type:* aws-cdk-lib.aws_iam.IGrantable
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
##### `grantInvokeVersion` <a name="grantInvokeVersion" id="@beesolve/lambda-bun-runtime.BunFunction.grantInvokeVersion"></a>
|
|
293
|
+
|
|
294
|
+
```typescript
|
|
295
|
+
public grantInvokeVersion(grantee: IGrantable, version: IVersion): Grant
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
Grant the given identity permissions to invoke the given version of this Lambda.
|
|
299
|
+
|
|
300
|
+
###### `grantee`<sup>Required</sup> <a name="grantee" id="@beesolve/lambda-bun-runtime.BunFunction.grantInvokeVersion.parameter.grantee"></a>
|
|
301
|
+
|
|
302
|
+
- *Type:* aws-cdk-lib.aws_iam.IGrantable
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
###### `version`<sup>Required</sup> <a name="version" id="@beesolve/lambda-bun-runtime.BunFunction.grantInvokeVersion.parameter.version"></a>
|
|
307
|
+
|
|
308
|
+
- *Type:* aws-cdk-lib.aws_lambda.IVersion
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
##### `metric` <a name="metric" id="@beesolve/lambda-bun-runtime.BunFunction.metric"></a>
|
|
313
|
+
|
|
314
|
+
```typescript
|
|
315
|
+
public metric(metricName: string, props?: MetricOptions): Metric
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
Return the given named metric for this Function.
|
|
319
|
+
|
|
320
|
+
###### `metricName`<sup>Required</sup> <a name="metricName" id="@beesolve/lambda-bun-runtime.BunFunction.metric.parameter.metricName"></a>
|
|
321
|
+
|
|
322
|
+
- *Type:* string
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
###### `props`<sup>Optional</sup> <a name="props" id="@beesolve/lambda-bun-runtime.BunFunction.metric.parameter.props"></a>
|
|
327
|
+
|
|
328
|
+
- *Type:* aws-cdk-lib.aws_cloudwatch.MetricOptions
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
##### `metricDuration` <a name="metricDuration" id="@beesolve/lambda-bun-runtime.BunFunction.metricDuration"></a>
|
|
333
|
+
|
|
334
|
+
```typescript
|
|
335
|
+
public metricDuration(props?: MetricOptions): Metric
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
How long execution of this Lambda takes.
|
|
339
|
+
|
|
340
|
+
Average over 5 minutes
|
|
341
|
+
|
|
342
|
+
###### `props`<sup>Optional</sup> <a name="props" id="@beesolve/lambda-bun-runtime.BunFunction.metricDuration.parameter.props"></a>
|
|
343
|
+
|
|
344
|
+
- *Type:* aws-cdk-lib.aws_cloudwatch.MetricOptions
|
|
345
|
+
|
|
346
|
+
---
|
|
347
|
+
|
|
348
|
+
##### `metricErrors` <a name="metricErrors" id="@beesolve/lambda-bun-runtime.BunFunction.metricErrors"></a>
|
|
349
|
+
|
|
350
|
+
```typescript
|
|
351
|
+
public metricErrors(props?: MetricOptions): Metric
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
How many invocations of this Lambda fail.
|
|
355
|
+
|
|
356
|
+
Sum over 5 minutes
|
|
357
|
+
|
|
358
|
+
###### `props`<sup>Optional</sup> <a name="props" id="@beesolve/lambda-bun-runtime.BunFunction.metricErrors.parameter.props"></a>
|
|
359
|
+
|
|
360
|
+
- *Type:* aws-cdk-lib.aws_cloudwatch.MetricOptions
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
##### `metricInvocations` <a name="metricInvocations" id="@beesolve/lambda-bun-runtime.BunFunction.metricInvocations"></a>
|
|
365
|
+
|
|
366
|
+
```typescript
|
|
367
|
+
public metricInvocations(props?: MetricOptions): Metric
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
How often this Lambda is invoked.
|
|
371
|
+
|
|
372
|
+
Sum over 5 minutes
|
|
373
|
+
|
|
374
|
+
###### `props`<sup>Optional</sup> <a name="props" id="@beesolve/lambda-bun-runtime.BunFunction.metricInvocations.parameter.props"></a>
|
|
375
|
+
|
|
376
|
+
- *Type:* aws-cdk-lib.aws_cloudwatch.MetricOptions
|
|
377
|
+
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
##### `metricThrottles` <a name="metricThrottles" id="@beesolve/lambda-bun-runtime.BunFunction.metricThrottles"></a>
|
|
381
|
+
|
|
382
|
+
```typescript
|
|
383
|
+
public metricThrottles(props?: MetricOptions): Metric
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
How often this Lambda is throttled.
|
|
387
|
+
|
|
388
|
+
Sum over 5 minutes
|
|
389
|
+
|
|
390
|
+
###### `props`<sup>Optional</sup> <a name="props" id="@beesolve/lambda-bun-runtime.BunFunction.metricThrottles.parameter.props"></a>
|
|
391
|
+
|
|
392
|
+
- *Type:* aws-cdk-lib.aws_cloudwatch.MetricOptions
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
##### `addAlias` <a name="addAlias" id="@beesolve/lambda-bun-runtime.BunFunction.addAlias"></a>
|
|
397
|
+
|
|
398
|
+
```typescript
|
|
399
|
+
public addAlias(aliasName: string, options?: AliasOptions): Alias
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
Defines an alias for this function.
|
|
403
|
+
|
|
404
|
+
The alias will automatically be updated to point to the latest version of
|
|
405
|
+
the function as it is being updated during a deployment.
|
|
406
|
+
|
|
407
|
+
```ts
|
|
408
|
+
declare const fn: lambda.Function;
|
|
409
|
+
|
|
410
|
+
fn.addAlias('Live');
|
|
411
|
+
|
|
412
|
+
// Is equivalent to
|
|
413
|
+
|
|
414
|
+
new lambda.Alias(this, 'AliasLive', {
|
|
415
|
+
aliasName: 'Live',
|
|
416
|
+
version: fn.currentVersion,
|
|
417
|
+
});
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
###### `aliasName`<sup>Required</sup> <a name="aliasName" id="@beesolve/lambda-bun-runtime.BunFunction.addAlias.parameter.aliasName"></a>
|
|
421
|
+
|
|
422
|
+
- *Type:* string
|
|
423
|
+
|
|
424
|
+
The name of the alias.
|
|
425
|
+
|
|
426
|
+
---
|
|
427
|
+
|
|
428
|
+
###### `options`<sup>Optional</sup> <a name="options" id="@beesolve/lambda-bun-runtime.BunFunction.addAlias.parameter.options"></a>
|
|
429
|
+
|
|
430
|
+
- *Type:* aws-cdk-lib.aws_lambda.AliasOptions
|
|
431
|
+
|
|
432
|
+
Alias options.
|
|
433
|
+
|
|
434
|
+
---
|
|
435
|
+
|
|
436
|
+
##### `addEnvironment` <a name="addEnvironment" id="@beesolve/lambda-bun-runtime.BunFunction.addEnvironment"></a>
|
|
437
|
+
|
|
438
|
+
```typescript
|
|
439
|
+
public addEnvironment(key: string, value: string, options?: EnvironmentOptions): Function
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
Adds an environment variable to this Lambda function.
|
|
443
|
+
|
|
444
|
+
If this is a ref to a Lambda function, this operation results in a no-op.
|
|
445
|
+
|
|
446
|
+
###### `key`<sup>Required</sup> <a name="key" id="@beesolve/lambda-bun-runtime.BunFunction.addEnvironment.parameter.key"></a>
|
|
447
|
+
|
|
448
|
+
- *Type:* string
|
|
449
|
+
|
|
450
|
+
The environment variable key.
|
|
451
|
+
|
|
452
|
+
---
|
|
453
|
+
|
|
454
|
+
###### `value`<sup>Required</sup> <a name="value" id="@beesolve/lambda-bun-runtime.BunFunction.addEnvironment.parameter.value"></a>
|
|
455
|
+
|
|
456
|
+
- *Type:* string
|
|
457
|
+
|
|
458
|
+
The environment variable's value.
|
|
459
|
+
|
|
460
|
+
---
|
|
461
|
+
|
|
462
|
+
###### `options`<sup>Optional</sup> <a name="options" id="@beesolve/lambda-bun-runtime.BunFunction.addEnvironment.parameter.options"></a>
|
|
463
|
+
|
|
464
|
+
- *Type:* aws-cdk-lib.aws_lambda.EnvironmentOptions
|
|
465
|
+
|
|
466
|
+
Environment variable options.
|
|
467
|
+
|
|
468
|
+
---
|
|
469
|
+
|
|
470
|
+
##### `addLayers` <a name="addLayers" id="@beesolve/lambda-bun-runtime.BunFunction.addLayers"></a>
|
|
471
|
+
|
|
472
|
+
```typescript
|
|
473
|
+
public addLayers(layers: ...ILayerVersion[]): void
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
Adds one or more Lambda Layers to this Lambda function.
|
|
477
|
+
|
|
478
|
+
###### `layers`<sup>Required</sup> <a name="layers" id="@beesolve/lambda-bun-runtime.BunFunction.addLayers.parameter.layers"></a>
|
|
479
|
+
|
|
480
|
+
- *Type:* ...aws-cdk-lib.aws_lambda.ILayerVersion[]
|
|
481
|
+
|
|
482
|
+
the layers to be added.
|
|
483
|
+
|
|
484
|
+
---
|
|
485
|
+
|
|
486
|
+
##### `invalidateVersionBasedOn` <a name="invalidateVersionBasedOn" id="@beesolve/lambda-bun-runtime.BunFunction.invalidateVersionBasedOn"></a>
|
|
487
|
+
|
|
488
|
+
```typescript
|
|
489
|
+
public invalidateVersionBasedOn(x: string): void
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
Mix additional information into the hash of the Version object.
|
|
493
|
+
|
|
494
|
+
The Lambda Function construct does its best to automatically create a new
|
|
495
|
+
Version when anything about the Function changes (its code, its layers,
|
|
496
|
+
any of the other properties).
|
|
497
|
+
|
|
498
|
+
However, you can sometimes source information from places that the CDK cannot
|
|
499
|
+
look into, like the deploy-time values of SSM parameters. In those cases,
|
|
500
|
+
the CDK would not force the creation of a new Version object when it actually
|
|
501
|
+
should.
|
|
502
|
+
|
|
503
|
+
This method can be used to invalidate the current Version object. Pass in
|
|
504
|
+
any string into this method, and make sure the string changes when you know
|
|
505
|
+
a new Version needs to be created.
|
|
506
|
+
|
|
507
|
+
This method may be called more than once.
|
|
508
|
+
|
|
509
|
+
###### `x`<sup>Required</sup> <a name="x" id="@beesolve/lambda-bun-runtime.BunFunction.invalidateVersionBasedOn.parameter.x"></a>
|
|
510
|
+
|
|
511
|
+
- *Type:* string
|
|
512
|
+
|
|
513
|
+
---
|
|
514
|
+
|
|
515
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
516
|
+
|
|
517
|
+
| **Name** | **Description** |
|
|
518
|
+
| --- | --- |
|
|
519
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
520
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.isOwnedResource">isOwnedResource</a></code> | Returns true if the construct was created by CDK, and false otherwise. |
|
|
521
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.isResource">isResource</a></code> | Check whether the given construct is a Resource. |
|
|
522
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.classifyVersionProperty">classifyVersionProperty</a></code> | Record whether specific properties in the `AWS::Lambda::Function` resource should also be associated to the Version resource. |
|
|
523
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.fromFunctionArn">fromFunctionArn</a></code> | Import a lambda function into the CDK using its ARN. |
|
|
524
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.fromFunctionAttributes">fromFunctionAttributes</a></code> | Creates a Lambda function object which represents a function not defined within this stack. |
|
|
525
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.fromFunctionName">fromFunctionName</a></code> | Import a lambda function into the CDK using its name. |
|
|
526
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.metricAll">metricAll</a></code> | Return the given named metric for this Lambda. |
|
|
527
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.metricAllConcurrentExecutions">metricAllConcurrentExecutions</a></code> | Metric for the number of concurrent executions across all Lambdas. |
|
|
528
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.metricAllDuration">metricAllDuration</a></code> | Metric for the Duration executing all Lambdas. |
|
|
529
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.metricAllErrors">metricAllErrors</a></code> | Metric for the number of Errors executing all Lambdas. |
|
|
530
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.metricAllInvocations">metricAllInvocations</a></code> | Metric for the number of invocations of all Lambdas. |
|
|
531
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.metricAllThrottles">metricAllThrottles</a></code> | Metric for the number of throttled invocations of all Lambdas. |
|
|
532
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.metricAllUnreservedConcurrentExecutions">metricAllUnreservedConcurrentExecutions</a></code> | Metric for the number of unreserved concurrent executions across all Lambdas. |
|
|
533
|
+
|
|
534
|
+
---
|
|
535
|
+
|
|
536
|
+
##### `isConstruct` <a name="isConstruct" id="@beesolve/lambda-bun-runtime.BunFunction.isConstruct"></a>
|
|
537
|
+
|
|
538
|
+
```typescript
|
|
539
|
+
import { BunFunction } from '@beesolve/lambda-bun-runtime'
|
|
540
|
+
|
|
541
|
+
BunFunction.isConstruct(x: any)
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
Checks if `x` is a construct.
|
|
545
|
+
|
|
546
|
+
Use this method instead of `instanceof` to properly detect `Construct`
|
|
547
|
+
instances, even when the construct library is symlinked.
|
|
548
|
+
|
|
549
|
+
Explanation: in JavaScript, multiple copies of the `constructs` library on
|
|
550
|
+
disk are seen as independent, completely different libraries. As a
|
|
551
|
+
consequence, the class `Construct` in each copy of the `constructs` library
|
|
552
|
+
is seen as a different class, and an instance of one class will not test as
|
|
553
|
+
`instanceof` the other class. `npm install` will not create installations
|
|
554
|
+
like this, but users may manually symlink construct libraries together or
|
|
555
|
+
use a monorepo tool: in those cases, multiple copies of the `constructs`
|
|
556
|
+
library can be accidentally installed, and `instanceof` will behave
|
|
557
|
+
unpredictably. It is safest to avoid using `instanceof`, and using
|
|
558
|
+
this type-testing method instead.
|
|
559
|
+
|
|
560
|
+
###### `x`<sup>Required</sup> <a name="x" id="@beesolve/lambda-bun-runtime.BunFunction.isConstruct.parameter.x"></a>
|
|
561
|
+
|
|
562
|
+
- *Type:* any
|
|
563
|
+
|
|
564
|
+
Any object.
|
|
565
|
+
|
|
566
|
+
---
|
|
567
|
+
|
|
568
|
+
##### `isOwnedResource` <a name="isOwnedResource" id="@beesolve/lambda-bun-runtime.BunFunction.isOwnedResource"></a>
|
|
569
|
+
|
|
570
|
+
```typescript
|
|
571
|
+
import { BunFunction } from '@beesolve/lambda-bun-runtime'
|
|
572
|
+
|
|
573
|
+
BunFunction.isOwnedResource(construct: IConstruct)
|
|
574
|
+
```
|
|
575
|
+
|
|
576
|
+
Returns true if the construct was created by CDK, and false otherwise.
|
|
577
|
+
|
|
578
|
+
###### `construct`<sup>Required</sup> <a name="construct" id="@beesolve/lambda-bun-runtime.BunFunction.isOwnedResource.parameter.construct"></a>
|
|
579
|
+
|
|
580
|
+
- *Type:* constructs.IConstruct
|
|
581
|
+
|
|
582
|
+
---
|
|
583
|
+
|
|
584
|
+
##### `isResource` <a name="isResource" id="@beesolve/lambda-bun-runtime.BunFunction.isResource"></a>
|
|
585
|
+
|
|
586
|
+
```typescript
|
|
587
|
+
import { BunFunction } from '@beesolve/lambda-bun-runtime'
|
|
588
|
+
|
|
589
|
+
BunFunction.isResource(construct: IConstruct)
|
|
590
|
+
```
|
|
591
|
+
|
|
592
|
+
Check whether the given construct is a Resource.
|
|
593
|
+
|
|
594
|
+
###### `construct`<sup>Required</sup> <a name="construct" id="@beesolve/lambda-bun-runtime.BunFunction.isResource.parameter.construct"></a>
|
|
595
|
+
|
|
596
|
+
- *Type:* constructs.IConstruct
|
|
597
|
+
|
|
598
|
+
---
|
|
599
|
+
|
|
600
|
+
##### `classifyVersionProperty` <a name="classifyVersionProperty" id="@beesolve/lambda-bun-runtime.BunFunction.classifyVersionProperty"></a>
|
|
601
|
+
|
|
602
|
+
```typescript
|
|
603
|
+
import { BunFunction } from '@beesolve/lambda-bun-runtime'
|
|
604
|
+
|
|
605
|
+
BunFunction.classifyVersionProperty(propertyName: string, locked: boolean)
|
|
606
|
+
```
|
|
607
|
+
|
|
608
|
+
Record whether specific properties in the `AWS::Lambda::Function` resource should also be associated to the Version resource.
|
|
609
|
+
|
|
610
|
+
See 'currentVersion' section in the module README for more details.
|
|
611
|
+
|
|
612
|
+
###### `propertyName`<sup>Required</sup> <a name="propertyName" id="@beesolve/lambda-bun-runtime.BunFunction.classifyVersionProperty.parameter.propertyName"></a>
|
|
613
|
+
|
|
614
|
+
- *Type:* string
|
|
615
|
+
|
|
616
|
+
The property to classify.
|
|
617
|
+
|
|
618
|
+
---
|
|
619
|
+
|
|
620
|
+
###### `locked`<sup>Required</sup> <a name="locked" id="@beesolve/lambda-bun-runtime.BunFunction.classifyVersionProperty.parameter.locked"></a>
|
|
621
|
+
|
|
622
|
+
- *Type:* boolean
|
|
623
|
+
|
|
624
|
+
whether the property should be associated to the version or not.
|
|
625
|
+
|
|
626
|
+
---
|
|
627
|
+
|
|
628
|
+
##### `fromFunctionArn` <a name="fromFunctionArn" id="@beesolve/lambda-bun-runtime.BunFunction.fromFunctionArn"></a>
|
|
629
|
+
|
|
630
|
+
```typescript
|
|
631
|
+
import { BunFunction } from '@beesolve/lambda-bun-runtime'
|
|
632
|
+
|
|
633
|
+
BunFunction.fromFunctionArn(scope: Construct, id: string, functionArn: string)
|
|
634
|
+
```
|
|
635
|
+
|
|
636
|
+
Import a lambda function into the CDK using its ARN.
|
|
637
|
+
|
|
638
|
+
For `Function.addPermissions()` to work on this imported lambda, make sure that is
|
|
639
|
+
in the same account and region as the stack you are importing it into.
|
|
640
|
+
|
|
641
|
+
###### `scope`<sup>Required</sup> <a name="scope" id="@beesolve/lambda-bun-runtime.BunFunction.fromFunctionArn.parameter.scope"></a>
|
|
642
|
+
|
|
643
|
+
- *Type:* constructs.Construct
|
|
644
|
+
|
|
645
|
+
---
|
|
646
|
+
|
|
647
|
+
###### `id`<sup>Required</sup> <a name="id" id="@beesolve/lambda-bun-runtime.BunFunction.fromFunctionArn.parameter.id"></a>
|
|
648
|
+
|
|
649
|
+
- *Type:* string
|
|
650
|
+
|
|
651
|
+
---
|
|
652
|
+
|
|
653
|
+
###### `functionArn`<sup>Required</sup> <a name="functionArn" id="@beesolve/lambda-bun-runtime.BunFunction.fromFunctionArn.parameter.functionArn"></a>
|
|
654
|
+
|
|
655
|
+
- *Type:* string
|
|
656
|
+
|
|
657
|
+
---
|
|
658
|
+
|
|
659
|
+
##### `fromFunctionAttributes` <a name="fromFunctionAttributes" id="@beesolve/lambda-bun-runtime.BunFunction.fromFunctionAttributes"></a>
|
|
660
|
+
|
|
661
|
+
```typescript
|
|
662
|
+
import { BunFunction } from '@beesolve/lambda-bun-runtime'
|
|
663
|
+
|
|
664
|
+
BunFunction.fromFunctionAttributes(scope: Construct, id: string, attrs: FunctionAttributes)
|
|
665
|
+
```
|
|
666
|
+
|
|
667
|
+
Creates a Lambda function object which represents a function not defined within this stack.
|
|
668
|
+
|
|
669
|
+
For `Function.addPermissions()` to work on this imported lambda, set the sameEnvironment property to true
|
|
670
|
+
if this imported lambda is in the same account and region as the stack you are importing it into.
|
|
671
|
+
|
|
672
|
+
###### `scope`<sup>Required</sup> <a name="scope" id="@beesolve/lambda-bun-runtime.BunFunction.fromFunctionAttributes.parameter.scope"></a>
|
|
673
|
+
|
|
674
|
+
- *Type:* constructs.Construct
|
|
675
|
+
|
|
676
|
+
The parent construct.
|
|
677
|
+
|
|
678
|
+
---
|
|
679
|
+
|
|
680
|
+
###### `id`<sup>Required</sup> <a name="id" id="@beesolve/lambda-bun-runtime.BunFunction.fromFunctionAttributes.parameter.id"></a>
|
|
681
|
+
|
|
682
|
+
- *Type:* string
|
|
683
|
+
|
|
684
|
+
The name of the lambda construct.
|
|
685
|
+
|
|
686
|
+
---
|
|
687
|
+
|
|
688
|
+
###### `attrs`<sup>Required</sup> <a name="attrs" id="@beesolve/lambda-bun-runtime.BunFunction.fromFunctionAttributes.parameter.attrs"></a>
|
|
689
|
+
|
|
690
|
+
- *Type:* aws-cdk-lib.aws_lambda.FunctionAttributes
|
|
691
|
+
|
|
692
|
+
the attributes of the function to import.
|
|
693
|
+
|
|
694
|
+
---
|
|
695
|
+
|
|
696
|
+
##### `fromFunctionName` <a name="fromFunctionName" id="@beesolve/lambda-bun-runtime.BunFunction.fromFunctionName"></a>
|
|
697
|
+
|
|
698
|
+
```typescript
|
|
699
|
+
import { BunFunction } from '@beesolve/lambda-bun-runtime'
|
|
700
|
+
|
|
701
|
+
BunFunction.fromFunctionName(scope: Construct, id: string, functionName: string)
|
|
702
|
+
```
|
|
703
|
+
|
|
704
|
+
Import a lambda function into the CDK using its name.
|
|
705
|
+
|
|
706
|
+
###### `scope`<sup>Required</sup> <a name="scope" id="@beesolve/lambda-bun-runtime.BunFunction.fromFunctionName.parameter.scope"></a>
|
|
707
|
+
|
|
708
|
+
- *Type:* constructs.Construct
|
|
709
|
+
|
|
710
|
+
---
|
|
711
|
+
|
|
712
|
+
###### `id`<sup>Required</sup> <a name="id" id="@beesolve/lambda-bun-runtime.BunFunction.fromFunctionName.parameter.id"></a>
|
|
713
|
+
|
|
714
|
+
- *Type:* string
|
|
715
|
+
|
|
716
|
+
---
|
|
717
|
+
|
|
718
|
+
###### `functionName`<sup>Required</sup> <a name="functionName" id="@beesolve/lambda-bun-runtime.BunFunction.fromFunctionName.parameter.functionName"></a>
|
|
719
|
+
|
|
720
|
+
- *Type:* string
|
|
721
|
+
|
|
722
|
+
---
|
|
723
|
+
|
|
724
|
+
##### `metricAll` <a name="metricAll" id="@beesolve/lambda-bun-runtime.BunFunction.metricAll"></a>
|
|
725
|
+
|
|
726
|
+
```typescript
|
|
727
|
+
import { BunFunction } from '@beesolve/lambda-bun-runtime'
|
|
728
|
+
|
|
729
|
+
BunFunction.metricAll(metricName: string, props?: MetricOptions)
|
|
730
|
+
```
|
|
731
|
+
|
|
732
|
+
Return the given named metric for this Lambda.
|
|
733
|
+
|
|
734
|
+
###### `metricName`<sup>Required</sup> <a name="metricName" id="@beesolve/lambda-bun-runtime.BunFunction.metricAll.parameter.metricName"></a>
|
|
735
|
+
|
|
736
|
+
- *Type:* string
|
|
737
|
+
|
|
738
|
+
---
|
|
739
|
+
|
|
740
|
+
###### `props`<sup>Optional</sup> <a name="props" id="@beesolve/lambda-bun-runtime.BunFunction.metricAll.parameter.props"></a>
|
|
741
|
+
|
|
742
|
+
- *Type:* aws-cdk-lib.aws_cloudwatch.MetricOptions
|
|
743
|
+
|
|
744
|
+
---
|
|
745
|
+
|
|
746
|
+
##### `metricAllConcurrentExecutions` <a name="metricAllConcurrentExecutions" id="@beesolve/lambda-bun-runtime.BunFunction.metricAllConcurrentExecutions"></a>
|
|
747
|
+
|
|
748
|
+
```typescript
|
|
749
|
+
import { BunFunction } from '@beesolve/lambda-bun-runtime'
|
|
750
|
+
|
|
751
|
+
BunFunction.metricAllConcurrentExecutions(props?: MetricOptions)
|
|
752
|
+
```
|
|
753
|
+
|
|
754
|
+
Metric for the number of concurrent executions across all Lambdas.
|
|
755
|
+
|
|
756
|
+
###### `props`<sup>Optional</sup> <a name="props" id="@beesolve/lambda-bun-runtime.BunFunction.metricAllConcurrentExecutions.parameter.props"></a>
|
|
757
|
+
|
|
758
|
+
- *Type:* aws-cdk-lib.aws_cloudwatch.MetricOptions
|
|
759
|
+
|
|
760
|
+
---
|
|
761
|
+
|
|
762
|
+
##### `metricAllDuration` <a name="metricAllDuration" id="@beesolve/lambda-bun-runtime.BunFunction.metricAllDuration"></a>
|
|
763
|
+
|
|
764
|
+
```typescript
|
|
765
|
+
import { BunFunction } from '@beesolve/lambda-bun-runtime'
|
|
766
|
+
|
|
767
|
+
BunFunction.metricAllDuration(props?: MetricOptions)
|
|
768
|
+
```
|
|
769
|
+
|
|
770
|
+
Metric for the Duration executing all Lambdas.
|
|
771
|
+
|
|
772
|
+
###### `props`<sup>Optional</sup> <a name="props" id="@beesolve/lambda-bun-runtime.BunFunction.metricAllDuration.parameter.props"></a>
|
|
773
|
+
|
|
774
|
+
- *Type:* aws-cdk-lib.aws_cloudwatch.MetricOptions
|
|
775
|
+
|
|
776
|
+
---
|
|
777
|
+
|
|
778
|
+
##### `metricAllErrors` <a name="metricAllErrors" id="@beesolve/lambda-bun-runtime.BunFunction.metricAllErrors"></a>
|
|
779
|
+
|
|
780
|
+
```typescript
|
|
781
|
+
import { BunFunction } from '@beesolve/lambda-bun-runtime'
|
|
782
|
+
|
|
783
|
+
BunFunction.metricAllErrors(props?: MetricOptions)
|
|
784
|
+
```
|
|
785
|
+
|
|
786
|
+
Metric for the number of Errors executing all Lambdas.
|
|
787
|
+
|
|
788
|
+
###### `props`<sup>Optional</sup> <a name="props" id="@beesolve/lambda-bun-runtime.BunFunction.metricAllErrors.parameter.props"></a>
|
|
789
|
+
|
|
790
|
+
- *Type:* aws-cdk-lib.aws_cloudwatch.MetricOptions
|
|
791
|
+
|
|
792
|
+
---
|
|
793
|
+
|
|
794
|
+
##### `metricAllInvocations` <a name="metricAllInvocations" id="@beesolve/lambda-bun-runtime.BunFunction.metricAllInvocations"></a>
|
|
795
|
+
|
|
796
|
+
```typescript
|
|
797
|
+
import { BunFunction } from '@beesolve/lambda-bun-runtime'
|
|
798
|
+
|
|
799
|
+
BunFunction.metricAllInvocations(props?: MetricOptions)
|
|
800
|
+
```
|
|
801
|
+
|
|
802
|
+
Metric for the number of invocations of all Lambdas.
|
|
803
|
+
|
|
804
|
+
###### `props`<sup>Optional</sup> <a name="props" id="@beesolve/lambda-bun-runtime.BunFunction.metricAllInvocations.parameter.props"></a>
|
|
805
|
+
|
|
806
|
+
- *Type:* aws-cdk-lib.aws_cloudwatch.MetricOptions
|
|
807
|
+
|
|
808
|
+
---
|
|
809
|
+
|
|
810
|
+
##### `metricAllThrottles` <a name="metricAllThrottles" id="@beesolve/lambda-bun-runtime.BunFunction.metricAllThrottles"></a>
|
|
811
|
+
|
|
812
|
+
```typescript
|
|
813
|
+
import { BunFunction } from '@beesolve/lambda-bun-runtime'
|
|
814
|
+
|
|
815
|
+
BunFunction.metricAllThrottles(props?: MetricOptions)
|
|
816
|
+
```
|
|
817
|
+
|
|
818
|
+
Metric for the number of throttled invocations of all Lambdas.
|
|
819
|
+
|
|
820
|
+
###### `props`<sup>Optional</sup> <a name="props" id="@beesolve/lambda-bun-runtime.BunFunction.metricAllThrottles.parameter.props"></a>
|
|
821
|
+
|
|
822
|
+
- *Type:* aws-cdk-lib.aws_cloudwatch.MetricOptions
|
|
823
|
+
|
|
824
|
+
---
|
|
825
|
+
|
|
826
|
+
##### `metricAllUnreservedConcurrentExecutions` <a name="metricAllUnreservedConcurrentExecutions" id="@beesolve/lambda-bun-runtime.BunFunction.metricAllUnreservedConcurrentExecutions"></a>
|
|
827
|
+
|
|
828
|
+
```typescript
|
|
829
|
+
import { BunFunction } from '@beesolve/lambda-bun-runtime'
|
|
830
|
+
|
|
831
|
+
BunFunction.metricAllUnreservedConcurrentExecutions(props?: MetricOptions)
|
|
832
|
+
```
|
|
833
|
+
|
|
834
|
+
Metric for the number of unreserved concurrent executions across all Lambdas.
|
|
835
|
+
|
|
836
|
+
###### `props`<sup>Optional</sup> <a name="props" id="@beesolve/lambda-bun-runtime.BunFunction.metricAllUnreservedConcurrentExecutions.parameter.props"></a>
|
|
837
|
+
|
|
838
|
+
- *Type:* aws-cdk-lib.aws_cloudwatch.MetricOptions
|
|
839
|
+
|
|
840
|
+
---
|
|
841
|
+
|
|
842
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
843
|
+
|
|
844
|
+
| **Name** | **Type** | **Description** |
|
|
845
|
+
| --- | --- | --- |
|
|
846
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
847
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.property.env">env</a></code> | <code>aws-cdk-lib.interfaces.ResourceEnvironment</code> | The environment this resource belongs to. |
|
|
848
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.property.stack">stack</a></code> | <code>aws-cdk-lib.Stack</code> | The stack in which this resource is defined. |
|
|
849
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.property.architecture">architecture</a></code> | <code>aws-cdk-lib.aws_lambda.Architecture</code> | The architecture of this Lambda Function (this is an optional attribute and defaults to X86_64). |
|
|
850
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.property.connections">connections</a></code> | <code>aws-cdk-lib.aws_ec2.Connections</code> | Access the Connections object. |
|
|
851
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.property.functionArn">functionArn</a></code> | <code>string</code> | ARN of this function. |
|
|
852
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.property.functionName">functionName</a></code> | <code>string</code> | Name of this function. |
|
|
853
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.property.functionRef">functionRef</a></code> | <code>aws-cdk-lib.interfaces.aws_lambda.FunctionReference</code> | A reference to a Function resource. |
|
|
854
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.property.grantPrincipal">grantPrincipal</a></code> | <code>aws-cdk-lib.aws_iam.IPrincipal</code> | The principal this Lambda Function is running as. |
|
|
855
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.property.isBoundToVpc">isBoundToVpc</a></code> | <code>boolean</code> | Whether or not this Lambda function was bound to a VPC. |
|
|
856
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.property.latestVersion">latestVersion</a></code> | <code>aws-cdk-lib.aws_lambda.IVersion</code> | The `$LATEST` version of this function. |
|
|
857
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.property.permissionsNode">permissionsNode</a></code> | <code>constructs.Node</code> | The construct node where permissions are attached. |
|
|
858
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.property.resourceArnsForGrantInvoke">resourceArnsForGrantInvoke</a></code> | <code>string[]</code> | The ARN(s) to put into the resource field of the generated IAM policy for grantInvoke(). |
|
|
859
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.property.role">role</a></code> | <code>aws-cdk-lib.aws_iam.IRole</code> | Execution role associated with this function. |
|
|
860
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.property.tenancyConfig">tenancyConfig</a></code> | <code>aws-cdk-lib.aws_lambda.TenancyConfig</code> | The tenancy configuration for this function. |
|
|
861
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.property.currentVersion">currentVersion</a></code> | <code>aws-cdk-lib.aws_lambda.Version</code> | Returns a `lambda.Version` which represents the current version of this Lambda function. A new version will be created every time the function's configuration changes. |
|
|
862
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.property.logGroup">logGroup</a></code> | <code>aws-cdk-lib.aws_logs.ILogGroup</code> | The LogGroup where the Lambda function's logs are made available. |
|
|
863
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.property.runtime">runtime</a></code> | <code>aws-cdk-lib.aws_lambda.Runtime</code> | The runtime configured for this lambda. |
|
|
864
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.property.deadLetterQueue">deadLetterQueue</a></code> | <code>aws-cdk-lib.aws_sqs.IQueue</code> | The DLQ (as queue) associated with this Lambda Function (this is an optional attribute). |
|
|
865
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.property.deadLetterTopic">deadLetterTopic</a></code> | <code>aws-cdk-lib.aws_sns.ITopic</code> | The DLQ (as topic) associated with this Lambda Function (this is an optional attribute). |
|
|
866
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.property.timeout">timeout</a></code> | <code>aws-cdk-lib.Duration</code> | The timeout configured for this lambda. |
|
|
867
|
+
|
|
868
|
+
---
|
|
869
|
+
|
|
870
|
+
##### `node`<sup>Required</sup> <a name="node" id="@beesolve/lambda-bun-runtime.BunFunction.property.node"></a>
|
|
871
|
+
|
|
872
|
+
```typescript
|
|
873
|
+
public readonly node: Node;
|
|
874
|
+
```
|
|
875
|
+
|
|
876
|
+
- *Type:* constructs.Node
|
|
877
|
+
|
|
878
|
+
The tree node.
|
|
879
|
+
|
|
880
|
+
---
|
|
881
|
+
|
|
882
|
+
##### `env`<sup>Required</sup> <a name="env" id="@beesolve/lambda-bun-runtime.BunFunction.property.env"></a>
|
|
883
|
+
|
|
884
|
+
```typescript
|
|
885
|
+
public readonly env: ResourceEnvironment;
|
|
886
|
+
```
|
|
887
|
+
|
|
888
|
+
- *Type:* aws-cdk-lib.interfaces.ResourceEnvironment
|
|
889
|
+
|
|
890
|
+
The environment this resource belongs to.
|
|
891
|
+
|
|
892
|
+
For resources that are created and managed in a Stack (those created by
|
|
893
|
+
creating new class instances like `new Role()`, `new Bucket()`, etc.), this
|
|
894
|
+
is always the same as the environment of the stack they belong to.
|
|
895
|
+
|
|
896
|
+
For referenced resources (those obtained from referencing methods like
|
|
897
|
+
`Role.fromRoleArn()`, `Bucket.fromBucketName()`, etc.), they might be
|
|
898
|
+
different than the stack they were imported into.
|
|
899
|
+
|
|
900
|
+
---
|
|
901
|
+
|
|
902
|
+
##### `stack`<sup>Required</sup> <a name="stack" id="@beesolve/lambda-bun-runtime.BunFunction.property.stack"></a>
|
|
903
|
+
|
|
904
|
+
```typescript
|
|
905
|
+
public readonly stack: Stack;
|
|
906
|
+
```
|
|
907
|
+
|
|
908
|
+
- *Type:* aws-cdk-lib.Stack
|
|
909
|
+
|
|
910
|
+
The stack in which this resource is defined.
|
|
911
|
+
|
|
912
|
+
---
|
|
913
|
+
|
|
914
|
+
##### `architecture`<sup>Required</sup> <a name="architecture" id="@beesolve/lambda-bun-runtime.BunFunction.property.architecture"></a>
|
|
915
|
+
|
|
916
|
+
```typescript
|
|
917
|
+
public readonly architecture: Architecture;
|
|
918
|
+
```
|
|
919
|
+
|
|
920
|
+
- *Type:* aws-cdk-lib.aws_lambda.Architecture
|
|
921
|
+
|
|
922
|
+
The architecture of this Lambda Function (this is an optional attribute and defaults to X86_64).
|
|
923
|
+
|
|
924
|
+
---
|
|
925
|
+
|
|
926
|
+
##### `connections`<sup>Required</sup> <a name="connections" id="@beesolve/lambda-bun-runtime.BunFunction.property.connections"></a>
|
|
927
|
+
|
|
928
|
+
```typescript
|
|
929
|
+
public readonly connections: Connections;
|
|
930
|
+
```
|
|
931
|
+
|
|
932
|
+
- *Type:* aws-cdk-lib.aws_ec2.Connections
|
|
933
|
+
|
|
934
|
+
Access the Connections object.
|
|
935
|
+
|
|
936
|
+
Will fail if not a VPC-enabled Lambda Function
|
|
937
|
+
|
|
938
|
+
---
|
|
939
|
+
|
|
940
|
+
##### `functionArn`<sup>Required</sup> <a name="functionArn" id="@beesolve/lambda-bun-runtime.BunFunction.property.functionArn"></a>
|
|
941
|
+
|
|
942
|
+
```typescript
|
|
943
|
+
public readonly functionArn: string;
|
|
944
|
+
```
|
|
945
|
+
|
|
946
|
+
- *Type:* string
|
|
947
|
+
|
|
948
|
+
ARN of this function.
|
|
949
|
+
|
|
950
|
+
---
|
|
951
|
+
|
|
952
|
+
##### `functionName`<sup>Required</sup> <a name="functionName" id="@beesolve/lambda-bun-runtime.BunFunction.property.functionName"></a>
|
|
953
|
+
|
|
954
|
+
```typescript
|
|
955
|
+
public readonly functionName: string;
|
|
956
|
+
```
|
|
957
|
+
|
|
958
|
+
- *Type:* string
|
|
959
|
+
|
|
960
|
+
Name of this function.
|
|
961
|
+
|
|
962
|
+
---
|
|
963
|
+
|
|
964
|
+
##### `functionRef`<sup>Required</sup> <a name="functionRef" id="@beesolve/lambda-bun-runtime.BunFunction.property.functionRef"></a>
|
|
965
|
+
|
|
966
|
+
```typescript
|
|
967
|
+
public readonly functionRef: FunctionReference;
|
|
968
|
+
```
|
|
969
|
+
|
|
970
|
+
- *Type:* aws-cdk-lib.interfaces.aws_lambda.FunctionReference
|
|
971
|
+
|
|
972
|
+
A reference to a Function resource.
|
|
973
|
+
|
|
974
|
+
---
|
|
975
|
+
|
|
976
|
+
##### `grantPrincipal`<sup>Required</sup> <a name="grantPrincipal" id="@beesolve/lambda-bun-runtime.BunFunction.property.grantPrincipal"></a>
|
|
977
|
+
|
|
978
|
+
```typescript
|
|
979
|
+
public readonly grantPrincipal: IPrincipal;
|
|
980
|
+
```
|
|
981
|
+
|
|
982
|
+
- *Type:* aws-cdk-lib.aws_iam.IPrincipal
|
|
983
|
+
|
|
984
|
+
The principal this Lambda Function is running as.
|
|
985
|
+
|
|
986
|
+
---
|
|
987
|
+
|
|
988
|
+
##### `isBoundToVpc`<sup>Required</sup> <a name="isBoundToVpc" id="@beesolve/lambda-bun-runtime.BunFunction.property.isBoundToVpc"></a>
|
|
989
|
+
|
|
990
|
+
```typescript
|
|
991
|
+
public readonly isBoundToVpc: boolean;
|
|
992
|
+
```
|
|
993
|
+
|
|
994
|
+
- *Type:* boolean
|
|
995
|
+
|
|
996
|
+
Whether or not this Lambda function was bound to a VPC.
|
|
997
|
+
|
|
998
|
+
If this is is `false`, trying to access the `connections` object will fail.
|
|
999
|
+
|
|
1000
|
+
---
|
|
1001
|
+
|
|
1002
|
+
##### `latestVersion`<sup>Required</sup> <a name="latestVersion" id="@beesolve/lambda-bun-runtime.BunFunction.property.latestVersion"></a>
|
|
1003
|
+
|
|
1004
|
+
```typescript
|
|
1005
|
+
public readonly latestVersion: IVersion;
|
|
1006
|
+
```
|
|
1007
|
+
|
|
1008
|
+
- *Type:* aws-cdk-lib.aws_lambda.IVersion
|
|
1009
|
+
|
|
1010
|
+
The `$LATEST` version of this function.
|
|
1011
|
+
|
|
1012
|
+
Note that this is reference to a non-specific AWS Lambda version, which
|
|
1013
|
+
means the function this version refers to can return different results in
|
|
1014
|
+
different invocations.
|
|
1015
|
+
|
|
1016
|
+
To obtain a reference to an explicit version which references the current
|
|
1017
|
+
function configuration, use `lambdaFunction.currentVersion` instead.
|
|
1018
|
+
|
|
1019
|
+
---
|
|
1020
|
+
|
|
1021
|
+
##### `permissionsNode`<sup>Required</sup> <a name="permissionsNode" id="@beesolve/lambda-bun-runtime.BunFunction.property.permissionsNode"></a>
|
|
1022
|
+
|
|
1023
|
+
```typescript
|
|
1024
|
+
public readonly permissionsNode: Node;
|
|
1025
|
+
```
|
|
1026
|
+
|
|
1027
|
+
- *Type:* constructs.Node
|
|
1028
|
+
|
|
1029
|
+
The construct node where permissions are attached.
|
|
1030
|
+
|
|
1031
|
+
---
|
|
1032
|
+
|
|
1033
|
+
##### `resourceArnsForGrantInvoke`<sup>Required</sup> <a name="resourceArnsForGrantInvoke" id="@beesolve/lambda-bun-runtime.BunFunction.property.resourceArnsForGrantInvoke"></a>
|
|
1034
|
+
|
|
1035
|
+
```typescript
|
|
1036
|
+
public readonly resourceArnsForGrantInvoke: string[];
|
|
1037
|
+
```
|
|
1038
|
+
|
|
1039
|
+
- *Type:* string[]
|
|
1040
|
+
|
|
1041
|
+
The ARN(s) to put into the resource field of the generated IAM policy for grantInvoke().
|
|
1042
|
+
|
|
1043
|
+
---
|
|
1044
|
+
|
|
1045
|
+
##### `role`<sup>Optional</sup> <a name="role" id="@beesolve/lambda-bun-runtime.BunFunction.property.role"></a>
|
|
1046
|
+
|
|
1047
|
+
```typescript
|
|
1048
|
+
public readonly role: IRole;
|
|
1049
|
+
```
|
|
1050
|
+
|
|
1051
|
+
- *Type:* aws-cdk-lib.aws_iam.IRole
|
|
1052
|
+
|
|
1053
|
+
Execution role associated with this function.
|
|
1054
|
+
|
|
1055
|
+
---
|
|
1056
|
+
|
|
1057
|
+
##### `tenancyConfig`<sup>Optional</sup> <a name="tenancyConfig" id="@beesolve/lambda-bun-runtime.BunFunction.property.tenancyConfig"></a>
|
|
1058
|
+
|
|
1059
|
+
```typescript
|
|
1060
|
+
public readonly tenancyConfig: TenancyConfig;
|
|
1061
|
+
```
|
|
1062
|
+
|
|
1063
|
+
- *Type:* aws-cdk-lib.aws_lambda.TenancyConfig
|
|
1064
|
+
|
|
1065
|
+
The tenancy configuration for this function.
|
|
1066
|
+
|
|
1067
|
+
---
|
|
1068
|
+
|
|
1069
|
+
##### `currentVersion`<sup>Required</sup> <a name="currentVersion" id="@beesolve/lambda-bun-runtime.BunFunction.property.currentVersion"></a>
|
|
1070
|
+
|
|
1071
|
+
```typescript
|
|
1072
|
+
public readonly currentVersion: Version;
|
|
1073
|
+
```
|
|
1074
|
+
|
|
1075
|
+
- *Type:* aws-cdk-lib.aws_lambda.Version
|
|
1076
|
+
|
|
1077
|
+
Returns a `lambda.Version` which represents the current version of this Lambda function. A new version will be created every time the function's configuration changes.
|
|
1078
|
+
|
|
1079
|
+
You can specify options for this version using the `currentVersionOptions`
|
|
1080
|
+
prop when initializing the `lambda.Function`.
|
|
1081
|
+
|
|
1082
|
+
---
|
|
1083
|
+
|
|
1084
|
+
##### `logGroup`<sup>Required</sup> <a name="logGroup" id="@beesolve/lambda-bun-runtime.BunFunction.property.logGroup"></a>
|
|
1085
|
+
|
|
1086
|
+
```typescript
|
|
1087
|
+
public readonly logGroup: ILogGroup;
|
|
1088
|
+
```
|
|
1089
|
+
|
|
1090
|
+
- *Type:* aws-cdk-lib.aws_logs.ILogGroup
|
|
1091
|
+
|
|
1092
|
+
The LogGroup where the Lambda function's logs are made available.
|
|
1093
|
+
|
|
1094
|
+
If either `logRetention` is set or this property is called, a CloudFormation custom resource is added to the stack that
|
|
1095
|
+
pre-creates the log group as part of the stack deployment, if it already doesn't exist, and sets the correct log retention
|
|
1096
|
+
period (never expire, by default).
|
|
1097
|
+
|
|
1098
|
+
Further, if the log group already exists and the `logRetention` is not set, the custom resource will reset the log retention
|
|
1099
|
+
to never expire even if it was configured with a different value.
|
|
1100
|
+
|
|
1101
|
+
---
|
|
1102
|
+
|
|
1103
|
+
##### `runtime`<sup>Required</sup> <a name="runtime" id="@beesolve/lambda-bun-runtime.BunFunction.property.runtime"></a>
|
|
1104
|
+
|
|
1105
|
+
```typescript
|
|
1106
|
+
public readonly runtime: Runtime;
|
|
1107
|
+
```
|
|
1108
|
+
|
|
1109
|
+
- *Type:* aws-cdk-lib.aws_lambda.Runtime
|
|
1110
|
+
|
|
1111
|
+
The runtime configured for this lambda.
|
|
1112
|
+
|
|
1113
|
+
---
|
|
1114
|
+
|
|
1115
|
+
##### `deadLetterQueue`<sup>Optional</sup> <a name="deadLetterQueue" id="@beesolve/lambda-bun-runtime.BunFunction.property.deadLetterQueue"></a>
|
|
1116
|
+
|
|
1117
|
+
```typescript
|
|
1118
|
+
public readonly deadLetterQueue: IQueue;
|
|
1119
|
+
```
|
|
1120
|
+
|
|
1121
|
+
- *Type:* aws-cdk-lib.aws_sqs.IQueue
|
|
1122
|
+
|
|
1123
|
+
The DLQ (as queue) associated with this Lambda Function (this is an optional attribute).
|
|
1124
|
+
|
|
1125
|
+
---
|
|
1126
|
+
|
|
1127
|
+
##### `deadLetterTopic`<sup>Optional</sup> <a name="deadLetterTopic" id="@beesolve/lambda-bun-runtime.BunFunction.property.deadLetterTopic"></a>
|
|
1128
|
+
|
|
1129
|
+
```typescript
|
|
1130
|
+
public readonly deadLetterTopic: ITopic;
|
|
1131
|
+
```
|
|
1132
|
+
|
|
1133
|
+
- *Type:* aws-cdk-lib.aws_sns.ITopic
|
|
1134
|
+
|
|
1135
|
+
The DLQ (as topic) associated with this Lambda Function (this is an optional attribute).
|
|
1136
|
+
|
|
1137
|
+
---
|
|
1138
|
+
|
|
1139
|
+
##### `timeout`<sup>Optional</sup> <a name="timeout" id="@beesolve/lambda-bun-runtime.BunFunction.property.timeout"></a>
|
|
1140
|
+
|
|
1141
|
+
```typescript
|
|
1142
|
+
public readonly timeout: Duration;
|
|
1143
|
+
```
|
|
1144
|
+
|
|
1145
|
+
- *Type:* aws-cdk-lib.Duration
|
|
1146
|
+
|
|
1147
|
+
The timeout configured for this lambda.
|
|
1148
|
+
|
|
1149
|
+
---
|
|
1150
|
+
|
|
1151
|
+
#### Constants <a name="Constants" id="Constants"></a>
|
|
1152
|
+
|
|
1153
|
+
| **Name** | **Type** | **Description** |
|
|
1154
|
+
| --- | --- | --- |
|
|
1155
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunction.property.PROPERTY_INJECTION_ID">PROPERTY_INJECTION_ID</a></code> | <code>string</code> | Uniquely identifies this class. |
|
|
1156
|
+
|
|
1157
|
+
---
|
|
1158
|
+
|
|
1159
|
+
##### `PROPERTY_INJECTION_ID`<sup>Required</sup> <a name="PROPERTY_INJECTION_ID" id="@beesolve/lambda-bun-runtime.BunFunction.property.PROPERTY_INJECTION_ID"></a>
|
|
1160
|
+
|
|
1161
|
+
```typescript
|
|
1162
|
+
public readonly PROPERTY_INJECTION_ID: string;
|
|
1163
|
+
```
|
|
1164
|
+
|
|
1165
|
+
- *Type:* string
|
|
1166
|
+
|
|
1167
|
+
Uniquely identifies this class.
|
|
1168
|
+
|
|
1169
|
+
---
|
|
1170
|
+
|
|
1171
|
+
### BunLambdaLayer <a name="BunLambdaLayer" id="@beesolve/lambda-bun-runtime.BunLambdaLayer"></a>
|
|
1172
|
+
|
|
1173
|
+
#### Initializers <a name="Initializers" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.Initializer"></a>
|
|
1174
|
+
|
|
1175
|
+
```typescript
|
|
1176
|
+
import { BunLambdaLayer } from '@beesolve/lambda-bun-runtime'
|
|
1177
|
+
|
|
1178
|
+
new BunLambdaLayer(scope: Construct, id: string, props?: BunLambdaLayerProps)
|
|
1179
|
+
```
|
|
1180
|
+
|
|
1181
|
+
| **Name** | **Type** | **Description** |
|
|
1182
|
+
| --- | --- | --- |
|
|
1183
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunLambdaLayer.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
|
|
1184
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunLambdaLayer.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
|
|
1185
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunLambdaLayer.Initializer.parameter.props">props</a></code> | <code><a href="#@beesolve/lambda-bun-runtime.BunLambdaLayerProps">BunLambdaLayerProps</a></code> | *No description.* |
|
|
1186
|
+
|
|
1187
|
+
---
|
|
1188
|
+
|
|
1189
|
+
##### `scope`<sup>Required</sup> <a name="scope" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.Initializer.parameter.scope"></a>
|
|
1190
|
+
|
|
1191
|
+
- *Type:* constructs.Construct
|
|
1192
|
+
|
|
1193
|
+
---
|
|
1194
|
+
|
|
1195
|
+
##### `id`<sup>Required</sup> <a name="id" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.Initializer.parameter.id"></a>
|
|
1196
|
+
|
|
1197
|
+
- *Type:* string
|
|
1198
|
+
|
|
1199
|
+
---
|
|
1200
|
+
|
|
1201
|
+
##### `props`<sup>Optional</sup> <a name="props" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.Initializer.parameter.props"></a>
|
|
1202
|
+
|
|
1203
|
+
- *Type:* <a href="#@beesolve/lambda-bun-runtime.BunLambdaLayerProps">BunLambdaLayerProps</a>
|
|
1204
|
+
|
|
1205
|
+
---
|
|
1206
|
+
|
|
1207
|
+
#### Methods <a name="Methods" id="Methods"></a>
|
|
1208
|
+
|
|
1209
|
+
| **Name** | **Description** |
|
|
1210
|
+
| --- | --- |
|
|
1211
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunLambdaLayer.toString">toString</a></code> | Returns a string representation of this construct. |
|
|
1212
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunLambdaLayer.applyRemovalPolicy">applyRemovalPolicy</a></code> | Apply the given removal policy to this resource. |
|
|
1213
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunLambdaLayer.addPermission">addPermission</a></code> | Add permission for this layer version to specific entities. |
|
|
1214
|
+
|
|
1215
|
+
---
|
|
1216
|
+
|
|
1217
|
+
##### `toString` <a name="toString" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.toString"></a>
|
|
1218
|
+
|
|
1219
|
+
```typescript
|
|
1220
|
+
public toString(): string
|
|
1221
|
+
```
|
|
1222
|
+
|
|
1223
|
+
Returns a string representation of this construct.
|
|
1224
|
+
|
|
1225
|
+
##### `applyRemovalPolicy` <a name="applyRemovalPolicy" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.applyRemovalPolicy"></a>
|
|
1226
|
+
|
|
1227
|
+
```typescript
|
|
1228
|
+
public applyRemovalPolicy(policy: RemovalPolicy): void
|
|
1229
|
+
```
|
|
1230
|
+
|
|
1231
|
+
Apply the given removal policy to this resource.
|
|
1232
|
+
|
|
1233
|
+
The Removal Policy controls what happens to this resource when it stops
|
|
1234
|
+
being managed by CloudFormation, either because you've removed it from the
|
|
1235
|
+
CDK application or because you've made a change that requires the resource
|
|
1236
|
+
to be replaced.
|
|
1237
|
+
|
|
1238
|
+
The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
|
|
1239
|
+
account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
|
|
1240
|
+
|
|
1241
|
+
###### `policy`<sup>Required</sup> <a name="policy" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.applyRemovalPolicy.parameter.policy"></a>
|
|
1242
|
+
|
|
1243
|
+
- *Type:* aws-cdk-lib.RemovalPolicy
|
|
1244
|
+
|
|
1245
|
+
---
|
|
1246
|
+
|
|
1247
|
+
##### `addPermission` <a name="addPermission" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.addPermission"></a>
|
|
1248
|
+
|
|
1249
|
+
```typescript
|
|
1250
|
+
public addPermission(id: string, permission: LayerVersionPermission): void
|
|
1251
|
+
```
|
|
1252
|
+
|
|
1253
|
+
Add permission for this layer version to specific entities.
|
|
1254
|
+
|
|
1255
|
+
Usage within
|
|
1256
|
+
the same account where the layer is defined is always allowed and does not
|
|
1257
|
+
require calling this method. Note that the principal that creates the
|
|
1258
|
+
Lambda function using the layer (for example, a CloudFormation changeset
|
|
1259
|
+
execution role) also needs to have the ``lambda:GetLayerVersion``
|
|
1260
|
+
permission on the layer version.
|
|
1261
|
+
|
|
1262
|
+
###### `id`<sup>Required</sup> <a name="id" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.addPermission.parameter.id"></a>
|
|
1263
|
+
|
|
1264
|
+
- *Type:* string
|
|
1265
|
+
|
|
1266
|
+
---
|
|
1267
|
+
|
|
1268
|
+
###### `permission`<sup>Required</sup> <a name="permission" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.addPermission.parameter.permission"></a>
|
|
1269
|
+
|
|
1270
|
+
- *Type:* aws-cdk-lib.aws_lambda.LayerVersionPermission
|
|
1271
|
+
|
|
1272
|
+
---
|
|
1273
|
+
|
|
1274
|
+
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
1275
|
+
|
|
1276
|
+
| **Name** | **Description** |
|
|
1277
|
+
| --- | --- |
|
|
1278
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunLambdaLayer.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
1279
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunLambdaLayer.isOwnedResource">isOwnedResource</a></code> | Returns true if the construct was created by CDK, and false otherwise. |
|
|
1280
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunLambdaLayer.isResource">isResource</a></code> | Check whether the given construct is a Resource. |
|
|
1281
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunLambdaLayer.fromLayerVersionArn">fromLayerVersionArn</a></code> | Imports a layer version by ARN. |
|
|
1282
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunLambdaLayer.fromLayerVersionAttributes">fromLayerVersionAttributes</a></code> | Imports a Layer that has been defined externally. |
|
|
1283
|
+
|
|
1284
|
+
---
|
|
1285
|
+
|
|
1286
|
+
##### `isConstruct` <a name="isConstruct" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.isConstruct"></a>
|
|
1287
|
+
|
|
1288
|
+
```typescript
|
|
1289
|
+
import { BunLambdaLayer } from '@beesolve/lambda-bun-runtime'
|
|
1290
|
+
|
|
1291
|
+
BunLambdaLayer.isConstruct(x: any)
|
|
1292
|
+
```
|
|
1293
|
+
|
|
1294
|
+
Checks if `x` is a construct.
|
|
1295
|
+
|
|
1296
|
+
Use this method instead of `instanceof` to properly detect `Construct`
|
|
1297
|
+
instances, even when the construct library is symlinked.
|
|
1298
|
+
|
|
1299
|
+
Explanation: in JavaScript, multiple copies of the `constructs` library on
|
|
1300
|
+
disk are seen as independent, completely different libraries. As a
|
|
1301
|
+
consequence, the class `Construct` in each copy of the `constructs` library
|
|
1302
|
+
is seen as a different class, and an instance of one class will not test as
|
|
1303
|
+
`instanceof` the other class. `npm install` will not create installations
|
|
1304
|
+
like this, but users may manually symlink construct libraries together or
|
|
1305
|
+
use a monorepo tool: in those cases, multiple copies of the `constructs`
|
|
1306
|
+
library can be accidentally installed, and `instanceof` will behave
|
|
1307
|
+
unpredictably. It is safest to avoid using `instanceof`, and using
|
|
1308
|
+
this type-testing method instead.
|
|
1309
|
+
|
|
1310
|
+
###### `x`<sup>Required</sup> <a name="x" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.isConstruct.parameter.x"></a>
|
|
1311
|
+
|
|
1312
|
+
- *Type:* any
|
|
1313
|
+
|
|
1314
|
+
Any object.
|
|
1315
|
+
|
|
1316
|
+
---
|
|
1317
|
+
|
|
1318
|
+
##### `isOwnedResource` <a name="isOwnedResource" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.isOwnedResource"></a>
|
|
1319
|
+
|
|
1320
|
+
```typescript
|
|
1321
|
+
import { BunLambdaLayer } from '@beesolve/lambda-bun-runtime'
|
|
1322
|
+
|
|
1323
|
+
BunLambdaLayer.isOwnedResource(construct: IConstruct)
|
|
1324
|
+
```
|
|
1325
|
+
|
|
1326
|
+
Returns true if the construct was created by CDK, and false otherwise.
|
|
1327
|
+
|
|
1328
|
+
###### `construct`<sup>Required</sup> <a name="construct" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.isOwnedResource.parameter.construct"></a>
|
|
1329
|
+
|
|
1330
|
+
- *Type:* constructs.IConstruct
|
|
1331
|
+
|
|
1332
|
+
---
|
|
1333
|
+
|
|
1334
|
+
##### `isResource` <a name="isResource" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.isResource"></a>
|
|
1335
|
+
|
|
1336
|
+
```typescript
|
|
1337
|
+
import { BunLambdaLayer } from '@beesolve/lambda-bun-runtime'
|
|
1338
|
+
|
|
1339
|
+
BunLambdaLayer.isResource(construct: IConstruct)
|
|
1340
|
+
```
|
|
1341
|
+
|
|
1342
|
+
Check whether the given construct is a Resource.
|
|
1343
|
+
|
|
1344
|
+
###### `construct`<sup>Required</sup> <a name="construct" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.isResource.parameter.construct"></a>
|
|
1345
|
+
|
|
1346
|
+
- *Type:* constructs.IConstruct
|
|
1347
|
+
|
|
1348
|
+
---
|
|
1349
|
+
|
|
1350
|
+
##### `fromLayerVersionArn` <a name="fromLayerVersionArn" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.fromLayerVersionArn"></a>
|
|
1351
|
+
|
|
1352
|
+
```typescript
|
|
1353
|
+
import { BunLambdaLayer } from '@beesolve/lambda-bun-runtime'
|
|
1354
|
+
|
|
1355
|
+
BunLambdaLayer.fromLayerVersionArn(scope: Construct, id: string, layerVersionArn: string)
|
|
1356
|
+
```
|
|
1357
|
+
|
|
1358
|
+
Imports a layer version by ARN.
|
|
1359
|
+
|
|
1360
|
+
Assumes it is compatible with all Lambda runtimes.
|
|
1361
|
+
|
|
1362
|
+
###### `scope`<sup>Required</sup> <a name="scope" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.fromLayerVersionArn.parameter.scope"></a>
|
|
1363
|
+
|
|
1364
|
+
- *Type:* constructs.Construct
|
|
1365
|
+
|
|
1366
|
+
---
|
|
1367
|
+
|
|
1368
|
+
###### `id`<sup>Required</sup> <a name="id" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.fromLayerVersionArn.parameter.id"></a>
|
|
1369
|
+
|
|
1370
|
+
- *Type:* string
|
|
1371
|
+
|
|
1372
|
+
---
|
|
1373
|
+
|
|
1374
|
+
###### `layerVersionArn`<sup>Required</sup> <a name="layerVersionArn" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.fromLayerVersionArn.parameter.layerVersionArn"></a>
|
|
1375
|
+
|
|
1376
|
+
- *Type:* string
|
|
1377
|
+
|
|
1378
|
+
---
|
|
1379
|
+
|
|
1380
|
+
##### `fromLayerVersionAttributes` <a name="fromLayerVersionAttributes" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.fromLayerVersionAttributes"></a>
|
|
1381
|
+
|
|
1382
|
+
```typescript
|
|
1383
|
+
import { BunLambdaLayer } from '@beesolve/lambda-bun-runtime'
|
|
1384
|
+
|
|
1385
|
+
BunLambdaLayer.fromLayerVersionAttributes(scope: Construct, id: string, attrs: LayerVersionAttributes)
|
|
1386
|
+
```
|
|
1387
|
+
|
|
1388
|
+
Imports a Layer that has been defined externally.
|
|
1389
|
+
|
|
1390
|
+
###### `scope`<sup>Required</sup> <a name="scope" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.fromLayerVersionAttributes.parameter.scope"></a>
|
|
1391
|
+
|
|
1392
|
+
- *Type:* constructs.Construct
|
|
1393
|
+
|
|
1394
|
+
the parent Construct that will use the imported layer.
|
|
1395
|
+
|
|
1396
|
+
---
|
|
1397
|
+
|
|
1398
|
+
###### `id`<sup>Required</sup> <a name="id" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.fromLayerVersionAttributes.parameter.id"></a>
|
|
1399
|
+
|
|
1400
|
+
- *Type:* string
|
|
1401
|
+
|
|
1402
|
+
the id of the imported layer in the construct tree.
|
|
1403
|
+
|
|
1404
|
+
---
|
|
1405
|
+
|
|
1406
|
+
###### `attrs`<sup>Required</sup> <a name="attrs" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.fromLayerVersionAttributes.parameter.attrs"></a>
|
|
1407
|
+
|
|
1408
|
+
- *Type:* aws-cdk-lib.aws_lambda.LayerVersionAttributes
|
|
1409
|
+
|
|
1410
|
+
the properties of the imported layer.
|
|
1411
|
+
|
|
1412
|
+
---
|
|
1413
|
+
|
|
1414
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
1415
|
+
|
|
1416
|
+
| **Name** | **Type** | **Description** |
|
|
1417
|
+
| --- | --- | --- |
|
|
1418
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunLambdaLayer.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
1419
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunLambdaLayer.property.env">env</a></code> | <code>aws-cdk-lib.interfaces.ResourceEnvironment</code> | The environment this resource belongs to. |
|
|
1420
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunLambdaLayer.property.stack">stack</a></code> | <code>aws-cdk-lib.Stack</code> | The stack in which this resource is defined. |
|
|
1421
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunLambdaLayer.property.layerVersionArn">layerVersionArn</a></code> | <code>string</code> | The ARN of the Lambda Layer version that this Layer defines. |
|
|
1422
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunLambdaLayer.property.layerVersionRef">layerVersionRef</a></code> | <code>aws-cdk-lib.interfaces.aws_lambda.LayerVersionReference</code> | A reference to a LayerVersion resource. |
|
|
1423
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunLambdaLayer.property.compatibleRuntimes">compatibleRuntimes</a></code> | <code>aws-cdk-lib.aws_lambda.Runtime[]</code> | The runtimes compatible with this Layer. |
|
|
1424
|
+
|
|
1425
|
+
---
|
|
1426
|
+
|
|
1427
|
+
##### `node`<sup>Required</sup> <a name="node" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.property.node"></a>
|
|
1428
|
+
|
|
1429
|
+
```typescript
|
|
1430
|
+
public readonly node: Node;
|
|
1431
|
+
```
|
|
1432
|
+
|
|
1433
|
+
- *Type:* constructs.Node
|
|
1434
|
+
|
|
1435
|
+
The tree node.
|
|
1436
|
+
|
|
1437
|
+
---
|
|
1438
|
+
|
|
1439
|
+
##### `env`<sup>Required</sup> <a name="env" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.property.env"></a>
|
|
1440
|
+
|
|
1441
|
+
```typescript
|
|
1442
|
+
public readonly env: ResourceEnvironment;
|
|
1443
|
+
```
|
|
1444
|
+
|
|
1445
|
+
- *Type:* aws-cdk-lib.interfaces.ResourceEnvironment
|
|
1446
|
+
|
|
1447
|
+
The environment this resource belongs to.
|
|
1448
|
+
|
|
1449
|
+
For resources that are created and managed in a Stack (those created by
|
|
1450
|
+
creating new class instances like `new Role()`, `new Bucket()`, etc.), this
|
|
1451
|
+
is always the same as the environment of the stack they belong to.
|
|
1452
|
+
|
|
1453
|
+
For referenced resources (those obtained from referencing methods like
|
|
1454
|
+
`Role.fromRoleArn()`, `Bucket.fromBucketName()`, etc.), they might be
|
|
1455
|
+
different than the stack they were imported into.
|
|
1456
|
+
|
|
1457
|
+
---
|
|
1458
|
+
|
|
1459
|
+
##### `stack`<sup>Required</sup> <a name="stack" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.property.stack"></a>
|
|
1460
|
+
|
|
1461
|
+
```typescript
|
|
1462
|
+
public readonly stack: Stack;
|
|
1463
|
+
```
|
|
1464
|
+
|
|
1465
|
+
- *Type:* aws-cdk-lib.Stack
|
|
1466
|
+
|
|
1467
|
+
The stack in which this resource is defined.
|
|
1468
|
+
|
|
1469
|
+
---
|
|
1470
|
+
|
|
1471
|
+
##### `layerVersionArn`<sup>Required</sup> <a name="layerVersionArn" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.property.layerVersionArn"></a>
|
|
1472
|
+
|
|
1473
|
+
```typescript
|
|
1474
|
+
public readonly layerVersionArn: string;
|
|
1475
|
+
```
|
|
1476
|
+
|
|
1477
|
+
- *Type:* string
|
|
1478
|
+
|
|
1479
|
+
The ARN of the Lambda Layer version that this Layer defines.
|
|
1480
|
+
|
|
1481
|
+
---
|
|
1482
|
+
|
|
1483
|
+
##### `layerVersionRef`<sup>Required</sup> <a name="layerVersionRef" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.property.layerVersionRef"></a>
|
|
1484
|
+
|
|
1485
|
+
```typescript
|
|
1486
|
+
public readonly layerVersionRef: LayerVersionReference;
|
|
1487
|
+
```
|
|
1488
|
+
|
|
1489
|
+
- *Type:* aws-cdk-lib.interfaces.aws_lambda.LayerVersionReference
|
|
1490
|
+
|
|
1491
|
+
A reference to a LayerVersion resource.
|
|
1492
|
+
|
|
1493
|
+
---
|
|
1494
|
+
|
|
1495
|
+
##### `compatibleRuntimes`<sup>Optional</sup> <a name="compatibleRuntimes" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.property.compatibleRuntimes"></a>
|
|
1496
|
+
|
|
1497
|
+
```typescript
|
|
1498
|
+
public readonly compatibleRuntimes: Runtime[];
|
|
1499
|
+
```
|
|
1500
|
+
|
|
1501
|
+
- *Type:* aws-cdk-lib.aws_lambda.Runtime[]
|
|
1502
|
+
|
|
1503
|
+
The runtimes compatible with this Layer.
|
|
1504
|
+
|
|
1505
|
+
---
|
|
1506
|
+
|
|
1507
|
+
#### Constants <a name="Constants" id="Constants"></a>
|
|
1508
|
+
|
|
1509
|
+
| **Name** | **Type** | **Description** |
|
|
1510
|
+
| --- | --- | --- |
|
|
1511
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunLambdaLayer.property.PROPERTY_INJECTION_ID">PROPERTY_INJECTION_ID</a></code> | <code>string</code> | Uniquely identifies this class. |
|
|
1512
|
+
|
|
1513
|
+
---
|
|
1514
|
+
|
|
1515
|
+
##### `PROPERTY_INJECTION_ID`<sup>Required</sup> <a name="PROPERTY_INJECTION_ID" id="@beesolve/lambda-bun-runtime.BunLambdaLayer.property.PROPERTY_INJECTION_ID"></a>
|
|
1516
|
+
|
|
1517
|
+
```typescript
|
|
1518
|
+
public readonly PROPERTY_INJECTION_ID: string;
|
|
1519
|
+
```
|
|
1520
|
+
|
|
1521
|
+
- *Type:* string
|
|
1522
|
+
|
|
1523
|
+
Uniquely identifies this class.
|
|
1524
|
+
|
|
1525
|
+
---
|
|
1526
|
+
|
|
1527
|
+
## Structs <a name="Structs" id="Structs"></a>
|
|
1528
|
+
|
|
1529
|
+
### BunFunctionProps <a name="BunFunctionProps" id="@beesolve/lambda-bun-runtime.BunFunctionProps"></a>
|
|
1530
|
+
|
|
1531
|
+
#### Initializer <a name="Initializer" id="@beesolve/lambda-bun-runtime.BunFunctionProps.Initializer"></a>
|
|
1532
|
+
|
|
1533
|
+
```typescript
|
|
1534
|
+
import { BunFunctionProps } from '@beesolve/lambda-bun-runtime'
|
|
1535
|
+
|
|
1536
|
+
const bunFunctionProps: BunFunctionProps = { ... }
|
|
1537
|
+
```
|
|
1538
|
+
|
|
1539
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
1540
|
+
|
|
1541
|
+
| **Name** | **Type** | **Description** |
|
|
1542
|
+
| --- | --- | --- |
|
|
1543
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunctionProps.property.bunLayer">bunLayer</a></code> | <code><a href="#@beesolve/lambda-bun-runtime.BunLambdaLayer">BunLambdaLayer</a></code> | Bun layer needs to be set. |
|
|
1544
|
+
| <code><a href="#@beesolve/lambda-bun-runtime.BunFunctionProps.property.entrypoint">entrypoint</a></code> | <code>string</code> | Example: `${__dirname}/dist/index.js`. |
|
|
1545
|
+
|
|
1546
|
+
---
|
|
1547
|
+
|
|
1548
|
+
##### `bunLayer`<sup>Required</sup> <a name="bunLayer" id="@beesolve/lambda-bun-runtime.BunFunctionProps.property.bunLayer"></a>
|
|
1549
|
+
|
|
1550
|
+
```typescript
|
|
1551
|
+
public readonly bunLayer: BunLambdaLayer;
|
|
1552
|
+
```
|
|
1553
|
+
|
|
1554
|
+
- *Type:* <a href="#@beesolve/lambda-bun-runtime.BunLambdaLayer">BunLambdaLayer</a>
|
|
1555
|
+
|
|
1556
|
+
Bun layer needs to be set.
|
|
1557
|
+
|
|
1558
|
+
---
|
|
1559
|
+
|
|
1560
|
+
##### `entrypoint`<sup>Required</sup> <a name="entrypoint" id="@beesolve/lambda-bun-runtime.BunFunctionProps.property.entrypoint"></a>
|
|
1561
|
+
|
|
1562
|
+
```typescript
|
|
1563
|
+
public readonly entrypoint: string;
|
|
1564
|
+
```
|
|
1565
|
+
|
|
1566
|
+
- *Type:* string
|
|
1567
|
+
|
|
1568
|
+
Example: `${__dirname}/dist/index.js`.
|
|
1569
|
+
|
|
1570
|
+
---
|
|
1571
|
+
|
|
1572
|
+
### BunLambdaLayerProps <a name="BunLambdaLayerProps" id="@beesolve/lambda-bun-runtime.BunLambdaLayerProps"></a>
|
|
1573
|
+
|
|
1574
|
+
#### Initializer <a name="Initializer" id="@beesolve/lambda-bun-runtime.BunLambdaLayerProps.Initializer"></a>
|
|
1575
|
+
|
|
1576
|
+
```typescript
|
|
1577
|
+
import { BunLambdaLayerProps } from '@beesolve/lambda-bun-runtime'
|
|
1578
|
+
|
|
1579
|
+
const bunLambdaLayerProps: BunLambdaLayerProps = { ... }
|
|
1580
|
+
```
|
|
1581
|
+
|
|
1582
|
+
|
|
1583
|
+
|
|
1584
|
+
|