class
Amazonite::Lambda::CreateFunctionRequest
- Amazonite::Lambda::CreateFunctionRequest
- Reference
- Object
Included Modules
- JSON::Serializable
Defined in:
lambda/create_function_request.crConstructors
- .new(function_name : String, role : String, code : FunctionCode, runtime : Runtime | Nil = nil, handler : String | Nil = nil, description : String | Nil = nil, timeout : Int32 | Nil = nil, memory_size : Int32 | Nil = nil, publish : Bool | Nil = nil, publish_to : FunctionVersionLatestPublished | Nil = nil, vpc_config : VpcConfig | Nil = nil, package_type : PackageType | Nil = nil, dead_letter_config : DeadLetterConfig | Nil = nil, environment : Environment | Nil = nil, kms_key_arn : String | Nil = nil, tracing_config : TracingConfig | Nil = nil, tags : Hash(String, String) | Nil = nil, layers : Array(String) | Nil = nil, file_system_configs : Array(FileSystemConfig) | Nil = nil, code_signing_config_arn : String | Nil = nil, image_config : ImageConfig | Nil = nil, architectures : Array(Architecture) | Nil = nil, ephemeral_storage : EphemeralStorage | Nil = nil, snap_start : SnapStart | Nil = nil, logging_config : LoggingConfig | Nil = nil, tenancy_config : TenancyConfig | Nil = nil, capacity_provider_config : CapacityProviderConfig | Nil = nil, durable_config : DurableConfig | Nil = nil)
- .new(pull : JSON::PullParser)
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
Instance Method Summary
-
#==(other : self)
Returns
trueif this reference is the same as other. -
#architectures : Array(Architecture) | Nil
The instruction set architecture that the function supports.
-
#architectures=(architectures : Array(Architecture) | Nil)
The instruction set architecture that the function supports.
-
#capacity_provider_config : CapacityProviderConfig | Nil
Configuration for the capacity provider that manages compute resources for Lambda functions.
-
#capacity_provider_config=(capacity_provider_config : CapacityProviderConfig | Nil)
Configuration for the capacity provider that manages compute resources for Lambda functions.
-
#code : FunctionCode
The code for the function.
-
#code=(code : FunctionCode)
The code for the function.
-
#code_signing_config_arn : String | Nil
To enable code signing for this function, specify the ARN of a code-signing configuration.
-
#code_signing_config_arn=(code_signing_config_arn : String | Nil)
To enable code signing for this function, specify the ARN of a code-signing configuration.
-
#dead_letter_config : DeadLetterConfig | Nil
A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing.
-
#dead_letter_config=(dead_letter_config : DeadLetterConfig | Nil)
A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing.
-
#description : String | Nil
A description of the function.
-
#description=(description : String | Nil)
A description of the function.
-
#durable_config : DurableConfig | Nil
Configuration settings for durable functions.
-
#durable_config=(durable_config : DurableConfig | Nil)
Configuration settings for durable functions.
-
#environment : Environment | Nil
Environment variables that are accessible from function code during execution.
-
#environment=(environment : Environment | Nil)
Environment variables that are accessible from function code during execution.
-
#ephemeral_storage : EphemeralStorage | Nil
The size of the function's
/tmpdirectory in MB. -
#ephemeral_storage=(ephemeral_storage : EphemeralStorage | Nil)
The size of the function's
/tmpdirectory in MB. -
#file_system_configs : Array(FileSystemConfig) | Nil
Connection settings for an Amazon EFS file system or an Amazon S3 Files file system.
-
#file_system_configs=(file_system_configs : Array(FileSystemConfig) | Nil)
Connection settings for an Amazon EFS file system or an Amazon S3 Files file system.
-
#function_name : String
The name or ARN of the Lambda function.
-
#function_name=(function_name : String)
The name or ARN of the Lambda function.
-
#handler : String | Nil
The name of the method within your code that Lambda calls to run your function.
-
#handler=(handler : String | Nil)
The name of the method within your code that Lambda calls to run your function.
-
#hash(hasher)
See
Object#hash(hasher) -
#image_config : ImageConfig | Nil
Container image configuration values that override the values in the container image Dockerfile.
-
#image_config=(image_config : ImageConfig | Nil)
Container image configuration values that override the values in the container image Dockerfile.
-
#kms_key_arn : String | Nil
The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:
-
#kms_key_arn=(kms_key_arn : String | Nil)
The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt the following resources:
-
#layers : Array(String) | Nil
A list of function layers to add to the function's execution environment.
-
#layers=(layers : Array(String) | Nil)
A list of function layers to add to the function's execution environment.
-
#logging_config : LoggingConfig | Nil
The function's Amazon CloudWatch Logs configuration settings.
-
#logging_config=(logging_config : LoggingConfig | Nil)
The function's Amazon CloudWatch Logs configuration settings.
-
#memory_size : Int32 | Nil
The amount of memory available to the function at runtime.
-
#memory_size=(memory_size : Int32 | Nil)
The amount of memory available to the function at runtime.
-
#package_type : PackageType | Nil
The type of deployment package.
-
#package_type=(package_type : PackageType | Nil)
The type of deployment package.
-
#publish : Bool | Nil
Set to true to publish the first version of the function during creation.
-
#publish=(publish : Bool | Nil)
Set to true to publish the first version of the function during creation.
-
#publish_to : FunctionVersionLatestPublished | Nil
Specifies where to publish the function version or configuration.
-
#publish_to=(publish_to : FunctionVersionLatestPublished | Nil)
Specifies where to publish the function version or configuration.
-
#role : String
The Amazon Resource Name (ARN) of the function's execution role.
-
#role=(role : String)
The Amazon Resource Name (ARN) of the function's execution role.
-
#runtime : Runtime | Nil
The identifier of the function's runtime.
-
#runtime=(runtime : Runtime | Nil)
The identifier of the function's runtime.
-
#snap_start : SnapStart | Nil
The function's SnapStart setting.
-
#snap_start=(snap_start : SnapStart | Nil)
The function's SnapStart setting.
-
#tags : Hash(String, String) | Nil
A list of tags to apply to the function.
-
#tags=(tags : Hash(String, String) | Nil)
A list of tags to apply to the function.
-
#tenancy_config : TenancyConfig | Nil
Configuration for multi-tenant applications that use Lambda functions.
-
#tenancy_config=(tenancy_config : TenancyConfig | Nil)
Configuration for multi-tenant applications that use Lambda functions.
-
#timeout : Int32 | Nil
The amount of time (in seconds) that Lambda allows a function to run before stopping it.
-
#timeout=(timeout : Int32 | Nil)
The amount of time (in seconds) that Lambda allows a function to run before stopping it.
-
#tracing_config : TracingConfig | Nil
Set
ModetoActiveto sample and trace a subset of incoming requests with X-Ray. -
#tracing_config=(tracing_config : TracingConfig | Nil)
Set
ModetoActiveto sample and trace a subset of incoming requests with X-Ray. - #validate! : Nil
-
#vpc_config : VpcConfig | Nil
For network connectivity to Amazon Web Services resources in a VPC, specify a list of security groups and subnets in the VPC.
-
#vpc_config=(vpc_config : VpcConfig | Nil)
For network connectivity to Amazon Web Services resources in a VPC, specify a list of security groups and subnets in the VPC.
Constructor Detail
Instance Method Detail
Returns true if this reference is the same as other. Invokes same?.
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.
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.
Configuration for the capacity provider that manages compute resources for Lambda functions.
Configuration for the capacity provider that manages compute resources for Lambda functions.
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.
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.
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.
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.
Configuration settings for durable functions. Enables creating functions with durability that can remember their state and continue execution even after interruptions.
Configuration settings for durable functions. Enables creating functions with durability that can remember their state and continue execution even after interruptions.
Environment variables that are accessible from function code during execution.
Environment variables that are accessible from function code during execution.
The size of the function's /tmp directory in MB. The default value is 512, but can be any
whole number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage
(console).
The size of the function's /tmp directory in MB. The default value is 512, but can be any
whole number between 512 and 10,240 MB. For more information, see Configuring ephemeral storage
(console).
Connection settings for an Amazon EFS file system or an Amazon S3 Files file system.
Connection settings for an Amazon EFS file system or an Amazon S3 Files file system.
The name or ARN of the Lambda function.
Name formats
-
Function name –
my-function. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
The name or ARN of the Lambda function.
Name formats
-
Function name –
my-function. -
Function ARN –
arn:aws:lambda:us-west-2:123456789012:function:my-function. -
Partial ARN –
123456789012:function:my-function.
The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
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.
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.
Container image configuration values that override the values in the container image Dockerfile.
Container image configuration values that override the values in the container image Dockerfile.
The ARN of the Key Management Service (KMS) 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 Amazon Web Services owned key or an Amazon Web Services managed key.
The ARN of the Key Management Service (KMS) 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 Amazon Web Services owned key or an Amazon Web Services managed key.
A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
The function's Amazon CloudWatch Logs configuration settings.
The function's Amazon CloudWatch Logs configuration settings.
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.
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.
The type of deployment package. Set to Image for container image and set to Zip for .zip
file archive.
The type of deployment package. Set to Image for container image and set to Zip for .zip
file archive.
Set to true to publish the first version of the function during creation.
Set to true to publish the first version of the function during creation.
Specifies where to publish the function version or configuration.
Specifies where to publish the function version or configuration.
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.
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.
Configuration for multi-tenant applications that use Lambda functions. Defines tenant isolation settings and resource allocations. Required for functions supporting multiple tenants.
Configuration for multi-tenant applications that use Lambda functions. Defines tenant isolation settings and resource allocations. Required for functions supporting multiple tenants.
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.
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.
Set Mode to Active to sample and trace a subset of incoming requests with
X-Ray.
Set Mode to Active to sample and trace a subset of incoming requests with
X-Ray.
For network connectivity to Amazon Web Services 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.
For network connectivity to Amazon Web Services 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.