Defined in: src/progressive-lambda/progressive-lambda.ts:16
Configuration properties for the ProgressiveLambda construct.
Extends NodejsFunctionProps to inherit all standard Lambda function configuration options.
Extends
NodejsFunctionProps
Properties
adotInstrumentation?
readonly
optional
adotInstrumentation:AdotInstrumentationConfig
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:347
Specify the configuration of AWS Distro for OpenTelemetry (ADOT) instrumentation
See
https://aws-otel.github.io/docs/getting-started/lambda
Default
- No ADOT instrumentation
Inherited from
nodeLambda.NodejsFunctionProps.adotInstrumentation
alarmConfiguration?
optional
alarmConfiguration:object
Defined in: src/progressive-lambda/progressive-lambda.ts:181
Optional configuration overrides for the CloudWatch alarm.
Allows customization of alarm properties such as threshold, evaluation periods, and missing data treatment. Merges with sensible defaults provided by the construct.
evaluationPeriods?
optional
evaluationPeriods:number
threshold?
optional
threshold:number
treatMissingData?
optional
treatMissingData:TreatMissingData
Example
alarmConfiguration: {
threshold: 5, // Trigger alarm on 5 errors instead of default 10
evaluationPeriods: 2, // Require 2 consecutive periods to trigger
treatMissingData: cloudwatch.TreatMissingData.BREACHING, // Change missing data handling
}
alarmEnabled
alarmEnabled:
boolean
Defined in: src/progressive-lambda/progressive-lambda.ts:68
Whether CloudWatch alarms should trigger actions when breached.
When false
, alarms are created but won't send notifications or trigger auto-rollbacks.
Useful for testing or monitoring-only scenarios.
Default
true
allowAllIpv6Outbound?
readonly
optional
allowAllIpv6Outbound:boolean
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:280
Whether to allow the Lambda to send all ipv6 network traffic
If set to true, there will only be a single egress rule which allows all outbound ipv6 traffic. If set to false, you must individually add traffic rules to allow the Lambda to connect to network targets using ipv6.
Do not specify this property if the securityGroups
or securityGroup
property is set.
Instead, configure allowAllIpv6Outbound
directly on the security group.
Default
false
Inherited from
nodeLambda.NodejsFunctionProps.allowAllIpv6Outbound
allowAllOutbound?
readonly
optional
allowAllOutbound:boolean
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:267
Whether to allow the Lambda to send all network traffic (except ipv6)
If set to false, you must individually add traffic rules to allow the Lambda to connect to network targets.
Do not specify this property if the securityGroups
or securityGroup
property is set.
Instead, configure allowAllOutbound
directly on the security group.
Default
true
Inherited from
nodeLambda.NodejsFunctionProps.allowAllOutbound
allowPublicSubnet?
readonly
optional
allowPublicSubnet:boolean
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:453
Lambda Functions in a public subnet can NOT access the internet. Use this property to acknowledge this limitation and still place the function in a public subnet.
See
Default
false
Inherited from
nodeLambda.NodejsFunctionProps.allowPublicSubnet
application
application:
LambdaApplication
Defined in: src/progressive-lambda/progressive-lambda.ts:46
The CodeDeploy application that manages this Lambda function's deployments.
See
applicationLogLevel?
readonly
optional
applicationLogLevel:string
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:513
Sets the application log level for the function.
Deprecated
Use applicationLogLevelV2
as a property instead.
Default
"INFO"
Inherited from
nodeLambda.NodejsFunctionProps.applicationLogLevel
applicationLogLevelV2?
readonly
optional
applicationLogLevelV2:ApplicationLogLevel
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:518
Sets the application log level for the function.
Default
ApplicationLogLevel.INFO
Inherited from
nodeLambda.NodejsFunctionProps.applicationLogLevelV2
architecture?
readonly
optional
architecture:Architecture
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:470
The system architectures compatible with this lambda function.
Default
Architecture.X86_64
Inherited from
nodeLambda.NodejsFunctionProps.architecture
awsSdkConnectionReuse?
readonly
optional
awsSdkConnectionReuse:boolean
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda-nodejs/lib/function.d.ts:55
The AWS_NODEJS_CONNECTION_REUSE_ENABLED
environment variable does not exist in the AWS SDK for JavaScript v3.
This prop will be deprecated when the Lambda Node16 runtime is deprecated on June 12, 2024. See https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html#runtime-support-policy
Info for Node 16 runtimes / SDK v2 users:
Whether to automatically reuse TCP connections when working with the AWS SDK for JavaScript v2.
This sets the AWS_NODEJS_CONNECTION_REUSE_ENABLED
environment variable
to 1
.
See
https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-reusing-connections.html
Default
- false (obsolete) for runtimes >= Node 18, true for runtimes <= Node 16.
Inherited from
nodeLambda.NodejsFunctionProps.awsSdkConnectionReuse
bundling?
readonly
optional
bundling:BundlingOptions
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda-nodejs/lib/function.d.ts:75
Bundling options
Default
- use default bundling options: no minify, no sourcemap, all
modules are bundled.
Inherited from
nodeLambda.NodejsFunctionProps.bundling
code?
readonly
optional
code:Code
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda-nodejs/lib/function.d.ts:90
The code that will be deployed to the Lambda Handler. If included, then properties related to bundling of the code are ignored.
- If the
code
field is specified, then you must include thehandler
property.
Default
- the code is bundled by esbuild
Inherited from
nodeLambda.NodejsFunctionProps.code
codeSigningConfig?
readonly
optional
codeSigningConfig:ICodeSigningConfig
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:465
Code signing config associated with this function
Default
- Not Sign the Code
Inherited from
nodeLambda.NodejsFunctionProps.codeSigningConfig
createWidget?
optional
createWidget:boolean
Defined in: src/progressive-lambda/progressive-lambda.ts:27
Whether to create CloudWatch dashboard widgets for monitoring.
When enabled, creates three widgets:
- Success metric single value widget
- Error metric single value widget
- Alarm status widget
Default
false
currentVersionOptions?
readonly
optional
currentVersionOptions:VersionOptions
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:439
Options for the lambda.Version
resource automatically created by the
fn.currentVersion
method.
Default
- default options as described in
VersionOptions
Inherited from
nodeLambda.NodejsFunctionProps.currentVersionOptions
deadLetterQueue?
readonly
optional
deadLetterQueue:IQueue
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:294
The SQS queue to use if DLQ is enabled.
If SNS topic is desired, specify deadLetterTopic
property instead.
Default
- SQS queue with 14 day retention period if
deadLetterQueueEnabled
istrue
Inherited from
nodeLambda.NodejsFunctionProps.deadLetterQueue
deadLetterQueueEnabled?
readonly
optional
deadLetterQueueEnabled:boolean
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:287
Enabled DLQ. If deadLetterQueue
is undefined,
an SQS queue with default options will be defined for your Function.
Default
- false unless
deadLetterQueue
is set, which implies DLQ is enabled.
Inherited from
nodeLambda.NodejsFunctionProps.deadLetterQueueEnabled
deadLetterTopic?
readonly
optional
deadLetterTopic:ITopic
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:302
The SNS topic to use as a DLQ.
Note that if deadLetterQueueEnabled
is set to true
, an SQS queue will be created
rather than an SNS topic. Using an SNS topic as a DLQ requires this property to be set explicitly.
Default
- no SNS topic
Inherited from
nodeLambda.NodejsFunctionProps.deadLetterTopic
deploymentConfig
deploymentConfig:
ILambdaDeploymentConfig
Defined in: src/progressive-lambda/progressive-lambda.ts:58
The deployment configuration defining how traffic shifts during deployments.
Common options:
LambdaDeploymentConfig.LINEAR_10PERCENT_EVERY_1MINUTE
- Gradual linear shiftLambdaDeploymentConfig.CANARY_10PERCENT_5MINUTES
- Canary deploymentLambdaDeploymentConfig.ALL_AT_ONCE
- Blue/green deployment
See
depsLockFilePath?
readonly
optional
depsLockFilePath:string
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda-nodejs/lib/function.d.ts:68
The path to the dependencies lock file (yarn.lock
, pnpm-lock.yaml
, bun.lockb
or package-lock.json
).
This will be used as the source for the volume mounted in the Docker container.
Modules specified in nodeModules
will be installed using the right
installer (yarn
, pnpm
, bun
or npm
) along with this lock file.
Default
- the path is found by walking up parent directories searching for
a
yarn.lock
,pnpm-lock.yaml
,bun.lockb
orpackage-lock.json
file
Inherited from
nodeLambda.NodejsFunctionProps.depsLockFilePath
description?
readonly
optional
description:string
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:150
A description of the function.
Default
- No description.
Inherited from
nodeLambda.NodejsFunctionProps.description
entry?
readonly
optional
entry:string
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda-nodejs/lib/function.d.ts:16
Path to the entry file (JavaScript or TypeScript).
Default
- Derived from the name of the defining file and the construct's id.
If the
NodejsFunction
is defined instack.ts
withmy-handler
as id (new NodejsFunction(this, 'my-handler')
), the construct will look atstack.my-handler.ts
andstack.my-handler.js
.
Inherited from
nodeLambda.NodejsFunctionProps.entry
environment?
readonly
optional
environment:object
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:167
Key-value pairs that Lambda caches and makes available for your Lambda functions. Use environment variables to apply configuration changes, such as test and production environment configurations, without changing your Lambda function source code.
Index Signature
[key
: string
]: string
Default
- No environment variables.
Inherited from
nodeLambda.NodejsFunctionProps.environment
environmentEncryption?
readonly
optional
environmentEncryption:IKey
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:459
The AWS KMS key that's used to encrypt your function's environment variables.
Default
- AWS Lambda creates and uses an AWS managed customer master key (CMK).
Inherited from
nodeLambda.NodejsFunctionProps.environmentEncryption
ephemeralStorageSize?
readonly
optional
ephemeralStorageSize:Size
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:191
The size of the function’s /tmp directory in MiB.
Default
512 MiB
Inherited from
nodeLambda.NodejsFunctionProps.ephemeralStorageSize
events?
readonly
optional
events:IEventSource
[]
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:378
Event sources for this function.
You can also add event sources using addEventSource
.
Default
- No event sources.
Inherited from
nodeLambda.NodejsFunctionProps.events
filesystem?
readonly
optional
filesystem:FileSystem
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:445
The filesystem configuration for the lambda function
Default
- will not mount any filesystem
Inherited from
nodeLambda.NodejsFunctionProps.filesystem
functionName?
readonly
optional
functionName:string
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:176
A name for the function.
Default
- AWS CloudFormation generates a unique physical ID and uses that
ID for the function's name. For more information, see Name Type.
Inherited from
nodeLambda.NodejsFunctionProps.functionName
handler?
readonly
optional
handler:string
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda-nodejs/lib/function.d.ts:29
The name of the exported handler in the entry file.
-
If the
code
property is supplied, then you must include thehandler
property. The handler should be the name of the file that contains the exported handler and the function that should be called when the AWS Lambda is invoked. For example, if you had a file calledmyLambda.js
and the function to be invoked wasmyHandler
, then you should inputhandler
property asmyLambda.myHandler
. -
If the
code
property is not supplied and the handler input does not contain a.
, then the handler is prefixed withindex.
(index period). Otherwise, the handler property is not modified.
Default
handler
Inherited from
nodeLambda.NodejsFunctionProps.handler
initialPolicy?
readonly
optional
initialPolicy:PolicyStatement
[]
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:199
Initial policy statements to add to the created Lambda Role.
You can call addToRolePolicy
to the created lambda to add statements post creation.
Default
- No policy statements are added to the created Lambda role.
Inherited from
nodeLambda.NodejsFunctionProps.initialPolicy
insightsVersion?
readonly
optional
insightsVersion:LambdaInsightsVersion
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:340
Specify the version of CloudWatch Lambda insights to use for monitoring
See
When used with DockerImageFunction
or DockerImageCode
, the Docker image should have
the Lambda insights agent installed.
Default
- No Lambda Insights
Inherited from
nodeLambda.NodejsFunctionProps.insightsVersion
ipv6AllowedForDualStack?
readonly
optional
ipv6AllowedForDualStack:boolean
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:233
Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets.
Only used if 'vpc' is supplied.
Default
false
Inherited from
nodeLambda.NodejsFunctionProps.ipv6AllowedForDualStack
layers?
readonly
optional
layers:ILayerVersion
[]
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:363
A list of layers to add to the function's execution environment. You can configure your Lambda function to pull in additional code during initialization in the form of layers. Layers are packages of libraries or other dependencies that can be used by multiple functions.
Default
- No layers.
Inherited from
nodeLambda.NodejsFunctionProps.layers
logFormat?
readonly
optional
logFormat:string
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:495
Sets the logFormat for the function.
Deprecated
Use loggingFormat
as a property instead.
Default
"Text"
Inherited from
nodeLambda.NodejsFunctionProps.logFormat
loggingFormat?
readonly
optional
loggingFormat:LoggingFormat
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:500
Sets the loggingFormat for the function.
Default
LoggingFormat.TEXT
Inherited from
nodeLambda.NodejsFunctionProps.loggingFormat
logGroup?
readonly
optional
logGroup:ILogGroup
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:489
The log group the function sends logs to.
By default, Lambda functions send logs to an automatically created default log group named /aws/lambda/<function name>. However you cannot change the properties of this auto-created log group using the AWS CDK, e.g. you cannot set a different log retention.
Use the logGroup
property to create a fully customizable LogGroup ahead of time, and instruct the Lambda function to send logs to it.
Providing a user-controlled log group was rolled out to commercial regions on 2023-11-16. If you are deploying to another type of region, please check regional availability first.
Default
/aws/lambda/${this.functionName}
- default log group created by Lambda
Inherited from
nodeLambda.NodejsFunctionProps.logGroup
logRemovalPolicy?
readonly
optional
logRemovalPolicy:RemovalPolicy
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:413
Determine the removal policy of the log group that is auto-created by this construct.
Normally you want to retain the log group so you can diagnose issues from logs even after a deployment that no longer includes the log group. In that case, use the normal date-based retention policy to age out your logs.
Deprecated
use logGroup
instead
Default
RemovalPolicy.Retain
Inherited from
nodeLambda.NodejsFunctionProps.logRemovalPolicy
logRetention?
readonly
optional
logRetention:RetentionDays
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:401
The number of days log events are kept in CloudWatch Logs. When updating
this property, unsetting it doesn't remove the log retention policy. To
remove the retention policy, set the value to INFINITE
.
This is a legacy API and we strongly recommend you move away from it if you can.
Instead create a fully customizable log group with logs.LogGroup
and use the logGroup
property
to instruct the Lambda function to send logs to it.
Migrating from logRetention
to logGroup
will cause the name of the log group to change.
Users and code and referencing the name verbatim will have to adjust.
In AWS CDK code, you can access the log group name directly from the LogGroup construct:
import * as logs from 'aws-cdk-lib/aws-logs';
declare const myLogGroup: logs.LogGroup;
myLogGroup.logGroupName;
Deprecated
use logGroup
instead
Default
logs.RetentionDays.INFINITE
Inherited from
nodeLambda.NodejsFunctionProps.logRetention
logRetentionRetryOptions?
readonly
optional
logRetentionRetryOptions:LogRetentionRetryOptions
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:433
When log retention is specified, a custom resource attempts to create the CloudWatch log group. These options control the retry policy when interacting with CloudWatch APIs.
This is a legacy API and we strongly recommend you migrate to logGroup
if you can.
logGroup
allows you to create a fully customizable log group and instruct the Lambda function to send logs to it.
Default
- Default AWS SDK retry options.
Inherited from
nodeLambda.NodejsFunctionProps.logRetentionRetryOptions
logRetentionRole?
readonly
optional
logRetentionRole:IRole
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:423
The IAM role for the Lambda function associated with the custom resource that sets the retention policy.
This is a legacy API and we strongly recommend you migrate to logGroup
if you can.
logGroup
allows you to create a fully customizable log group and instruct the Lambda function to send logs to it.
Default
- A new role is created.
Inherited from
nodeLambda.NodejsFunctionProps.logRetentionRole
maxEventAge?
readonly
optional
maxEventAge:Duration
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/event-invoke-config.d.ts:30
The maximum age of a request that Lambda sends to a function for processing.
Minimum: 60 seconds Maximum: 6 hours
Default
Duration.hours(6)
Inherited from
nodeLambda.NodejsFunctionProps.maxEventAge
memorySize?
readonly
optional
memorySize:number
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:185
The amount of memory, in MB, that is allocated to your Lambda function. Lambda uses this value to proportionally allocate the amount of CPU power. For more information, see Resource Model in the AWS Lambda Developer Guide.
Default
128
Inherited from
nodeLambda.NodejsFunctionProps.memorySize
metricErrorName
metricErrorName:
string
Defined in: src/progressive-lambda/progressive-lambda.ts:143
Name of the custom metric that tracks failed operations.
This metric should be published by your Lambda function code to indicate failures or errors. Used by the CloudWatch alarm for deployment monitoring.
Example
'FailedOrders', 'ProcessingErrors'
metricErrorNameTitle?
optional
metricErrorNameTitle:string
Defined in: src/progressive-lambda/progressive-lambda.ts:154
Display title for the error metric widget.
Human-readable title shown in CloudWatch dashboards and widgets. Should clearly describe what the error metric represents.
Example
'Failed Order Processing', 'Processing Errors'
Default
'${id} - Error Operation'
metricSuccessName?
optional
metricSuccessName:string
Defined in: src/progressive-lambda/progressive-lambda.ts:122
Name of the custom metric that tracks successful operations.
This metric should be published by your Lambda function code to indicate successful processing or operations.
Example
'SuccessfulOrders', 'ProcessedEvents'
Default
'${id}-SuccessOperation'
metricSuccessNameTitle?
optional
metricSuccessNameTitle:string
Defined in: src/progressive-lambda/progressive-lambda.ts:133
Display title for the success metric widget.
Human-readable title shown in CloudWatch dashboards and widgets. Should clearly describe what the metric represents.
Example
'Successful Order Processing', 'Events Processed Successfully'
Default
'${id} - Success Operation'
namespace
namespace:
string
Defined in: src/progressive-lambda/progressive-lambda.ts:101
CloudWatch namespace for custom metrics.
Groups related metrics together for organization and filtering. Should follow a hierarchical naming convention.
Example
'MyApp/Lambda', 'ECommerce/OrderProcessing'
onFailure?
readonly
optional
onFailure:IDestination
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/event-invoke-config.d.ts:14
The destination for failed invocations.
Default
- no destination
Inherited from
nodeLambda.NodejsFunctionProps.onFailure
onSuccess?
readonly
optional
onSuccess:IDestination
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/event-invoke-config.d.ts:20
The destination for successful invocations.
Default
- no destination
Inherited from
nodeLambda.NodejsFunctionProps.onSuccess
paramsAndSecrets?
readonly
optional
paramsAndSecrets:ParamsAndSecretsLayerVersion
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:355
Specify the configuration of Parameters and Secrets Extension
See
- https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieving-secrets_lambda.html
- https://docs.aws.amazon.com/systems-manager/latest/userguide/ps-integration-lambda-extensions.html
Default
- No Parameters and Secrets Extension
Inherited from
nodeLambda.NodejsFunctionProps.paramsAndSecrets
profiling?
readonly
optional
profiling:boolean
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:322
Enable profiling.
See
https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html
Default
- No profiling.
Inherited from
nodeLambda.NodejsFunctionProps.profiling
profilingGroup?
readonly
optional
profilingGroup:IProfilingGroup
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:329
Profiling Group.
See
https://docs.aws.amazon.com/codeguru/latest/profiler-ug/setting-up-lambda.html
Default
- A new profiling group will be created if
profiling
is set.
Inherited from
nodeLambda.NodejsFunctionProps.profilingGroup
projectRoot?
readonly
optional
projectRoot:string
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda-nodejs/lib/function.d.ts:81
The path to the directory containing project config files (package.json
or tsconfig.json
)
Default
- the directory containing the
depsLockFilePath
Inherited from
nodeLambda.NodejsFunctionProps.projectRoot
recursiveLoop?
readonly
optional
recursiveLoop:RecursiveLoop
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:507
Sets the Recursive Loop Protection for Lambda Function. It lets Lambda detect and terminate unintended recursive loops.
Default
RecursiveLoop.Terminate
Inherited from
nodeLambda.NodejsFunctionProps.recursiveLoop
region
region:
string
Defined in: src/progressive-lambda/progressive-lambda.ts:164
AWS region where the Lambda function and associated resources are deployed.
Used for CloudWatch metric configurations and cross-region references. Should match the region where the construct is deployed.
Example
'us-east-1', 'eu-west-1', 'ap-southeast-2'
reservedConcurrentExecutions?
readonly
optional
reservedConcurrentExecutions:number
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:370
The maximum of concurrent executions you want to reserve for the function.
Default
- No specific limit - account limit.
See
https://docs.aws.amazon.com/lambda/latest/dg/concurrent-executions.html
Inherited from
nodeLambda.NodejsFunctionProps.reservedConcurrentExecutions
retryAttempts?
readonly
optional
retryAttempts:number
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/event-invoke-config.d.ts:39
The maximum number of times to retry when the function returns an error.
Minimum: 0 Maximum: 2
Default
2
Inherited from
nodeLambda.NodejsFunctionProps.retryAttempts
role?
readonly
optional
role:IRole
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:216
Lambda execution role.
This is the role that will be assumed by the function upon execution. It controls the permissions that the function will have. The Role must be assumable by the 'lambda.amazonaws.com' service principal.
The default Role automatically has permissions granted for Lambda execution. If you provide a Role, you must add the relevant AWS managed policies yourself.
The relevant managed policies are "service-role/AWSLambdaBasicExecutionRole" and "service-role/AWSLambdaVPCAccessExecutionRole".
Default
- A unique role will be generated for this lambda function.
Both supplied and generated roles can always be changed by calling
addToRolePolicy
.
Inherited from
nodeLambda.NodejsFunctionProps.role
runtime?
readonly
optional
runtime:Runtime
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda-nodejs/lib/function.d.ts:36
The runtime environment. Only runtimes of the Node.js family are supported.
Default
Runtime.NODEJS_LATEST
if the @aws-cdk/aws-lambda-nodejs:useLatestRuntimeVersion
feature flag is enabled, otherwise Runtime.NODEJS_16_X
Inherited from
nodeLambda.NodejsFunctionProps.runtime
runtimeManagementMode?
readonly
optional
runtimeManagementMode:RuntimeManagementMode
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:475
Sets the runtime management configuration for a function's version.
Default
Auto
Inherited from
nodeLambda.NodejsFunctionProps.runtimeManagementMode
securityGroups?
readonly
optional
securityGroups:ISecurityGroup
[]
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:255
The list of security groups to associate with the Lambda's network interfaces.
Only used if 'vpc' is supplied.
Default
- If the function is placed within a VPC and a security group is
not specified, either by this or securityGroup prop, a dedicated security
group will be created for this function.
Inherited from
nodeLambda.NodejsFunctionProps.securityGroups
serviceName
serviceName:
string
Defined in: src/progressive-lambda/progressive-lambda.ts:111
Service name dimension for CloudWatch metrics.
Used to differentiate metrics from different services within the same namespace. Appears as a dimension in CloudWatch metrics and alarms.
Example
'OrderProcessor', 'UserAuthenticator'
snapStart?
readonly
optional
snapStart:SnapStartConf
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:315
Enable SnapStart for Lambda Function. SnapStart is currently supported for Java 11, Java 17, Python 3.12, Python 3.13, and .NET 8 runtime
Default
- No snapstart
Inherited from
nodeLambda.NodejsFunctionProps.snapStart
snsTopic
snsTopic:
Topic
Defined in: src/progressive-lambda/progressive-lambda.ts:91
SNS topic for alarm notifications.
Remarks
Security Note: For compliance with AwsSolutions-SNS3, ensure your SNS topic enforces SSL by adding a topic policy that denies non-HTTPS requests.
Example
const topic = new sns.Topic(this, 'AlarmTopic');
topic.addToResourcePolicy(new iam.PolicyStatement({
effect: iam.Effect.DENY,
principals: [new iam.AnyPrincipal()],
actions: ['sns:Publish'],
resources: [topic.topicArn],
conditions: {
Bool: { 'aws:SecureTransport': 'false' }
}
}));
stageName
stageName:
string
Defined in: src/progressive-lambda/progressive-lambda.ts:39
The deployment stage name (e.g., 'dev', 'staging', 'prod').
Used for:
- Lambda alias name
- CloudWatch alarm descriptions
- Resource naming and tagging
Example
'prod', 'dev', 'staging'
systemLogLevel?
readonly
optional
systemLogLevel:string
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:524
Sets the system log level for the function.
Deprecated
Use systemLogLevelV2
as a property instead.
Default
"INFO"
Inherited from
nodeLambda.NodejsFunctionProps.systemLogLevel
systemLogLevelV2?
readonly
optional
systemLogLevelV2:SystemLogLevel
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:529
Sets the system log level for the function.
Default
SystemLogLevel.INFO
Inherited from
nodeLambda.NodejsFunctionProps.systemLogLevelV2
timeout?
readonly
optional
timeout:Duration
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:158
The function execution time (in seconds) after which Lambda terminates the function. Because the execution time affects cost, set this value based on the function's expected execution time.
Default
Duration.seconds(3)
Inherited from
nodeLambda.NodejsFunctionProps.timeout
tracing?
readonly
optional
tracing:Tracing
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:308
Enable AWS X-Ray Tracing for Lambda Function.
Default
Tracing.Disabled
Inherited from
nodeLambda.NodejsFunctionProps.tracing
vpc?
readonly
optional
vpc:IVpc
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:225
VPC network to place Lambda network interfaces
Specify this if the Lambda function needs to access resources in a VPC.
This is required when vpcSubnets
is specified.
Default
- Function is not placed within a VPC.
Inherited from
nodeLambda.NodejsFunctionProps.vpc
vpcSubnets?
readonly
optional
vpcSubnets:SubnetSelection
Defined in: node_modules/.pnpm/aws-cdk-lib@2.214.0_constructs@10.4.2/node_modules/aws-cdk-lib/aws-lambda/lib/function.d.ts:245
Where to place the network interfaces within the VPC.
This requires vpc
to be specified in order for interfaces to actually be
placed in the subnets. If vpc
is not specify, this will raise an error.
Note: Internet access for Lambda Functions requires a NAT Gateway, so picking
public subnets is not allowed (unless allowPublicSubnet
is set to true
).
Default
- the Vpc default strategy if not specified
Inherited from
nodeLambda.NodejsFunctionProps.vpcSubnets