import { BunFunction } from '@beesolve/lambda-bun-runtime'
new BunFunction(scope: Construct, id: string, props: BunFunctionProps)| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
BunFunctionProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: BunFunctionProps
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
applyRemovalPolicy |
Apply the given removal policy to this resource. |
addEventSource |
Adds an event source to this function. |
addEventSourceMapping |
Adds an event source that maps to this AWS Lambda function. |
addFunctionUrl |
Adds a url to this lambda function. |
addPermission |
Adds a permission to the Lambda resource policy. |
addToRolePolicy |
Adds a statement to the IAM role assumed by the instance. |
configureAsyncInvoke |
Configures options for asynchronous invocation. |
considerWarningOnInvokeFunctionPermissions |
A warning will be added to functions under the following conditions: - permissions that include lambda:InvokeFunction are added to the unqualified function. |
grantInvoke |
Grant the given identity permissions to invoke this Lambda. |
grantInvokeCompositePrincipal |
Grant multiple principals the ability to invoke this Lambda via CompositePrincipal. |
grantInvokeLatestVersion |
Grant the given identity permissions to invoke the $LATEST version or unqualified version of this Lambda. |
grantInvokeUrl |
Grant the given identity permissions to invoke this Lambda Function URL. |
grantInvokeVersion |
Grant the given identity permissions to invoke the given version of this Lambda. |
metric |
Return the given named metric for this Function. |
metricDuration |
How long execution of this Lambda takes. |
metricErrors |
How many invocations of this Lambda fail. |
metricInvocations |
How often this Lambda is invoked. |
metricThrottles |
How often this Lambda is throttled. |
addAlias |
Defines an alias for this function. |
addEnvironment |
Adds an environment variable to this Lambda function. |
addLayers |
Adds one or more Lambda Layers to this Lambda function. |
invalidateVersionBasedOn |
Mix additional information into the hash of the Version object. |
public toString(): stringReturns a string representation of this construct.
public applyRemovalPolicy(policy: RemovalPolicy): voidApply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN).
- Type: aws-cdk-lib.RemovalPolicy
public addEventSource(source: IEventSource): voidAdds an event source to this function.
Event sources are implemented in the aws-cdk-lib/aws-lambda-event-sources module.
The following example adds an SQS Queue as an event source:
import { SqsEventSource } from 'aws-cdk-lib/aws-lambda-event-sources';
myFunction.addEventSource(new SqsEventSource(myQueue));
- Type: aws-cdk-lib.aws_lambda.IEventSource
public addEventSourceMapping(id: string, options: EventSourceMappingOptions): EventSourceMappingAdds an event source that maps to this AWS Lambda function.
- Type: string
- Type: aws-cdk-lib.aws_lambda.EventSourceMappingOptions
public addFunctionUrl(options?: FunctionUrlOptions): FunctionUrlAdds a url to this lambda function.
- Type: aws-cdk-lib.aws_lambda.FunctionUrlOptions
public addPermission(id: string, permission: Permission): voidAdds a permission to the Lambda resource policy.
[Permission for details.](Permission for details.)
- Type: string
The id for the permission construct.
- Type: aws-cdk-lib.aws_lambda.Permission
The permission to grant to this Lambda function.
public addToRolePolicy(statement: PolicyStatement): voidAdds a statement to the IAM role assumed by the instance.
- Type: aws-cdk-lib.aws_iam.PolicyStatement
public configureAsyncInvoke(options: EventInvokeConfigOptions): voidConfigures options for asynchronous invocation.
- Type: aws-cdk-lib.aws_lambda.EventInvokeConfigOptions
public considerWarningOnInvokeFunctionPermissions(scope: Construct, action: string): voidA warning will be added to functions under the following conditions: - permissions that include lambda:InvokeFunction are added to the unqualified function.
function.currentVersion is invoked before or after the permission is created.
This applies only to permissions on Lambda functions, not versions or aliases. This function is overridden as a noOp for QualifiedFunctionBase.
- Type: constructs.Construct
- Type: string
public grantInvoke(grantee: IGrantable): GrantGrant the given identity permissions to invoke this Lambda.
[disable-awslint:no-grants]
- Type: aws-cdk-lib.aws_iam.IGrantable
public grantInvokeCompositePrincipal(compositePrincipal: CompositePrincipal): Grant[]Grant multiple principals the ability to invoke this Lambda via CompositePrincipal.
[disable-awslint:no-grants]
- Type: aws-cdk-lib.aws_iam.CompositePrincipal
public grantInvokeLatestVersion(grantee: IGrantable): GrantGrant the given identity permissions to invoke the $LATEST version or unqualified version of this Lambda.
[disable-awslint:no-grants]
- Type: aws-cdk-lib.aws_iam.IGrantable
public grantInvokeUrl(grantee: IGrantable): GrantGrant the given identity permissions to invoke this Lambda Function URL.
[disable-awslint:no-grants]
- Type: aws-cdk-lib.aws_iam.IGrantable
public grantInvokeVersion(grantee: IGrantable, version: IVersion): GrantGrant the given identity permissions to invoke the given version of this Lambda.
[disable-awslint:no-grants]
- Type: aws-cdk-lib.aws_iam.IGrantable
- Type: aws-cdk-lib.aws_lambda.IVersion
public metric(metricName: string, props?: MetricOptions): MetricReturn the given named metric for this Function.
- Type: string
- Type: aws-cdk-lib.aws_cloudwatch.MetricOptions
public metricDuration(props?: MetricOptions): MetricHow long execution of this Lambda takes.
Average over 5 minutes
- Type: aws-cdk-lib.aws_cloudwatch.MetricOptions
public metricErrors(props?: MetricOptions): MetricHow many invocations of this Lambda fail.
Sum over 5 minutes
- Type: aws-cdk-lib.aws_cloudwatch.MetricOptions
public metricInvocations(props?: MetricOptions): MetricHow often this Lambda is invoked.
Sum over 5 minutes
- Type: aws-cdk-lib.aws_cloudwatch.MetricOptions
public metricThrottles(props?: MetricOptions): MetricHow often this Lambda is throttled.
Sum over 5 minutes
- Type: aws-cdk-lib.aws_cloudwatch.MetricOptions
public addAlias(aliasName: string, options?: AliasOptions): AliasDefines an alias for this function.
The alias will automatically be updated to point to the latest version of the function as it is being updated during a deployment.
declare const fn: lambda.Function;
fn.addAlias('Live');
// Is equivalent to
new lambda.Alias(this, 'AliasLive', {
aliasName: 'Live',
version: fn.currentVersion,
});- Type: string
The name of the alias.
- Type: aws-cdk-lib.aws_lambda.AliasOptions
Alias options.
public addEnvironment(key: string, value: string, options?: EnvironmentOptions): FunctionAdds an environment variable to this Lambda function.
If this is a ref to a Lambda function, this operation results in a no-op.
- Type: string
The environment variable key.
- Type: string
The environment variable's value.
- Type: aws-cdk-lib.aws_lambda.EnvironmentOptions
Environment variable options.
public addLayers(layers: ...ILayerVersion[]): voidAdds one or more Lambda Layers to this Lambda function.
- Type: ...aws-cdk-lib.aws_lambda.ILayerVersion[]
the layers to be added.
public invalidateVersionBasedOn(x: string): voidMix additional information into the hash of the Version object.
The Lambda Function construct does its best to automatically create a new Version when anything about the Function changes (its code, its layers, any of the other properties).
However, you can sometimes source information from places that the CDK cannot look into, like the deploy-time values of SSM parameters. In those cases, the CDK would not force the creation of a new Version object when it actually should.
This method can be used to invalidate the current Version object. Pass in any string into this method, and make sure the string changes when you know a new Version needs to be created.
This method may be called more than once.
- Type: string
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isOwnedResource |
Returns true if the construct was created by CDK, and false otherwise. |
isResource |
Check whether the given construct is a Resource. |
classifyVersionProperty |
Record whether specific properties in the AWS::Lambda::Function resource should also be associated to the Version resource. |
fromFunctionArn |
Import a lambda function into the CDK using its ARN. |
fromFunctionAttributes |
Creates a Lambda function object which represents a function not defined within this stack. |
fromFunctionName |
Import a lambda function into the CDK using its name. |
metricAll |
Return the given named metric for this Lambda. |
metricAllConcurrentExecutions |
Metric for the number of concurrent executions across all Lambdas. |
metricAllDuration |
Metric for the Duration executing all Lambdas. |
metricAllErrors |
Metric for the number of Errors executing all Lambdas. |
metricAllInvocations |
Metric for the number of invocations of all Lambdas. |
metricAllThrottles |
Metric for the number of throttled invocations of all Lambdas. |
metricAllUnreservedConcurrentExecutions |
Metric for the number of unreserved concurrent executions across all Lambdas. |
import { BunFunction } from '@beesolve/lambda-bun-runtime'
BunFunction.isConstruct(x: any)Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
- Type: any
Any object.
import { BunFunction } from '@beesolve/lambda-bun-runtime'
BunFunction.isOwnedResource(construct: IConstruct)Returns true if the construct was created by CDK, and false otherwise.
- Type: constructs.IConstruct
import { BunFunction } from '@beesolve/lambda-bun-runtime'
BunFunction.isResource(construct: IConstruct)Check whether the given construct is a Resource.
- Type: constructs.IConstruct
import { BunFunction } from '@beesolve/lambda-bun-runtime'
BunFunction.classifyVersionProperty(propertyName: string, locked: boolean)Record whether specific properties in the AWS::Lambda::Function resource should also be associated to the Version resource.
See 'currentVersion' section in the module README for more details.
- Type: string
The property to classify.
- Type: boolean
whether the property should be associated to the version or not.
import { BunFunction } from '@beesolve/lambda-bun-runtime'
BunFunction.fromFunctionArn(scope: Construct, id: string, functionArn: string)Import a lambda function into the CDK using its ARN.
For Function.addPermissions() to work on this imported lambda, make sure that is
in the same account and region as the stack you are importing it into.
- Type: constructs.Construct
- Type: string
- Type: string
import { BunFunction } from '@beesolve/lambda-bun-runtime'
BunFunction.fromFunctionAttributes(scope: Construct, id: string, attrs: FunctionAttributes)Creates a Lambda function object which represents a function not defined within this stack.
For Function.addPermissions() to work on this imported lambda, set the sameEnvironment property to true
if this imported lambda is in the same account and region as the stack you are importing it into.
- Type: constructs.Construct
The parent construct.
- Type: string
The name of the lambda construct.
- Type: aws-cdk-lib.aws_lambda.FunctionAttributes
the attributes of the function to import.
import { BunFunction } from '@beesolve/lambda-bun-runtime'
BunFunction.fromFunctionName(scope: Construct, id: string, functionName: string)Import a lambda function into the CDK using its name.
- Type: constructs.Construct
- Type: string
- Type: string
import { BunFunction } from '@beesolve/lambda-bun-runtime'
BunFunction.metricAll(metricName: string, props?: MetricOptions)Return the given named metric for this Lambda.
- Type: string
- Type: aws-cdk-lib.aws_cloudwatch.MetricOptions
import { BunFunction } from '@beesolve/lambda-bun-runtime'
BunFunction.metricAllConcurrentExecutions(props?: MetricOptions)Metric for the number of concurrent executions across all Lambdas.
- Type: aws-cdk-lib.aws_cloudwatch.MetricOptions
import { BunFunction } from '@beesolve/lambda-bun-runtime'
BunFunction.metricAllDuration(props?: MetricOptions)Metric for the Duration executing all Lambdas.
- Type: aws-cdk-lib.aws_cloudwatch.MetricOptions
import { BunFunction } from '@beesolve/lambda-bun-runtime'
BunFunction.metricAllErrors(props?: MetricOptions)Metric for the number of Errors executing all Lambdas.
- Type: aws-cdk-lib.aws_cloudwatch.MetricOptions
import { BunFunction } from '@beesolve/lambda-bun-runtime'
BunFunction.metricAllInvocations(props?: MetricOptions)Metric for the number of invocations of all Lambdas.
- Type: aws-cdk-lib.aws_cloudwatch.MetricOptions
import { BunFunction } from '@beesolve/lambda-bun-runtime'
BunFunction.metricAllThrottles(props?: MetricOptions)Metric for the number of throttled invocations of all Lambdas.
- Type: aws-cdk-lib.aws_cloudwatch.MetricOptions
import { BunFunction } from '@beesolve/lambda-bun-runtime'
BunFunction.metricAllUnreservedConcurrentExecutions(props?: MetricOptions)Metric for the number of unreserved concurrent executions across all Lambdas.
- Type: aws-cdk-lib.aws_cloudwatch.MetricOptions
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
env |
aws-cdk-lib.interfaces.ResourceEnvironment |
The environment this resource belongs to. |
stack |
aws-cdk-lib.Stack |
The stack in which this resource is defined. |
architecture |
aws-cdk-lib.aws_lambda.Architecture |
The architecture of this Lambda Function (this is an optional attribute and defaults to X86_64). |
connections |
aws-cdk-lib.aws_ec2.Connections |
Access the Connections object. |
functionArn |
string |
ARN of this function. |
functionName |
string |
Name of this function. |
functionRef |
aws-cdk-lib.interfaces.aws_lambda.FunctionReference |
A reference to a Function resource. |
grantPrincipal |
aws-cdk-lib.aws_iam.IPrincipal |
The principal this Lambda Function is running as. |
isBoundToVpc |
boolean |
Whether or not this Lambda function was bound to a VPC. |
latestVersion |
aws-cdk-lib.aws_lambda.IVersion |
The $LATEST version of this function. |
permissionsNode |
constructs.Node |
The construct node where permissions are attached. |
resourceArnsForGrantInvoke |
string[] |
The ARN(s) to put into the resource field of the generated IAM policy for grantInvoke(). |
role |
aws-cdk-lib.aws_iam.IRole |
Execution role associated with this function. |
tenancyConfig |
aws-cdk-lib.aws_lambda.TenancyConfig |
The tenancy configuration for this function. |
currentVersion |
aws-cdk-lib.aws_lambda.Version |
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. |
logGroup |
aws-cdk-lib.aws_logs.ILogGroup |
The LogGroup where the Lambda function's logs are made available. |
runtime |
aws-cdk-lib.aws_lambda.Runtime |
The runtime configured for this lambda. |
deadLetterQueue |
aws-cdk-lib.aws_sqs.IQueue |
The DLQ (as queue) associated with this Lambda Function (this is an optional attribute). |
deadLetterTopic |
aws-cdk-lib.aws_sns.ITopic |
The DLQ (as topic) associated with this Lambda Function (this is an optional attribute). |
timeout |
aws-cdk-lib.Duration |
The timeout configured for this lambda. |
public readonly node: Node;- Type: constructs.Node
The tree node.
public readonly env: ResourceEnvironment;- Type: aws-cdk-lib.interfaces.ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
public readonly stack: Stack;- Type: aws-cdk-lib.Stack
The stack in which this resource is defined.
public readonly architecture: Architecture;- Type: aws-cdk-lib.aws_lambda.Architecture
The architecture of this Lambda Function (this is an optional attribute and defaults to X86_64).
public readonly connections: Connections;- Type: aws-cdk-lib.aws_ec2.Connections
Access the Connections object.
Will fail if not a VPC-enabled Lambda Function
public readonly functionArn: string;- Type: string
ARN of this function.
public readonly functionName: string;- Type: string
Name of this function.
public readonly functionRef: FunctionReference;- Type: aws-cdk-lib.interfaces.aws_lambda.FunctionReference
A reference to a Function resource.
public readonly grantPrincipal: IPrincipal;- Type: aws-cdk-lib.aws_iam.IPrincipal
The principal this Lambda Function is running as.
public readonly isBoundToVpc: boolean;- Type: boolean
Whether or not this Lambda function was bound to a VPC.
If this is is false, trying to access the connections object will fail.
public readonly latestVersion: IVersion;- Type: aws-cdk-lib.aws_lambda.IVersion
The $LATEST version of this function.
Note that this is reference to a non-specific AWS Lambda version, which means the function this version refers to can return different results in different invocations.
To obtain a reference to an explicit version which references the current
function configuration, use lambdaFunction.currentVersion instead.
public readonly permissionsNode: Node;- Type: constructs.Node
The construct node where permissions are attached.
public readonly resourceArnsForGrantInvoke: string[];- Type: string[]
The ARN(s) to put into the resource field of the generated IAM policy for grantInvoke().
public readonly role: IRole;- Type: aws-cdk-lib.aws_iam.IRole
Execution role associated with this function.
public readonly tenancyConfig: TenancyConfig;- Type: aws-cdk-lib.aws_lambda.TenancyConfig
The tenancy configuration for this function.
public readonly currentVersion: Version;- Type: aws-cdk-lib.aws_lambda.Version
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.
You can specify options for this version using the currentVersionOptions
prop when initializing the lambda.Function.
public readonly logGroup: ILogGroup;- Type: aws-cdk-lib.aws_logs.ILogGroup
The LogGroup where the Lambda function's logs are made available.
If either logRetention is set or this property is called, a CloudFormation custom resource is added to the stack that
pre-creates the log group as part of the stack deployment, if it already doesn't exist, and sets the correct log retention
period (never expire, by default).
Further, if the log group already exists and the logRetention is not set, the custom resource will reset the log retention
to never expire even if it was configured with a different value.
public readonly runtime: Runtime;- Type: aws-cdk-lib.aws_lambda.Runtime
The runtime configured for this lambda.
public readonly deadLetterQueue: IQueue;- Type: aws-cdk-lib.aws_sqs.IQueue
The DLQ (as queue) associated with this Lambda Function (this is an optional attribute).
public readonly deadLetterTopic: ITopic;- Type: aws-cdk-lib.aws_sns.ITopic
The DLQ (as topic) associated with this Lambda Function (this is an optional attribute).
public readonly timeout: Duration;- Type: aws-cdk-lib.Duration
The timeout configured for this lambda.
| Name | Type | Description |
|---|---|---|
PROPERTY_INJECTION_ID |
string |
Uniquely identifies this class. |
public readonly PROPERTY_INJECTION_ID: string;- Type: string
Uniquely identifies this class.
import { BunLambdaLayer } from '@beesolve/lambda-bun-runtime'
new BunLambdaLayer(scope: Construct, id: string, props?: BunLambdaLayerProps)| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
string |
No description. |
props |
BunLambdaLayerProps |
No description. |
- Type: constructs.Construct
- Type: string
- Type: BunLambdaLayerProps
| Name | Description |
|---|---|
toString |
Returns a string representation of this construct. |
applyRemovalPolicy |
Apply the given removal policy to this resource. |
addPermission |
Add permission for this layer version to specific entities. |
public toString(): stringReturns a string representation of this construct.
public applyRemovalPolicy(policy: RemovalPolicy): voidApply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN).
- Type: aws-cdk-lib.RemovalPolicy
public addPermission(id: string, permission: LayerVersionPermission): voidAdd permission for this layer version to specific entities.
Usage within
the same account where the layer is defined is always allowed and does not
require calling this method. Note that the principal that creates the
Lambda function using the layer (for example, a CloudFormation changeset
execution role) also needs to have the lambda:GetLayerVersion
permission on the layer version.
- Type: string
- Type: aws-cdk-lib.aws_lambda.LayerVersionPermission
| Name | Description |
|---|---|
isConstruct |
Checks if x is a construct. |
isOwnedResource |
Returns true if the construct was created by CDK, and false otherwise. |
isResource |
Check whether the given construct is a Resource. |
fromLayerVersionArn |
Imports a layer version by ARN. |
fromLayerVersionAttributes |
Imports a Layer that has been defined externally. |
import { BunLambdaLayer } from '@beesolve/lambda-bun-runtime'
BunLambdaLayer.isConstruct(x: any)Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
- Type: any
Any object.
import { BunLambdaLayer } from '@beesolve/lambda-bun-runtime'
BunLambdaLayer.isOwnedResource(construct: IConstruct)Returns true if the construct was created by CDK, and false otherwise.
- Type: constructs.IConstruct
import { BunLambdaLayer } from '@beesolve/lambda-bun-runtime'
BunLambdaLayer.isResource(construct: IConstruct)Check whether the given construct is a Resource.
- Type: constructs.IConstruct
import { BunLambdaLayer } from '@beesolve/lambda-bun-runtime'
BunLambdaLayer.fromLayerVersionArn(scope: Construct, id: string, layerVersionArn: string)Imports a layer version by ARN.
Assumes it is compatible with all Lambda runtimes.
- Type: constructs.Construct
- Type: string
- Type: string
import { BunLambdaLayer } from '@beesolve/lambda-bun-runtime'
BunLambdaLayer.fromLayerVersionAttributes(scope: Construct, id: string, attrs: LayerVersionAttributes)Imports a Layer that has been defined externally.
- Type: constructs.Construct
the parent Construct that will use the imported layer.
- Type: string
the id of the imported layer in the construct tree.
- Type: aws-cdk-lib.aws_lambda.LayerVersionAttributes
the properties of the imported layer.
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
env |
aws-cdk-lib.interfaces.ResourceEnvironment |
The environment this resource belongs to. |
stack |
aws-cdk-lib.Stack |
The stack in which this resource is defined. |
layerVersionArn |
string |
The ARN of the Lambda Layer version that this Layer defines. |
layerVersionRef |
aws-cdk-lib.interfaces.aws_lambda.LayerVersionReference |
A reference to a LayerVersion resource. |
compatibleRuntimes |
aws-cdk-lib.aws_lambda.Runtime[] |
The runtimes compatible with this Layer. |
public readonly node: Node;- Type: constructs.Node
The tree node.
public readonly env: ResourceEnvironment;- Type: aws-cdk-lib.interfaces.ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
public readonly stack: Stack;- Type: aws-cdk-lib.Stack
The stack in which this resource is defined.
public readonly layerVersionArn: string;- Type: string
The ARN of the Lambda Layer version that this Layer defines.
public readonly layerVersionRef: LayerVersionReference;- Type: aws-cdk-lib.interfaces.aws_lambda.LayerVersionReference
A reference to a LayerVersion resource.
public readonly compatibleRuntimes: Runtime[];- Type: aws-cdk-lib.aws_lambda.Runtime[]
The runtimes compatible with this Layer.
| Name | Type | Description |
|---|---|---|
PROPERTY_INJECTION_ID |
string |
Uniquely identifies this class. |
public readonly PROPERTY_INJECTION_ID: string;- Type: string
Uniquely identifies this class.
import { BunFunctionProps } from '@beesolve/lambda-bun-runtime'
const bunFunctionProps: BunFunctionProps = { ... }| Name | Type | Description |
|---|---|---|
bunLayer |
BunLambdaLayer |
Bun layer needs to be set. |
entrypoint |
string |
Example: ${__dirname}/dist/index.js. |
public readonly bunLayer: BunLambdaLayer;- Type: BunLambdaLayer
Bun layer needs to be set.
public readonly entrypoint: string;- Type: string
Example: ${__dirname}/dist/index.js.
import { BunLambdaLayerProps } from '@beesolve/lambda-bun-runtime'
const bunLambdaLayerProps: BunLambdaLayerProps = { ... }