Class: AWSCDK::LambdaNodejs::NodejsFunctionProps

Inherits:
AWSCDK::Lambda::FunctionOptions
  • Object
show all
Defined in:
lambda_nodejs/nodejs_function_props.rb

Overview

Properties for a NodejsFunction.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(max_event_age: nil, on_failure: nil, on_success: nil, retry_attempts: nil, adot_instrumentation: nil, allow_all_ipv6_outbound: nil, allow_all_outbound: nil, allow_public_subnet: nil, application_log_level: nil, application_log_level_v2: nil, architecture: nil, code_signing_config: nil, current_version_options: nil, dead_letter_queue: nil, dead_letter_queue_enabled: nil, dead_letter_topic: nil, description: nil, durable_config: nil, environment: nil, environment_encryption: nil, ephemeral_storage_size: nil, events: nil, filesystem: nil, function_name: nil, initial_policy: nil, insights_version: nil, ipv6_allowed_for_dual_stack: nil, layers: nil, log_format: nil, logging_format: nil, log_group: nil, log_removal_policy: nil, log_retention: nil, log_retention_retry_options: nil, log_retention_role: nil, memory_size: nil, params_and_secrets: nil, profiling: nil, profiling_group: nil, recursive_loop: nil, reserved_concurrent_executions: nil, role: nil, runtime_management_mode: nil, security_groups: nil, snap_start: nil, system_log_level: nil, system_log_level_v2: nil, tenancy_config: nil, timeout: nil, tracing: nil, vpc: nil, vpc_subnets: nil, aws_sdk_connection_reuse: nil, bundling: nil, code: nil, deps_lock_file_path: nil, entry: nil, handler: nil, project_root: nil, runtime: nil) ⇒ NodejsFunctionProps

Returns a new instance of NodejsFunctionProps.

Parameters:

  • max_event_age (AWSCDK::Duration, nil) (defaults to: nil)

    The maximum age of a request that Lambda sends to a function for processing.

  • on_failure (AWSCDK::Lambda::IDestination, nil) (defaults to: nil)

    The destination for failed invocations.

  • on_success (AWSCDK::Lambda::IDestination, nil) (defaults to: nil)

    The destination for successful invocations.

  • retry_attempts (Numeric, nil) (defaults to: nil)

    The maximum number of times to retry when the function returns an error.

  • adot_instrumentation (AWSCDK::Lambda::AdotInstrumentationConfig, nil) (defaults to: nil)

    Specify the configuration of AWS Distro for OpenTelemetry (ADOT) instrumentation.

  • allow_all_ipv6_outbound (Boolean, nil) (defaults to: nil)

    Whether to allow the Lambda to send all ipv6 network traffic.

  • allow_all_outbound (Boolean, nil) (defaults to: nil)

    Whether to allow the Lambda to send all network traffic (except ipv6).

  • allow_public_subnet (Boolean, nil) (defaults to: nil)

    Lambda Functions in a public subnet can NOT access the internet.

  • application_log_level (String, nil) (defaults to: nil)

    Sets the application log level for the function.

  • application_log_level_v2 (AWSCDK::Lambda::ApplicationLogLevel, nil) (defaults to: nil)

    Sets the application log level for the function.

  • architecture (AWSCDK::Lambda::Architecture, nil) (defaults to: nil)

    The system architectures compatible with this lambda function.

  • code_signing_config (AWSCDK::Interfaces::AWSLambda::ICodeSigningConfigRef, nil) (defaults to: nil)

    Code signing config associated with this function.

  • current_version_options (AWSCDK::Lambda::VersionOptions, nil) (defaults to: nil)

    Options for the lambda.Version resource automatically created by the fn.currentVersion method.

  • dead_letter_queue (AWSCDK::SQS::IQueue, nil) (defaults to: nil)

    The SQS queue to use if DLQ is enabled.

  • dead_letter_queue_enabled (Boolean, nil) (defaults to: nil)

    Enabled DLQ.

  • dead_letter_topic (AWSCDK::SNS::ITopic, nil) (defaults to: nil)

    The SNS topic to use as a DLQ.

  • description (String, nil) (defaults to: nil)

    A description of the function.

  • durable_config (AWSCDK::Lambda::DurableConfig, nil) (defaults to: nil)

    The durable configuration for the function.

  • environment (Hash{String => String}, nil) (defaults to: nil)

    Key-value pairs that Lambda caches and makes available for your Lambda functions.

  • environment_encryption (AWSCDK::Interfaces::AWSKMS::IKeyRef, nil) (defaults to: nil)

    The AWS KMS key that's used to encrypt your function's environment variables.

  • ephemeral_storage_size (AWSCDK::Size, nil) (defaults to: nil)

    The size of the function’s /tmp directory in MiB.

  • events (Array<AWSCDK::Lambda::IEventSource>, nil) (defaults to: nil)

    Event sources for this function.

  • filesystem (AWSCDK::Lambda::FileSystem, nil) (defaults to: nil)

    The filesystem configuration for the lambda function.

  • function_name (String, nil) (defaults to: nil)

    A name for the function.

  • initial_policy (Array<AWSCDK::IAM::PolicyStatement>, nil) (defaults to: nil)

    Initial policy statements to add to the created Lambda Role.

  • insights_version (AWSCDK::Lambda::LambdaInsightsVersion, nil) (defaults to: nil)

    Specify the version of CloudWatch Lambda insights to use for monitoring.

  • ipv6_allowed_for_dual_stack (Boolean, nil) (defaults to: nil)

    Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets.

  • layers (Array<AWSCDK::Lambda::ILayerVersion>, nil) (defaults to: nil)

    A list of layers to add to the function's execution environment.

  • log_format (String, nil) (defaults to: nil)

    Sets the logFormat for the function.

  • logging_format (AWSCDK::Lambda::LoggingFormat, nil) (defaults to: nil)

    Sets the loggingFormat for the function.

  • log_group (AWSCDK::Interfaces::AWSLogs::ILogGroupRef, nil) (defaults to: nil)

    The log group the function sends logs to.

  • log_removal_policy (AWSCDK::RemovalPolicy, nil) (defaults to: nil)

    Determine the removal policy of the log group that is auto-created by this construct.

  • log_retention (AWSCDK::Logs::RetentionDays, nil) (defaults to: nil)

    The number of days log events are kept in CloudWatch Logs.

  • log_retention_retry_options (AWSCDK::Lambda::LogRetentionRetryOptions, nil) (defaults to: nil)

    When log retention is specified, a custom resource attempts to create the CloudWatch log group.

  • log_retention_role (AWSCDK::IAM::IRole, nil) (defaults to: nil)

    The IAM role for the Lambda function associated with the custom resource that sets the retention policy.

  • memory_size (Numeric, nil) (defaults to: nil)

    The amount of memory, in MB, that is allocated to your Lambda function.

  • params_and_secrets (AWSCDK::Lambda::ParamsAndSecretsLayerVersion, nil) (defaults to: nil)

    Specify the configuration of Parameters and Secrets Extension.

  • profiling (Boolean, nil) (defaults to: nil)

    Enable profiling.

  • profiling_group (AWSCDK::CodeGuruProfiler::IProfilingGroup, nil) (defaults to: nil)

    Profiling Group.

  • recursive_loop (AWSCDK::Lambda::RecursiveLoop, nil) (defaults to: nil)

    Sets the Recursive Loop Protection for Lambda Function.

  • reserved_concurrent_executions (Numeric, nil) (defaults to: nil)

    The maximum of concurrent executions you want to reserve for the function.

  • role (AWSCDK::IAM::IRole, nil) (defaults to: nil)

    Lambda execution role.

  • runtime_management_mode (AWSCDK::Lambda::RuntimeManagementMode, nil) (defaults to: nil)

    Sets the runtime management configuration for a function's version.

  • security_groups (Array<AWSCDK::EC2::ISecurityGroup>, nil) (defaults to: nil)

    The list of security groups to associate with the Lambda's network interfaces.

  • snap_start (AWSCDK::Lambda::SnapStartConf, nil) (defaults to: nil)

    Enable SnapStart for Lambda Function.

  • system_log_level (String, nil) (defaults to: nil)

    Sets the system log level for the function.

  • system_log_level_v2 (AWSCDK::Lambda::SystemLogLevel, nil) (defaults to: nil)

    Sets the system log level for the function.

  • tenancy_config (AWSCDK::Lambda::TenancyConfig, nil) (defaults to: nil)

    The tenancy configuration for the function.

  • timeout (AWSCDK::Duration, nil) (defaults to: nil)

    The function execution time (in seconds) after which Lambda terminates the function.

  • tracing (AWSCDK::Lambda::Tracing, nil) (defaults to: nil)

    Enable AWS X-Ray Tracing for Lambda Function.

  • vpc (AWSCDK::EC2::IVPC, nil) (defaults to: nil)

    VPC network to place Lambda network interfaces.

  • vpc_subnets (AWSCDK::EC2::SubnetSelection, nil) (defaults to: nil)

    Where to place the network interfaces within the VPC.

  • aws_sdk_connection_reuse (Boolean, nil) (defaults to: nil)

    The AWS_NODEJS_CONNECTION_REUSE_ENABLED environment variable does not exist in the AWS SDK for JavaScript v3.

  • bundling (AWSCDK::LambdaNodejs::BundlingOptions, nil) (defaults to: nil)

    Bundling options.

  • code (AWSCDK::Lambda::Code, nil) (defaults to: nil)

    The code that will be deployed to the Lambda Handler.

  • deps_lock_file_path (String, nil) (defaults to: nil)

    The path to the dependencies lock file (yarn.lock, pnpm-lock.yaml, bun.lockb, bun.lock or package-lock.json).

  • entry (String, nil) (defaults to: nil)

    Path to the entry file (JavaScript or TypeScript).

  • handler (String, nil) (defaults to: nil)

    The name of the exported handler in the entry file.

  • project_root (String, nil) (defaults to: nil)

    The path to the directory containing project config files (package.json or tsconfig.json).

  • runtime (AWSCDK::Lambda::Runtime, nil) (defaults to: nil)

    The runtime environment.



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# File 'lambda_nodejs/nodejs_function_props.rb', line 67

