Class: AWSCDK::Lambda::CfnFunctionProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
lambda/cfn_function_props.rb

Overview

Properties for defining a CfnFunction.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code:, role:, architectures: nil, capacity_provider_config: nil, code_signing_config_arn: nil, dead_letter_config: nil, description: nil, durable_config: nil, environment: nil, ephemeral_storage: nil, file_system_configs: nil, function_name: nil, function_scaling_config: nil, handler: nil, image_config: nil, kms_key_arn: nil, layers: nil, logging_config: nil, memory_size: nil, package_type: nil, publish_to_latest_published: nil, recursive_loop: nil, reserved_concurrent_executions: nil, runtime: nil, runtime_management_config: nil, snap_start: nil, tags: nil, tenancy_config: nil, timeout: nil, tracing_config: nil, vpc_config: nil) ⇒ CfnFunctionProps

Returns a new instance of CfnFunctionProps.

Parameters:



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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
# File 'lambda/cfn_function_props.rb', line 40

def initialize(code:, role:, architectures: nil, capacity_provider_config: nil, code_signing_config_arn: nil, dead_letter_config: nil, description: nil, durable_config: nil, environment: nil, ephemeral_storage: nil, file_system_configs: nil, function_name: nil, function_scaling_config: nil, handler: nil, image_config: nil, kms_key_arn: nil, layers: nil, logging_config: nil, memory_size: nil, package_type: nil, publish_to_latest_published: nil, recursive_loop: nil, reserved_concurrent_executions: nil, runtime: nil, runtime_management_config: nil, snap_start: nil, tags: nil, tenancy_config: nil, timeout: nil, tracing_config: nil, vpc_config: nil)
  @code = code.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::CodeProperty.new(**code.transform_keys(&:to_sym)) : code
  Jsii::Type.check_type(@code, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uQ29kZVByb3BlcnR5In1dfX0=")), "code")
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19pYW0uSVJvbGVSZWYifV19fQ==")), "role")
  @architectures = architectures
  Jsii::Type.check_type(@architectures, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "architectures") unless @architectures.nil?
  @capacity_provider_config = capacity_provider_config.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::CapacityProviderConfigProperty.new(**capacity_provider_config.transform_keys(&:to_sym)) : capacity_provider_config
  Jsii::Type.check_type(@capacity_provider_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uQ2FwYWNpdHlQcm92aWRlckNvbmZpZ1Byb3BlcnR5In1dfX0=")), "capacityProviderConfig") unless @capacity_provider_config.nil?
  @code_signing_config_arn = code_signing_config_arn
  Jsii::Type.check_type(@code_signing_config_arn, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19sYW1iZGEuSUNvZGVTaWduaW5nQ29uZmlnUmVmIn1dfX0=")), "codeSigningConfigArn") unless @code_signing_config_arn.nil?
  @dead_letter_config = dead_letter_config.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::DeadLetterConfigProperty.new(**dead_letter_config.transform_keys(&:to_sym)) : dead_letter_config
  Jsii::Type.check_type(@dead_letter_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uRGVhZExldHRlckNvbmZpZ1Byb3BlcnR5In1dfX0=")), "deadLetterConfig") unless @dead_letter_config.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::CfnFunction::DurableConfigProperty.new(**durable_config.transform_keys(&:to_sym)) : durable_config
  Jsii::Type.check_type(@durable_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uRHVyYWJsZUNvbmZpZ1Byb3BlcnR5In1dfX0=")), "durableConfig") unless @durable_config.nil?
  @environment = environment.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::EnvironmentProperty.new(**environment.transform_keys(&:to_sym)) : environment
  Jsii::Type.check_type(@environment, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uRW52aXJvbm1lbnRQcm9wZXJ0eSJ9XX19")), "environment") unless @environment.nil?
  @ephemeral_storage = ephemeral_storage.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::EphemeralStorageProperty.new(**ephemeral_storage.transform_keys(&:to_sym)) : ephemeral_storage
  Jsii::Type.check_type(@ephemeral_storage, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uRXBoZW1lcmFsU3RvcmFnZVByb3BlcnR5In1dfX0=")), "ephemeralStorage") unless @ephemeral_storage.nil?
  @file_system_configs = file_system_configs
  Jsii::Type.check_type(@file_system_configs, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfbGFtYmRhLkNmbkZ1bmN0aW9uLkZpbGVTeXN0ZW1Db25maWdQcm9wZXJ0eSJ9XX19LCJraW5kIjoiYXJyYXkifX1dfX0=")), "fileSystemConfigs") unless @file_system_configs.nil?
  @function_name = function_name
  Jsii::Type.check_type(@function_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "functionName") unless @function_name.nil?
  @function_scaling_config = function_scaling_config.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::FunctionScalingConfigProperty.new(**function_scaling_config.transform_keys(&:to_sym)) : function_scaling_config
  Jsii::Type.check_type(@function_scaling_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uRnVuY3Rpb25TY2FsaW5nQ29uZmlnUHJvcGVydHkifV19fQ==")), "functionScalingConfig") unless @function_scaling_config.nil?
  @handler = handler
  Jsii::Type.check_type(@handler, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "handler") unless @handler.nil?
  @image_config = image_config.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::ImageConfigProperty.new(**image_config.transform_keys(&:to_sym)) : image_config
  Jsii::Type.check_type(@image_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uSW1hZ2VDb25maWdQcm9wZXJ0eSJ9XX19")), "imageConfig") unless @image_config.nil?
  @kms_key_arn = kms_key_arn
  Jsii::Type.check_type(@kms_key_arn, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19rbXMuSUtleVJlZiJ9XX19")), "kmsKeyArn") unless @kms_key_arn.nil?
  @layers = layers
  Jsii::Type.check_type(@layers, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InVuaW9uIjp7InR5cGVzIjpbeyJwcmltaXRpdmUiOiJzdHJpbmcifSx7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX2xhbWJkYS5JTGF5ZXJWZXJzaW9uUmVmIn1dfX0sImtpbmQiOiJhcnJheSJ9fQ==")), "layers") unless @layers.nil?
  @logging_config = logging_config.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::LoggingConfigProperty.new(**logging_config.transform_keys(&:to_sym)) : logging_config
  Jsii::Type.check_type(@logging_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uTG9nZ2luZ0NvbmZpZ1Byb3BlcnR5In1dfX0=")), "loggingConfig") unless @logging_config.nil?
  @memory_size = memory_size
  Jsii::Type.check_type(@memory_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "memorySize") unless @memory_size.nil?
  @package_type = package_type
  Jsii::Type.check_type(@package_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "packageType") unless @package_type.nil?
  @publish_to_latest_published = publish_to_latest_published
  Jsii::Type.check_type(@publish_to_latest_published, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "publishToLatestPublished") unless @publish_to_latest_published.nil?
  @recursive_loop = recursive_loop
  Jsii::Type.check_type(@recursive_loop, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "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?
  @runtime = runtime
  Jsii::Type.check_type(@runtime, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "runtime") unless @runtime.nil?
  @runtime_management_config = runtime_management_config.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::RuntimeManagementConfigProperty.new(**runtime_management_config.transform_keys(&:to_sym)) : runtime_management_config
  Jsii::Type.check_type(@runtime_management_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uUnVudGltZU1hbmFnZW1lbnRDb25maWdQcm9wZXJ0eSJ9XX19")), "runtimeManagementConfig") unless @runtime_management_config.nil?
  @snap_start = snap_start.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::SnapStartProperty.new(**snap_start.transform_keys(&:to_sym)) : snap_start
  Jsii::Type.check_type(@snap_start, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uU25hcFN0YXJ0UHJvcGVydHkifV19fQ==")), "snapStart") unless @snap_start.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
  @tenancy_config = tenancy_config.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::TenancyConfigProperty.new(**tenancy_config.transform_keys(&:to_sym)) : tenancy_config
  Jsii::Type.check_type(@tenancy_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uVGVuYW5jeUNvbmZpZ1Byb3BlcnR5In1dfX0=")), "tenancyConfig") unless @tenancy_config.nil?
  @timeout = timeout
  Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "timeout") unless @timeout.nil?
  @tracing_config = tracing_config.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::TracingConfigProperty.new(**tracing_config.transform_keys(&:to_sym)) : tracing_config
  Jsii::Type.check_type(@tracing_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uVHJhY2luZ0NvbmZpZ1Byb3BlcnR5In1dfX0=")), "tracingConfig") unless @tracing_config.nil?
  @vpc_config = vpc_config.is_a?(Hash) ? ::AWSCDK::Lambda::CfnFunction::VPCConfigProperty.new(**vpc_config.transform_keys(&:to_sym)) : vpc_config
  Jsii::Type.check_type(@vpc_config, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sYW1iZGEuQ2ZuRnVuY3Rpb24uVnBjQ29uZmlnUHJvcGVydHkifV19fQ==")), "vpcConfig") unless @vpc_config.nil?
end

Instance Attribute Details

#architecturesArray<String>? (readonly)

The instruction set architecture that the function supports.

Enter a string array with one of the valid values (arm64 or x86_64). The default value is x86_64 .



125
126
127
# File 'lambda/cfn_function_props.rb', line 125

def architectures
  @architectures
end

#capacity_provider_configAWSCDK::IResolvable, ... (readonly)

Configuration for the capacity provider that manages compute resources for Lambda functions.



130
131
132
# File 'lambda/cfn_function_props.rb', line 130

def capacity_provider_config
  @capacity_provider_config
end

#codeAWSCDK::IResolvable, AWSCDK::Lambda::CfnFunction::CodeProperty (readonly)

The code for the function. You can define your function code in multiple ways:.

  • For .zip deployment packages, you can specify the Amazon S3 location of the .zip file in the S3Bucket , S3Key , and S3ObjectVersion properties.
  • For .zip deployment packages, you can alternatively define the function code inline in the ZipFile property. This method works only for Node.js and Python functions.
  • For container images, specify the URI of your container image in the Amazon ECR registry in the ImageUri property.


113
114
115
# File 'lambda/cfn_function_props.rb', line 113

def code
  @code
end

#code_signing_config_arnString, ... (readonly)

To enable code signing for this function, specify the ARN of a code-signing configuration.

A code-signing configuration includes a set of signing profiles, which define the trusted publishers for this function.



138
139
140
# File 'lambda/cfn_function_props.rb', line 138

def code_signing_config_arn
  @code_signing_config_arn
end

#dead_letter_configAWSCDK::IResolvable, ... (readonly)

A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing.

For more information, see Dead-letter queues .



145
146
147
# File 'lambda/cfn_function_props.rb', line 145

def dead_letter_config
  @dead_letter_config
end

#descriptionString? (readonly)

A description of the function.



150
151
152
# File 'lambda/cfn_function_props.rb', line 150

def description
  @description
end

#durable_configAWSCDK::IResolvable, ... (readonly)

Configuration settings for durable functions , including execution timeout and retention period for execution history.



155
156
157
# File 'lambda/cfn_function_props.rb', line 155

def durable_config
  @durable_config
end

#environmentAWSCDK::IResolvable, ... (readonly)

Environment variables that are accessible from function code during execution.



160
161
162
# File 'lambda/cfn_function_props.rb', line 160

def environment
  @environment
end

#ephemeral_storageAWSCDK::IResolvable, ... (readonly)

The size of the function's /tmp directory in MB.

The default value is 512, but it can be any whole number between 512 and 10,240 MB.



167
168
169
# File 'lambda/cfn_function_props.rb', line 167

def ephemeral_storage
  @ephemeral_storage
end

#file_system_configsAWSCDK::IResolvable, ... (readonly)

Connection settings for an Amazon EFS file system.

To connect a function to a file system, a mount target must be available in every Availability Zone that your function connects to. If your template contains an AWS::EFS::MountTarget resource, you must also specify a DependsOn attribute to ensure that the mount target is created or updated before the function.

For more information about using the DependsOn attribute, see DependsOn Attribute .



176
177
178
# File 'lambda/cfn_function_props.rb', line 176

def file_system_configs
  @file_system_configs
end

#function_nameString? (readonly)

The name of the Lambda function, up to 64 characters in length.

If you don't specify a name, CloudFormation generates one.

If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.



185
186
187
# File 'lambda/cfn_function_props.rb', line 185

def function_name
  @function_name
end

#function_scaling_configAWSCDK::IResolvable, ... (readonly)

Configuration that defines the scaling behavior for a Lambda Managed Instances function, including the minimum and maximum number of execution environments that can be provisioned.



190
191
192
# File 'lambda/cfn_function_props.rb', line 190

def function_scaling_config
  @function_scaling_config
end

#handlerString? (readonly)

The name of the method within your code that Lambda calls to run your function.

Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see Lambda programming model .



197
198
199
# File 'lambda/cfn_function_props.rb', line 197

def handler
  @handler
end

#image_configAWSCDK::IResolvable, ... (readonly)

Configuration values that override the container image Dockerfile settings.

For more information, see Container image settings .



204
205
206
# File 'lambda/cfn_function_props.rb', line 204

def image_config
  @image_config
end

#kms_key_arnString, ... (readonly)

The ARN of the AWS Key Management Service ( AWS ) customer managed key that's used to encrypt the following resources:.

  • The function's environment variables .
  • The function's Lambda SnapStart snapshots.
  • When used with SourceKMSKeyArn , the unzipped version of the .zip deployment package that's used for function invocations. For more information, see Specifying a customer managed key for Lambda .
  • The optimized version of the container image that's used for function invocations. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). For more information, see Function lifecycle .

If you don't provide a customer managed key, Lambda uses an AWS owned key or an AWS managed key .



216
217
218
# File 'lambda/cfn_function_props.rb', line 216

def kms_key_arn
  @kms_key_arn
end

#layersArray<String, AWSCDK::Interfaces::AWSLambda::ILayerVersionRef>? (readonly)

A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.



221
222
223
# File 'lambda/cfn_function_props.rb', line 221

def layers
  @layers
end

#logging_configAWSCDK::IResolvable, ... (readonly)

The function's Amazon CloudWatch Logs configuration settings.



226
227
228
# File 'lambda/cfn_function_props.rb', line 226

def logging_config
  @logging_config
end

#memory_sizeNumeric? (readonly)

The amount of memory available to the function at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB. Note that new AWS accounts have reduced concurrency and memory quotas. AWS raises these quotas automatically based on your usage. You can also request a quota increase.



231
232
233
# File 'lambda/cfn_function_props.rb', line 231

def memory_size
  @memory_size
end

#package_typeString? (readonly)

The type of deployment package.

Set to Image for container image and set Zip for .zip file archive.



238
239
240
# File 'lambda/cfn_function_props.rb', line 238

def package_type
  @package_type
end

#publish_to_latest_publishedBoolean, ... (readonly)



241
242
243
# File 'lambda/cfn_function_props.rb', line 241

def publish_to_latest_published
  @publish_to_latest_published
end

#recursive_loopString? (readonly)

The status of your function's recursive loop detection configuration.

When this value is set to Allow and Lambda detects your function being invoked as part of a recursive loop, it doesn't take any action.

When this value is set to Terminate and Lambda detects your function being invoked as part of a recursive loop, it stops your function being invoked and notifies you.



250
251
252
# File 'lambda/cfn_function_props.rb', line 250

def recursive_loop
  @recursive_loop
end

#reserved_concurrent_executionsNumeric? (readonly)

The number of simultaneous executions to reserve for the function.



255
256
257
# File 'lambda/cfn_function_props.rb', line 255

def reserved_concurrent_executions
  @reserved_concurrent_executions
end

#roleString, AWSCDK::Interfaces::AWSIAM::IRoleRef (readonly)

The Amazon Resource Name (ARN) of the function's execution role.



118
119
120
# File 'lambda/cfn_function_props.rb', line 118

def role
  @role
end

#runtimeString? (readonly)

The identifier of the function's runtime . Runtime is required if the deployment package is a .zip file archive. Specifying a runtime results in an error if you're deploying a function using a container image.

The following list includes deprecated runtimes. Lambda blocks creating new functions and updating existing functions shortly after each runtime is deprecated. For more information, see Runtime use after deprecation .

For a list of all currently supported runtimes, see Supported runtimes .



264
265
266
# File 'lambda/cfn_function_props.rb', line 264

def runtime
  @runtime
end

#runtime_management_configAWSCDK::IResolvable, ... (readonly)

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

For more information, see Runtime updates .



271
272
273
# File 'lambda/cfn_function_props.rb', line 271

def runtime_management_config
  @runtime_management_config
end

#snap_startAWSCDK::IResolvable, ... (readonly)

The function's AWS Lambda SnapStart setting.



276
277
278
# File 'lambda/cfn_function_props.rb', line 276

def snap_start
  @snap_start
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

A list of tags to apply to the function.

You must have the lambda:TagResource , lambda:UntagResource , and lambda:ListTags permissions for your IAM principal to manage the CloudFormation stack. If you don't have these permissions, there might be unexpected behavior with stack-level tags propagating to the resource during resource creation and update.



283
284
285
# File 'lambda/cfn_function_props.rb', line 283

def tags
  @tags
end

#tenancy_configAWSCDK::IResolvable, ... (readonly)

The function's tenant isolation configuration settings.

Determines whether the Lambda function runs on a shared or dedicated infrastructure per unique tenant.



290
291
292
# File 'lambda/cfn_function_props.rb', line 290

def tenancy_config
  @tenancy_config
end

#timeoutNumeric? (readonly)

The amount of time (in seconds) that Lambda allows a function to run before stopping it.

The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see Lambda execution environment .



297
298
299
# File 'lambda/cfn_function_props.rb', line 297

def timeout
  @timeout
end

#tracing_configAWSCDK::IResolvable, ... (readonly)

Set Mode to Active to sample and trace a subset of incoming requests with X-Ray .



302
303
304
# File 'lambda/cfn_function_props.rb', line 302

def tracing_config
  @tracing_config
end

#vpc_configAWSCDK::IResolvable, ... (readonly)

For network connectivity to AWS resources in a VPC, specify a list of security groups and subnets in the VPC.

When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see Configuring a Lambda function to access resources in a VPC .



309
310
311
# File 'lambda/cfn_function_props.rb', line 309

def vpc_config
  @vpc_config
end

Class Method Details

.jsii_propertiesObject



311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
# File 'lambda/cfn_function_props.rb', line 311

def self.jsii_properties
  {
    :code => "code",
    :role => "role",
    :architectures => "architectures",
    :capacity_provider_config => "capacityProviderConfig",
    :code_signing_config_arn => "codeSigningConfigArn",
    :dead_letter_config => "deadLetterConfig",
    :description => "description",
    :durable_config => "durableConfig",
    :environment => "environment",
    :ephemeral_storage => "ephemeralStorage",
    :file_system_configs => "fileSystemConfigs",
    :function_name => "functionName",
    :function_scaling_config => "functionScalingConfig",
    :handler => "handler",
    :image_config => "imageConfig",
    :kms_key_arn => "kmsKeyArn",
    :layers => "layers",
    :logging_config => "loggingConfig",
    :memory_size => "memorySize",
    :package_type => "packageType",
    :publish_to_latest_published => "publishToLatestPublished",
    :recursive_loop => "recursiveLoop",
    :reserved_concurrent_executions => "reservedConcurrentExecutions",
    :runtime => "runtime",
    :runtime_management_config => "runtimeManagementConfig",
    :snap_start => "snapStart",
    :tags => "tags",
    :tenancy_config => "tenancyConfig",
    :timeout => "timeout",
    :tracing_config => "tracingConfig",
    :vpc_config => "vpcConfig",
  }
end

Instance Method Details

#to_jsiiObject



347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'lambda/cfn_function_props.rb', line 347

def to_jsii
  result = {}
  result.merge!({
    "code" => @code,
    "role" => @role,
    "architectures" => @architectures,
    "capacityProviderConfig" => @capacity_provider_config,
    "codeSigningConfigArn" => @code_signing_config_arn,
    "deadLetterConfig" => @dead_letter_config,
    "description" => @description,
    "durableConfig" => @durable_config,
    "environment" => @environment,
    "ephemeralStorage" => @ephemeral_storage,
    "fileSystemConfigs" => @file_system_configs,
    "functionName" => @function_name,
    "functionScalingConfig" => @function_scaling_config,
    "handler" => @handler,
    "imageConfig" => @image_config,
    "kmsKeyArn" => @kms_key_arn,
    "layers" => @layers,
    "loggingConfig" => @logging_config,
    "memorySize" => @memory_size,
    "packageType" => @package_type,
    "publishToLatestPublished" => @publish_to_latest_published,
    "recursiveLoop" => @recursive_loop,
    "reservedConcurrentExecutions" => @reserved_concurrent_executions,
    "runtime" => @runtime,
    "runtimeManagementConfig" => @runtime_management_config,
    "snapStart" => @snap_start,
    "tags" => @tags,
    "tenancyConfig" => @tenancy_config,
    "timeout" => @timeout,
    "tracingConfig" => @tracing_config,
    "vpcConfig" => @vpc_config,
  })
  result.compact
end