def initialize(max_event_age: nil, on_failure: nil, on_success: nil, retry_attempts: nil, adot_instrumentation: nil, allow_all_ipv6_outbound: nil, allow_all_outbound: nil, allow_public_subnet: nil, application_log_level: nil, application_log_level_v2: nil, architecture: nil, code_signing_config: nil, current_version_options: nil, dead_letter_queue: nil, dead_letter_queue_enabled: nil, dead_letter_topic: nil, description: nil, durable_config: nil, environment: nil, environment_encryption: nil, ephemeral_storage_size: nil, events: nil, filesystem: nil, function_name: nil, initial_policy: nil, insights_version: nil, ipv6_allowed_for_dual_stack: nil, layers: nil, log_format: nil, logging_format: nil, log_group: nil, log_removal_policy: nil, log_retention: nil, log_retention_retry_options: nil, log_retention_role: nil, memory_size: nil, params_and_secrets: nil, profiling: nil, profiling_group: nil, recursive_loop: nil, reserved_concurrent_executions: nil, role: nil, runtime_management_mode: nil, security_groups: nil, snap_start: nil, system_log_level: nil, system_log_level_v2: nil, tenancy_config: nil, timeout: nil, tracing: nil, vpc: nil, vpc_subnets: nil, aws_sdk_connection_reuse: nil, bundling: nil, code: nil, deps_lock_file_path: nil, entry: nil, handler: nil, project_root: nil, runtime: nil)
  @max_event_age = max_event_age
  Jsii::Type.check_type(@max_event_age, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "maxEventAge") unless @max_event_age.nil?
  @on_failure = on_failure
  Jsii::Type.check_type(@on_failure, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklEZXN0aW5hdGlvbiJ9")), "onFailure") unless @on_failure.nil?
  @on_success = on_success
  Jsii::Type.check_type(@on_success, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLklEZXN0aW5hdGlvbiJ9")), "onSuccess") unless @on_success.nil?
  @retry_attempts = retry_attempts
  Jsii::Type.check_type(@retry_attempts, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "retryAttempts") unless @retry_attempts.nil?
  @adot_instrumentation = adot_instrumentation.is_a?(Hash) ? ::AWSCDK::Lambda::AdotInstrumentationConfig.new(**adot_instrumentation.transform_keys(&:to_sym)) : adot_instrumentation
  Jsii::Type.check_type(@adot_instrumentation, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkFkb3RJbnN0cnVtZW50YXRpb25Db25maWcifQ==")), "adotInstrumentation") unless @adot_instrumentation.nil?
  @allow_all_ipv6_outbound = allow_all_ipv6_outbound
  Jsii::Type.check_type(@allow_all_ipv6_outbound, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "allowAllIpv6Outbound") unless @allow_all_ipv6_outbound.nil?
  @allow_all_outbound = allow_all_outbound
  Jsii::Type.check_type(@allow_all_outbound, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "allowAllOutbound") unless @allow_all_outbound.nil?
  @allow_public_subnet = allow_public_subnet
  Jsii::Type.check_type(@allow_public_subnet, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "allowPublicSubnet") unless @allow_public_subnet.nil?
  @application_log_level = application_log_level
  Jsii::Type.check_type(@application_log_level, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "applicationLogLevel") unless @application_log_level.nil?
  @application_log_level_v2 = application_log_level_v2
  Jsii::Type.check_type(@application_log_level_v2, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkFwcGxpY2F0aW9uTG9nTGV2ZWwifQ==")), "applicationLogLevelV2") unless @application_log_level_v2.nil?
  @architecture = architecture
  Jsii::Type.check_type(@architecture, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkFyY2hpdGVjdHVyZSJ9")), "architecture") unless @architecture.nil?
  @code_signing_config = code_signing_config
  Jsii::Type.check_type(@code_signing_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19sYW1iZGEuSUNvZGVTaWduaW5nQ29uZmlnUmVmIn0=")), "codeSigningConfig") unless @code_signing_config.nil?
  @current_version_options = current_version_options.is_a?(Hash) ? ::AWSCDK::Lambda::VersionOptions.new(**current_version_options.transform_keys(&:to_sym)) : current_version_options
  Jsii::Type.check_type(@current_version_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLlZlcnNpb25PcHRpb25zIn0=")), "currentVersionOptions") unless @current_version_options.nil?
  @dead_letter_queue = dead_letter_queue
  Jsii::Type.check_type(@dead_letter_queue, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3FzLklRdWV1ZSJ9")), "deadLetterQueue") unless @dead_letter_queue.nil?
  @dead_letter_queue_enabled = dead_letter_queue_enabled
  Jsii::Type.check_type(@dead_letter_queue_enabled, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "deadLetterQueueEnabled") unless @dead_letter_queue_enabled.nil?
  @dead_letter_topic = dead_letter_topic
  Jsii::Type.check_type(@dead_letter_topic, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc25zLklUb3BpYyJ9")), "deadLetterTopic") unless @dead_letter_topic.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @durable_config = durable_config.is_a?(Hash) ? ::AWSCDK::Lambda::DurableConfig.new(**durable_config.transform_keys(&:to_sym)) : durable_config
  Jsii::Type.check_type(@durable_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkR1cmFibGVDb25maWcifQ==")), "durableConfig") unless @durable_config.nil?
  @environment = environment
  Jsii::Type.check_type(@environment, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoibWFwIn19")), "environment") unless @environment.nil?
  @environment_encryption = environment_encryption
  Jsii::Type.check_type(@environment_encryption, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19rbXMuSUtleVJlZiJ9")), "environmentEncryption") unless @environment_encryption.nil?
  @ephemeral_storage_size = ephemeral_storage_size
  Jsii::Type.check_type(@ephemeral_storage_size, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5TaXplIn0=")), "ephemeralStorageSize") unless @ephemeral_storage_size.nil?
  @events = events
  Jsii::Type.check_type(@events, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuSUV2ZW50U291cmNlIn0sImtpbmQiOiJhcnJheSJ9fQ==")), "events") unless @events.nil?
  @filesystem = filesystem
  Jsii::Type.check_type(@filesystem, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkZpbGVTeXN0ZW0ifQ==")), "filesystem") unless @filesystem.nil?
  @function_name = function_name
  Jsii::Type.check_type(@function_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "functionName") unless @function_name.nil?
  @initial_policy = initial_policy
  Jsii::Type.check_type(@initial_policy, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pYW0uUG9saWN5U3RhdGVtZW50In0sImtpbmQiOiJhcnJheSJ9fQ==")), "initialPolicy") unless @initial_policy.nil?
  @insights_version = insights_version
  Jsii::Type.check_type(@insights_version, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkxhbWJkYUluc2lnaHRzVmVyc2lvbiJ9")), "insightsVersion") unless @insights_version.nil?
  @ipv6_allowed_for_dual_stack = ipv6_allowed_for_dual_stack
  Jsii::Type.check_type(@ipv6_allowed_for_dual_stack, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "ipv6AllowedForDualStack") unless @ipv6_allowed_for_dual_stack.nil?
  @layers = layers
  Jsii::Type.check_type(@layers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuSUxheWVyVmVyc2lvbiJ9LCJraW5kIjoiYXJyYXkifX0=")), "layers") unless @layers.nil?
  @log_format = log_format
  Jsii::Type.check_type(@log_format, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "logFormat") unless @log_format.nil?
  @logging_format = logging_format
  Jsii::Type.check_type(@logging_format, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkxvZ2dpbmdGb3JtYXQifQ==")), "loggingFormat") unless @logging_format.nil?
  @log_group = log_group
  Jsii::Type.check_type(@log_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19sb2dzLklMb2dHcm91cFJlZiJ9")), "logGroup") unless @log_group.nil?
  @log_removal_policy = log_removal_policy
  Jsii::Type.check_type(@log_removal_policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "logRemovalPolicy") unless @log_removal_policy.nil?
  @log_retention = log_retention
  Jsii::Type.check_type(@log_retention, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbG9ncy5SZXRlbnRpb25EYXlzIn0=")), "logRetention") unless @log_retention.nil?
  @log_retention_retry_options = log_retention_retry_options.is_a?(Hash) ? ::AWSCDK::Lambda::LogRetentionRetryOptions.new(**log_retention_retry_options.transform_keys(&:to_sym)) : log_retention_retry_options
  Jsii::Type.check_type(@log_retention_retry_options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkxvZ1JldGVudGlvblJldHJ5T3B0aW9ucyJ9")), "logRetentionRetryOptions") unless @log_retention_retry_options.nil?
  @log_retention_role = log_retention_role
  Jsii::Type.check_type(@log_retention_role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "logRetentionRole") unless @log_retention_role.nil?
  @memory_size = memory_size
  Jsii::Type.check_type(@memory_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "memorySize") unless @memory_size.nil?
  @params_and_secrets = params_and_secrets
  Jsii::Type.check_type(@params_and_secrets, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLlBhcmFtc0FuZFNlY3JldHNMYXllclZlcnNpb24ifQ==")), "paramsAndSecrets") unless @params_and_secrets.nil?
  @profiling = profiling
  Jsii::Type.check_type(@profiling, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "profiling") unless @profiling.nil?
  @profiling_group = profiling_group
  Jsii::Type.check_type(@profiling_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWd1cnVwcm9maWxlci5JUHJvZmlsaW5nR3JvdXAifQ==")), "profilingGroup") unless @profiling_group.nil?
  @recursive_loop = recursive_loop
  Jsii::Type.check_type(@recursive_loop, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLlJlY3Vyc2l2ZUxvb3AifQ==")), "recursiveLoop") unless @recursive_loop.nil?
  @reserved_concurrent_executions = reserved_concurrent_executions
  Jsii::Type.check_type(@reserved_concurrent_executions, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "reservedConcurrentExecutions") unless @reserved_concurrent_executions.nil?
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklSb2xlIn0=")), "role") unless @role.nil?
  @runtime_management_mode = runtime_management_mode
  Jsii::Type.check_type(@runtime_management_mode, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLlJ1bnRpbWVNYW5hZ2VtZW50TW9kZSJ9")), "runtimeManagementMode") unless @runtime_management_mode.nil?
  @security_groups = security_groups
  Jsii::Type.check_type(@security_groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuSVNlY3VyaXR5R3JvdXAifSwia2luZCI6ImFycmF5In19")), "securityGroups") unless @security_groups.nil?
  @snap_start = snap_start
  Jsii::Type.check_type(@snap_start, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLlNuYXBTdGFydENvbmYifQ==")), "snapStart") unless @snap_start.nil?
  @system_log_level = system_log_level
  Jsii::Type.check_type(@system_log_level, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "systemLogLevel") unless @system_log_level.nil?
  @system_log_level_v2 = system_log_level_v2
  Jsii::Type.check_type(@system_log_level_v2, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLlN5c3RlbUxvZ0xldmVsIn0=")), "systemLogLevelV2") unless @system_log_level_v2.nil?
  @tenancy_config = tenancy_config
  Jsii::Type.check_type(@tenancy_config, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLlRlbmFuY3lDb25maWcifQ==")), "tenancyConfig") unless @tenancy_config.nil?
  @timeout = timeout
  Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "timeout") unless @timeout.nil?
  @tracing = tracing
  Jsii::Type.check_type(@tracing, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLlRyYWNpbmcifQ==")), "tracing") unless @tracing.nil?
  @vpc = vpc
  Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc") unless @vpc.nil?
  @vpc_subnets = vpc_subnets.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**vpc_subnets.transform_keys(&:to_sym)) : vpc_subnets
  Jsii::Type.check_type(@vpc_subnets, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlN1Ym5ldFNlbGVjdGlvbiJ9")), "vpcSubnets") unless @vpc_subnets.nil?
  @aws_sdk_connection_reuse = aws_sdk_connection_reuse
  Jsii::Type.check_type(@aws_sdk_connection_reuse, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "awsSdkConnectionReuse") unless @aws_sdk_connection_reuse.nil?
  @bundling = bundling.is_a?(Hash) ? ::AWSCDK::LambdaNodejs::BundlingOptions.new(**bundling.transform_keys(&:to_sym)) : bundling
  Jsii::Type.check_type(@bundling, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhX25vZGVqcy5CdW5kbGluZ09wdGlvbnMifQ==")), "bundling") unless @bundling.nil?
  @code = code
  Jsii::Type.check_type(@code, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkNvZGUifQ==")), "code") unless @code.nil?
  @deps_lock_file_path = deps_lock_file_path
  Jsii::Type.check_type(@deps_lock_file_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "depsLockFilePath") unless @deps_lock_file_path.nil?
  @entry = entry
  Jsii::Type.check_type(@entry, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "entry") unless @entry.nil?
  @handler = handler
  Jsii::Type.check_type(@handler, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "handler") unless @handler.nil?
  @project_root = project_root
  Jsii::Type.check_type(@project_root, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "projectRoot") unless @project_root.nil?
  @runtime = runtime
  Jsii::Type.check_type(@runtime, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLlJ1bnRpbWUifQ==")), "runtime") unless @runtime.nil?
end

Instance Attribute Details

#adot_instrumentationAWSCDK::Lambda::AdotInstrumentationConfig? (readonly)

Note:

Default: - No ADOT instrumentation

Specify the configuration of AWS Distro for OpenTelemetry (ADOT) instrumentation.



221
222
223
# File 'lambda_nodejs/nodejs_function_props.rb', line 221

def adot_instrumentation
  @adot_instrumentation
end

#allow_all_ipv6_outboundBoolean? (readonly)

Note:

Default: false

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 security_groups or security_group property is set. Instead, configure allow_all_ipv6_outbound directly on the security group.

Returns:

  • (Boolean, nil)


233
234
235
# File 'lambda_nodejs/nodejs_function_props.rb', line 233

def allow_all_ipv6_outbound
  @allow_all_ipv6_outbound
end

#allow_all_outboundBoolean? (readonly)

Note:

Default: true

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 security_groups or security_group property is set. Instead, configure allow_all_outbound directly on the security group.

Returns:

  • (Boolean, nil)


244
245
246
# File 'lambda_nodejs/nodejs_function_props.rb', line 244

def allow_all_outbound
  @allow_all_outbound
end

#allow_public_subnetBoolean? (readonly)

Note:

Default: false

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.



252
253
254
# File 'lambda_nodejs/nodejs_function_props.rb', line 252

def allow_public_subnet
  @allow_public_subnet
end

#application_log_levelString? (readonly)

Deprecated.

Use applicationLogLevelV2 as a property instead.

Note:

Default: "INFO"

Sets the application log level for the function.

Returns:

  • (String, nil)


258
259
260
# File 'lambda_nodejs/nodejs_function_props.rb', line 258

def application_log_level
  @application_log_level
end

#application_log_level_v2AWSCDK::Lambda::ApplicationLogLevel? (readonly)

Note:

Default: ApplicationLogLevel.INFO

Sets the application log level for the function.



263
264
265
# File 'lambda_nodejs/nodejs_function_props.rb', line 263

def application_log_level_v2
  @application_log_level_v2
end

#architectureAWSCDK::Lambda::Architecture? (readonly)

Note:

Default: Architecture.X86_64

The system architectures compatible with this lambda function.



268
269
270
# File 'lambda_nodejs/nodejs_function_props.rb', line 268

def architecture
  @architecture
end

#aws_sdk_connection_reuseBoolean? (readonly)

Note:

Default: - false (obsolete) for runtimes >= Node 18, true for runtimes <= Node 16.

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.



596
597
598
# File 'lambda_nodejs/nodejs_function_props.rb', line 596

def aws_sdk_connection_reuse
  @aws_sdk_connection_reuse
end

#bundlingAWSCDK::LambdaNodejs::BundlingOptions? (readonly)

Note:

Default: - use default bundling options: no minify, no sourcemap, all modules are bundled.

Bundling options.



601
602
603
# File 'lambda_nodejs/nodejs_function_props.rb', line 601

def bundling
  @bundling
end

#codeAWSCDK::Lambda::Code? (readonly)

Note:

Default: - the code is bundled by esbuild

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 the handler property.

Returns:



611
612
613
# File 'lambda_nodejs/nodejs_function_props.rb', line 611

def code
  @code
end

#code_signing_configAWSCDK::Interfaces::AWSLambda::ICodeSigningConfigRef? (readonly)

Note:

Default: - Not Sign the Code

Code signing config associated with this function.



273
274
275
# File 'lambda_nodejs/nodejs_function_props.rb', line 273

def code_signing_config
  @code_signing_config
end

#current_version_optionsAWSCDK::Lambda::VersionOptions? (readonly)

Note:

Default: - default options as described in VersionOptions

Options for the lambda.Version resource automatically created by the fn.currentVersion method.



278
279
280
# File 'lambda_nodejs/nodejs_function_props.rb', line 278

def current_version_options
  @current_version_options
end

#dead_letter_queueAWSCDK::SQS::IQueue? (readonly)

Note:

Default: - SQS queue with 14 day retention period if deadLetterQueueEnabled is true

The SQS queue to use if DLQ is enabled.

If SNS topic is desired, specify dead_letter_topic property instead.

Returns:



285
286
287
# File 'lambda_nodejs/nodejs_function_props.rb', line 285

def dead_letter_queue
  @dead_letter_queue
end

#dead_letter_queue_enabledBoolean? (readonly)

Note:

Default: - false unless deadLetterQueue is set, which implies DLQ is enabled.

Enabled DLQ.

If dead_letter_queue is undefined, an SQS queue with default options will be defined for your Function.

Returns:

  • (Boolean, nil)


293
294
295
# File 'lambda_nodejs/nodejs_function_props.rb', line 293

def dead_letter_queue_enabled
  @dead_letter_queue_enabled
end

#dead_letter_topicAWSCDK::SNS::ITopic? (readonly)

Note:

Default: - no SNS topic

The SNS topic to use as a DLQ.

Note that if dead_letter_queue_enabled 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.

Returns:



301
302
303
# File 'lambda_nodejs/nodejs_function_props.rb', line 301

def dead_letter_topic
  @dead_letter_topic
end

#deps_lock_file_pathString? (readonly)

Note:

Default: - the path is found by walking up parent directories searching for a yarn.lock, pnpm-lock.yaml, bun.lockb, bun.lock or package-lock.json file

The path to the dependencies lock file (yarn.lock, pnpm-lock.yaml, bun.lockb, bun.lock or package-lock.json).

This will be used as the source for the volume mounted in the Docker container.

Modules specified in node_modules will be installed using the right installer (yarn, pnpm, bun or npm) along with this lock file.

Returns:

  • (String, nil)


622
623
624
# File 'lambda_nodejs/nodejs_function_props.rb', line 622

def deps_lock_file_path
  @deps_lock_file_path
end

#descriptionString? (readonly)

Note:

Default: - No description.

A description of the function.

Returns:

  • (String, nil)


306
307
308
# File 'lambda_nodejs/nodejs_function_props.rb', line 306

def description
  @description
end

#durable_configAWSCDK::Lambda::DurableConfig? (readonly)

Note:

Default: - No durable configuration

The durable configuration for the function.

If durability is added to an existing function, a resource replacement will be triggered. See the 'durableConfig' section in the module README for more details.



314
315
316
# File 'lambda_nodejs/nodejs_function_props.rb', line 314

def durable_config
  @durable_config
end

#entryString? (readonly)

Note:

Default: - (Realible in Node projects only) derived from the defining file's name and construct ID as described in the documentation.

Path to the entry file (JavaScript or TypeScript).

If this is a relative path, it will be evaluated with respect to the JavaScript/TypeScript source file that instantiates the NodejsFunction construct. If the current project is not a Node project, relative paths are not reliable and absolute paths should be used.

This file should be located underneath the project_root directory (by default, the directory containing the package manager's lock file).

If omitted, the entry file will be derived from the TypeScript/JavaScript file that instantiates the NodejsFunction construct, and the construct identifier of the NodejsFunction construct, in the following way:

<filename>.<construct-id>.(ts|js)

// Example, if stack.ts contains the following:
new NodejsFunction(this, 'my-handler', { ... });

// Then the implicit entry point(s) will be
stack.my-handler.ts
stack.my-handler.js

Again: if the current project is not a Node project this is not reliable, and instead explicit, absolute paths should be used.

Returns:

  • (String, nil)


653
654
655
# File 'lambda_nodejs/nodejs_function_props.rb', line 653

def entry
  @entry
end

#environmentHash{String => String}? (readonly)

Note:

Default: - No environment variables.

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.

Returns:

  • (Hash{String => String}, nil)


323
324
325
# File 'lambda_nodejs/nodejs_function_props.rb', line 323

def environment
  @environment
end

#environment_encryptionAWSCDK::Interfaces::AWSKMS::IKeyRef? (readonly)

Note:

Default: - AWS Lambda creates and uses an AWS managed customer master key (CMK).

The AWS KMS key that's used to encrypt your function's environment variables.



328
329
330
# File 'lambda_nodejs/nodejs_function_props.rb', line 328

def environment_encryption
  @environment_encryption
end

#ephemeral_storage_sizeAWSCDK::Size? (readonly)

Note:

Default: 512 MiB

The size of the function’s /tmp directory in MiB.

Returns:



333
334
335
# File 'lambda_nodejs/nodejs_function_props.rb', line 333

def ephemeral_storage_size
  @ephemeral_storage_size
end

#eventsArray<AWSCDK::Lambda::IEventSource>? (readonly)

Note:

Default: - No event sources.

Event sources for this function.

You can also add event sources using add_event_source.

Returns:



340
341
342
# File 'lambda_nodejs/nodejs_function_props.rb', line 340

def events
  @events
end

#filesystemAWSCDK::Lambda::FileSystem? (readonly)

Note:

Default: - will not mount any filesystem

The filesystem configuration for the lambda function.

Returns:



345
346
347
# File 'lambda_nodejs/nodejs_function_props.rb', line 345

def filesystem
  @filesystem
end

#function_nameString? (readonly)

Note:

Default: - AWS CloudFormation generates a unique physical ID and uses that ID for the function's name. For more information, see Name Type.

A name for the function.

Returns:

  • (String, nil)


350
351
352
# File 'lambda_nodejs/nodejs_function_props.rb', line 350

def function_name
  @function_name
end

#handlerString? (readonly)

Note:

Default: handler

The name of the exported handler in the entry file.

  • If the code property is supplied, then you must include the handler 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 called myLambda.js and the function to be invoked was my_handler, then you should input handler property as myLambda.myHandler.
  • If the code property is not supplied and the handler input does not contain a ., then the handler is prefixed with index. (index period). Otherwise, the handler property is not modified.

Returns:

  • (String, nil)


664
665
666
# File 'lambda_nodejs/nodejs_function_props.rb', line 664

def handler
  @handler
end

#initial_policyArray<AWSCDK::IAM::PolicyStatement>? (readonly)

Note:

Default: - No policy statements are added to the created Lambda role.

Initial policy statements to add to the created Lambda Role.

You can call add_to_role_policy to the created lambda to add statements post creation.

Returns:



357
358
359
# File 'lambda_nodejs/nodejs_function_props.rb', line 357

def initial_policy
  @initial_policy
end

#insights_versionAWSCDK::Lambda::LambdaInsightsVersion? (readonly)

Note:

Default: - No Lambda Insights

Specify the version of CloudWatch Lambda insights to use for monitoring.



363
364
365
# File 'lambda_nodejs/nodejs_function_props.rb', line 363

def insights_version
  @insights_version
end

#ipv6_allowed_for_dual_stackBoolean? (readonly)

Note:

Default: false

Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets.

Only used if 'vpc' is supplied.

Returns:

  • (Boolean, nil)


370
371
372
# File 'lambda_nodejs/nodejs_function_props.rb', line 370

def ipv6_allowed_for_dual_stack
  @ipv6_allowed_for_dual_stack
end

#layersArray<AWSCDK::Lambda::ILayerVersion>? (readonly)

Note:

Default: - No layers.

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.

Returns:



379
380
381
# File 'lambda_nodejs/nodejs_function_props.rb', line 379

def layers
  @layers
end

#log_formatString? (readonly)

Deprecated.

Use loggingFormat as a property instead.

Note:

Default: "Text"

Sets the logFormat for the function.

Returns:

  • (String, nil)


385
386
387
# File 'lambda_nodejs/nodejs_function_props.rb', line 385

def log_format
  @log_format
end

#log_groupAWSCDK::Interfaces::AWSLogs::ILogGroupRef? (readonly)

Note:

Default: /aws/lambda/${this.functionName} - default log group created by Lambda

The log group the function sends logs to.

By default, Lambda functions send logs to an automatically created default log group named /aws/lambda/. 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 log_group 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.



403
404
405
# File 'lambda_nodejs/nodejs_function_props.rb', line 403

def log_group
  @log_group
end

#log_removal_policyAWSCDK::RemovalPolicy? (readonly)

Deprecated.

use logGroup instead

Note:

Default: RemovalPolicy.Retain

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.

Returns:



414
415
416
# File 'lambda_nodejs/nodejs_function_props.rb', line 414

def log_removal_policy
  @log_removal_policy
end

#log_retentionAWSCDK::Logs::RetentionDays? (readonly)

Deprecated.

use logGroup instead

Note:

Default: logs.RetentionDays.INFINITE

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 log_group property to instruct the Lambda function to send logs to it. Migrating from log_retention to log_group 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:

require 'aws-cdk-lib'

my_log_group = nil # AWSCDK::Logs::LogGroup
my_log_group.log_group_name

Returns:



439
440
441
# File 'lambda_nodejs/nodejs_function_props.rb', line 439

def log_retention
  @log_retention
end

#log_retention_retry_optionsAWSCDK::Lambda::LogRetentionRetryOptions? (readonly)

Note:

Default: - Default AWS SDK retry options.

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 log_group if you can. log_group allows you to create a fully customizable log group and instruct the Lambda function to send logs to it.



449
450
451
# File 'lambda_nodejs/nodejs_function_props.rb', line 449

def log_retention_retry_options
  @log_retention_retry_options
end

#log_retention_roleAWSCDK::IAM::IRole? (readonly)

Note:

Default: - A new role is created.

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 log_group if you can. log_group allows you to create a fully customizable log group and instruct the Lambda function to send logs to it.

Returns:



457
458
459
# File 'lambda_nodejs/nodejs_function_props.rb', line 457

def log_retention_role
  @log_retention_role
end

#logging_formatAWSCDK::Lambda::LoggingFormat? (readonly)

Note:

Default: LoggingFormat.TEXT

Sets the loggingFormat for the function.



390
391
392
# File 'lambda_nodejs/nodejs_function_props.rb', line 390

def logging_format
  @logging_format
end

#max_event_ageAWSCDK::Duration? (readonly)

Note:

Default: Duration.hours(6)

The maximum age of a request that Lambda sends to a function for processing.

Minimum: 60 seconds Maximum: 6 hours

Returns:



197
198
199
# File 'lambda_nodejs/nodejs_function_props.rb', line 197

def max_event_age
  @max_event_age
end

#memory_sizeNumeric? (readonly)

Note:

Default: 128

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.

Returns:

  • (Numeric, nil)


466
467
468
# File 'lambda_nodejs/nodejs_function_props.rb', line 466

def memory_size
  @memory_size
end

#on_failureAWSCDK::Lambda::IDestination? (readonly)

Note:

Default: - no destination

The destination for failed invocations.



202
203
204
# File 'lambda_nodejs/nodejs_function_props.rb', line 202

def on_failure
  @on_failure
end

#on_successAWSCDK::Lambda::IDestination? (readonly)

Note:

Default: - no destination

The destination for successful invocations.



207
208
209
# File 'lambda_nodejs/nodejs_function_props.rb', line 207

def on_success
  @on_success
end

#params_and_secretsAWSCDK::Lambda::ParamsAndSecretsLayerVersion? (readonly)

Note:

Default: - No Parameters and Secrets Extension

Specify the configuration of Parameters and Secrets Extension.



472
473
474
# File 'lambda_nodejs/nodejs_function_props.rb', line 472

def params_and_secrets
  @params_and_secrets
end

#profilingBoolean? (readonly)

Note:

Default: - No profiling.

Enable profiling.



478
479
480
# File 'lambda_nodejs/nodejs_function_props.rb', line 478

def profiling
  @profiling
end

#profiling_groupAWSCDK::CodeGuruProfiler::IProfilingGroup? (readonly)

Note:

Default: - A new profiling group will be created if profiling is set.

Profiling Group.



484
485
486
# File 'lambda_nodejs/nodejs_function_props.rb', line 484

def profiling_group
  @profiling_group
end

#project_rootString? (readonly)

Note:

Default: - the directory containing the depsLockFilePath

The path to the directory containing project config files (package.json or tsconfig.json).

Returns:

  • (String, nil)


669
670
671
# File 'lambda_nodejs/nodejs_function_props.rb', line 669

def project_root
  @project_root
end

#recursive_loopAWSCDK::Lambda::RecursiveLoop? (readonly)

Note:

Default: RecursiveLoop.Terminate

Sets the Recursive Loop Protection for Lambda Function.

It lets Lambda detect and terminate unintended recursive loops.



491
492
493
# File 'lambda_nodejs/nodejs_function_props.rb', line 491

def recursive_loop
  @recursive_loop
end

#reserved_concurrent_executionsNumeric? (readonly)

Note:

Default: - No specific limit - account limit.

The maximum of concurrent executions you want to reserve for the function.



497
498
499
# File 'lambda_nodejs/nodejs_function_props.rb', line 497

def reserved_concurrent_executions
  @reserved_concurrent_executions
end

#retry_attemptsNumeric? (readonly)

Note:

Default: 2

The maximum number of times to retry when the function returns an error.

Minimum: 0 Maximum: 2

Returns:

  • (Numeric, nil)


215
216
217
# File 'lambda_nodejs/nodejs_function_props.rb', line 215

def retry_attempts
  @retry_attempts
end

#roleAWSCDK::IAM::IRole? (readonly)

Note:

Default: - A unique role will be generated for this lambda function. Both supplied and generated roles can always be changed by calling addToRolePolicy.

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".

Returns:



512
513
514
# File 'lambda_nodejs/nodejs_function_props.rb', line 512

def role
  @role
end

#runtimeAWSCDK::Lambda::Runtime? (readonly)

Note:

Default: Runtime.NODEJS_LATEST if the @aws-cdk/aws-lambda-nodejs:useLatestRuntimeVersion feature flag is enabled, otherwise Runtime.NODEJS_16_X

The runtime environment.

Only runtimes of the Node.js family are supported.

Returns:



677
678
679
# File 'lambda_nodejs/nodejs_function_props.rb', line 677

def runtime
  @runtime
end

#runtime_management_modeAWSCDK::Lambda::RuntimeManagementMode? (readonly)

Note:

Default: Auto

Sets the runtime management configuration for a function's version.



517
518
519
# File 'lambda_nodejs/nodejs_function_props.rb', line 517

def runtime_management_mode
  @runtime_management_mode
end

#security_groupsArray<AWSCDK::EC2::ISecurityGroup>? (readonly)

Note:

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.

The list of security groups to associate with the Lambda's network interfaces.

Only used if 'vpc' is supplied.

Returns:



524
525
526
# File 'lambda_nodejs/nodejs_function_props.rb', line 524

def security_groups
  @security_groups
end

#snap_startAWSCDK::Lambda::SnapStartConf? (readonly)

Note:

Default: - No snapstart

Enable SnapStart for Lambda Function.

SnapStart is currently supported for Java 11, Java 17, Python 3.12, Python 3.13, and .NET 8 runtime



531
532
533
# File 'lambda_nodejs/nodejs_function_props.rb', line 531

def snap_start
  @snap_start
end

#system_log_levelString? (readonly)

Deprecated.

Use systemLogLevelV2 as a property instead.

Note:

Default: "INFO"

Sets the system log level for the function.

Returns:

  • (String, nil)


537
538
539
# File 'lambda_nodejs/nodejs_function_props.rb', line 537

def system_log_level
  @system_log_level
end

#system_log_level_v2AWSCDK::Lambda::SystemLogLevel? (readonly)

Note:

Default: SystemLogLevel.INFO

Sets the system log level for the function.



542
543
544
# File 'lambda_nodejs/nodejs_function_props.rb', line 542

def system_log_level_v2
  @system_log_level_v2
end

#tenancy_configAWSCDK::Lambda::TenancyConfig? (readonly)

Note:

Default: - Tenant isolation is not enabled

The tenancy configuration for the function.



547
548
549
# File 'lambda_nodejs/nodejs_function_props.rb', line 547

def tenancy_config
  @tenancy_config
end

#timeoutAWSCDK::Duration? (readonly)

Note:

Default: Duration.seconds(3)

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.

Returns:



555
556
557
# File 'lambda_nodejs/nodejs_function_props.rb', line 555

def timeout
  @timeout
end

#tracingAWSCDK::Lambda::Tracing? (readonly)

Note:

Default: Tracing.Disabled

Enable AWS X-Ray Tracing for Lambda Function.

Returns:



560
561
562
# File 'lambda_nodejs/nodejs_function_props.rb', line 560

def tracing
  @tracing
end

#vpcAWSCDK::EC2::IVPC? (readonly)

Note:

Default: - Function is not placed within a VPC.

VPC network to place Lambda network interfaces.

Specify this if the Lambda function needs to access resources in a VPC. This is required when vpc_subnets is specified.

Returns:



568
569
570
# File 'lambda_nodejs/nodejs_function_props.rb', line 568

def vpc
  @vpc
end

#vpc_subnetsAWSCDK::EC2::SubnetSelection? (readonly)

Note:

Default: - the Vpc default strategy if not specified

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 allow_public_subnet is set to true).



579
580
581
# File 'lambda_nodejs/nodejs_function_props.rb', line 579

def vpc_subnets
  @vpc_subnets
end

Class Method Details

.jsii_propertiesObject



679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
# File 'lambda_nodejs/nodejs_function_props.rb', line 679

def self.jsii_properties
  {
    :max_event_age => "maxEventAge",
    :on_failure => "onFailure",
    :on_success => "onSuccess",
    :retry_attempts => "retryAttempts",
    :adot_instrumentation => "adotInstrumentation",
    :allow_all_ipv6_outbound => "allowAllIpv6Outbound",
    :allow_all_outbound => "allowAllOutbound",
    :allow_public_subnet => "allowPublicSubnet",
    :application_log_level => "applicationLogLevel",
    :application_log_level_v2 => "applicationLogLevelV2",
    :architecture => "architecture",
    :code_signing_config => "codeSigningConfig",
    :current_version_options => "currentVersionOptions",
    :dead_letter_queue => "deadLetterQueue",
    :dead_letter_queue_enabled => "deadLetterQueueEnabled",
    :dead_letter_topic => "deadLetterTopic",
    :description => "description",
    :durable_config => "durableConfig",
    :environment => "environment",
    :environment_encryption => "environmentEncryption",
    :ephemeral_storage_size => "ephemeralStorageSize",
    :events => "events",
    :filesystem => "filesystem",
    :function_name => "functionName",
    :initial_policy => "initialPolicy",
    :insights_version => "insightsVersion",
    :ipv6_allowed_for_dual_stack => "ipv6AllowedForDualStack",
    :layers => "layers",
    :log_format => "logFormat",
    :logging_format => "loggingFormat",
    :log_group => "logGroup",
    :log_removal_policy => "logRemovalPolicy",
    :log_retention => "logRetention",
    :log_retention_retry_options => "logRetentionRetryOptions",
    :log_retention_role => "logRetentionRole",
    :memory_size => "memorySize",
    :params_and_secrets => "paramsAndSecrets",
    :profiling => "profiling",
    :profiling_group => "profilingGroup",
    :recursive_loop => "recursiveLoop",
    :reserved_concurrent_executions => "reservedConcurrentExecutions",
    :role => "role",
    :runtime_management_mode => "runtimeManagementMode",
    :security_groups => "securityGroups",
    :snap_start => "snapStart",
    :system_log_level => "systemLogLevel",
    :system_log_level_v2 => "systemLogLevelV2",
    :tenancy_config => "tenancyConfig",
    :timeout => "timeout",
    :tracing => "tracing",
    :vpc => "vpc",
    :vpc_subnets => "vpcSubnets",
    :aws_sdk_connection_reuse => "awsSdkConnectionReuse",
    :bundling => "bundling",
    :code => "code",
    :deps_lock_file_path => "depsLockFilePath",
    :entry => "entry",
    :handler => "handler",
    :project_root => "projectRoot",
    :runtime => "runtime",
  }
end

Instance Method Details

#to_jsiiObject



744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
# File 'lambda_nodejs/nodejs_function_props.rb', line 744

def to_jsii
  result = {}
  result.merge!(super)
  result.merge!({
    "maxEventAge" => @max_event_age,
    "onFailure" => @on_failure,
    "onSuccess" => @on_success,
    "retryAttempts" => @retry_attempts,
    "adotInstrumentation" => @adot_instrumentation,
    "allowAllIpv6Outbound" => @allow_all_ipv6_outbound,
    "allowAllOutbound" => @allow_all_outbound,
    "allowPublicSubnet" => @allow_public_subnet,
    "applicationLogLevel" => @application_log_level,
    "applicationLogLevelV2" => @application_log_level_v2,
    "architecture" => @architecture,
    "codeSigningConfig" => @code_signing_config,
    "currentVersionOptions" => @current_version_options,
    "deadLetterQueue" => @dead_letter_queue,
    "deadLetterQueueEnabled" => @dead_letter_queue_enabled,
    "deadLetterTopic" => @dead_letter_topic,
    "description" => @description,
    "durableConfig" => @durable_config,
    "environment" => @environment,
    "environmentEncryption" => @environment_encryption,
    "ephemeralStorageSize" => @ephemeral_storage_size,
    "events" => @events,
    "filesystem" => @filesystem,
    "functionName" => @function_name,
    "initialPolicy" => @initial_policy,
    "insightsVersion" => @insights_version,
    "ipv6AllowedForDualStack" => @ipv6_allowed_for_dual_stack,
    "layers" => @layers,
    "logFormat" => @log_format,
    "loggingFormat" => @logging_format,
    "logGroup" => @log_group,
    "logRemovalPolicy" => @log_removal_policy,
    "logRetention" => @log_retention,
    "logRetentionRetryOptions" => @log_retention_retry_options,
    "logRetentionRole" => @log_retention_role,
    "memorySize" => @memory_size,
    "paramsAndSecrets" => @params_and_secrets,
    "profiling" => @profiling,
    "profilingGroup" => @profiling_group,
    "recursiveLoop" => @recursive_loop,
    "reservedConcurrentExecutions" => @reserved_concurrent_executions,
    "role" => @role,
    "runtimeManagementMode" => @runtime_management_mode,
    "securityGroups" => @security_groups,
    "snapStart" => @snap_start,
    "systemLogLevel" => @system_log_level,
    "systemLogLevelV2" => @system_log_level_v2,
    "tenancyConfig" => @tenancy_config,
    "timeout" => @timeout,
    "tracing" => @tracing,
    "vpc" => @vpc,
    "vpcSubnets" => @vpc_subnets,
    "awsSdkConnectionReuse" => @aws_sdk_connection_reuse,
    "bundling" => @bundling,
    "code" => @code,
    "depsLockFilePath" => @deps_lock_file_path,
    "entry" => @entry,
    "handler" => @handler,
    "projectRoot" => @project_root,
    "runtime" => @runtime,
  })
  result.compact
end