versions_by_functions
Creates, updates, deletes, gets or lists a versions_by_functions resource.
Overview
| Name | versions_by_functions |
| Type | Resource |
| Id | aws.lambda.versions_by_functions |
Fields
The following fields are returned by SELECT queries:
- list_versions_by_function
| Name | Datatype | Description |
|---|---|---|
architectures | array | The instruction set architecture that the function supports. Architecture is a string array with one of the valid values. The default architecture value is x86_64. |
capacity_provider_config | object | Configuration for the capacity provider that manages compute resources for Lambda functions. |
code_sha_256 | string | The SHA256 hash of the function's deployment package. |
code_size | integer (int64) | The size of the function's deployment package, in bytes. |
config_sha_256 | string | The SHA256 hash of the function configuration. |
dead_letter_config | object | The dead-letter queue for failed asynchronous invocations. |
description | string | The function's description. |
durable_config | object | Configuration settings for durable functions, including execution timeout, retention period for execution history, and an optional ARN of the Key Management Service (KMS) customer managed key that is used to encrypt your durable execution's payload data, including input, output, and error payloads. |
environment | object | The function's environment variables. Omitted from CloudTrail logs. |
ephemeral_storage | object | 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). |
file_system_configs | array | Connection settings for an Amazon EFS file system or an Amazon S3 Files file system. |
function_arn | string | The function's Amazon Resource Name (ARN). (pattern: <code>arn:(aws[a-zA-Z-]*)?:lambda:(eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:\d{12}:function:[a-zA-Z0-9-.]+(:($LATEST(.PUBLISHED)?|[a-zA-Z0-9-]+))?</code>) |
function_name | string | The name of the function. (pattern: <code>(arn:(aws[a-zA-Z-]*)?:lambda:(eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:\d{12}:|(((eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:)?(\d{12}:)?))(function:)?([a-zA-Z0-9-.]+)(:($LATEST(.PUBLISHED)?|[a-zA-Z0-9-]+))?</code>) |
handler | string | The function that Lambda calls to begin running your function. (pattern: <code>[^\s]+</code>) |
image_config_response | object | The function's image configuration values. |
kms_key_arn | string | 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. (pattern: <code>(arn:(aws[a-zA-Z-])?:[a-z0-9-.]+:.)|()</code>) |
last_modified | string | The date and time that the function was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD). (pattern: <code>.*</code>) |
last_update_status | string | The status of the last update that was performed on the function. This is first set to Successful after function creation completes. (Successful, Failed, InProgress) |
last_update_status_reason | string | The reason for the last update that was performed on the function. |
last_update_status_reason_code | string | The reason code for the last update that was performed on the function. (EniLimitExceeded, InsufficientRolePermissions, InvalidConfiguration, InternalError, SubnetOutOfIPAddresses, InvalidSubnet, InvalidSecurityGroup, ImageDeleted, ImageAccessDenied, InvalidImage, KMSKeyAccessDenied, KMSKeyNotFound, InvalidStateKMSKey, DisabledKMSKey, EFSIOError, EFSMountConnectivityError, EFSMountFailure, EFSMountTimeout, InvalidRuntime, InvalidZipFileException, FunctionError, ServiceQuotaExceededException, VcpuLimitExceeded, CapacityProviderScalingLimitExceeded, InsufficientCapacity, EC2RequestLimitExceeded, FunctionError.InitTimeout, FunctionError.RuntimeInitError, FunctionError.ExtensionInitError, FunctionError.InvalidEntryPoint, FunctionError.InvalidWorkingDirectory, FunctionError.PermissionDenied, FunctionError.TooManyExtensions, FunctionError.InitResourceExhausted, DisallowedByVpcEncryptionControl, DependencyError) |
layers | array | The function's layers. |
logging_config | object | The function's Amazon CloudWatch Logs configuration settings. |
master_arn | string | For Lambda@Edge functions, the ARN of the main function. (pattern: <code>arn:(aws[a-zA-Z-]*)?:lambda:(eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:\d{12}:function:[a-zA-Z0-9-]+(:($LATEST|[a-zA-Z0-9-]+))?</code>) |
memory_size | integer | The amount of memory available to the function at runtime. |
package_type | string | The type of deployment package. Set to Image for container image and set Zip for .zip file archive. (Zip, Image) |
revision_id | string | The latest updated revision of the function or alias. |
role | string | The function's execution role. (pattern: <code>arn:(aws[a-zA-Z-]*)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@-_/]+</code>) |
runtime | string | 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. (nodejs, nodejs4.3, nodejs6.10, nodejs8.10, nodejs10.x, nodejs12.x, nodejs14.x, nodejs16.x, nodejs18.x, nodejs20.x, nodejs22.x, nodejs24.x, java8, java8.al2, java11, java17, java21, java25, python2.7, python3.6, python3.7, python3.8, python3.9, python3.10, python3.11, python3.12, python3.13, python3.14, dotnetcore1.0, dotnetcore2.0, dotnetcore2.1, dotnetcore3.1, dotnet6, dotnet8, dotnet10, nodejs4.3-edge, go1.x, ruby2.5, ruby2.7, ruby3.2, ruby3.3, ruby3.4, ruby4.0, provided, provided.al2, provided.al2023, nodejs26.x, python3.15, java8.al2023, java11.al2023, java17.al2023) |
runtime_version_config | object | The ARN of the runtime and any errors that occured. |
signing_job_arn | string | The ARN of the signing job. (pattern: <code>arn:(aws[a-zA-Z0-9-]):([a-zA-Z0-9-])+:((eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1})?:(\d{12})?:(.)</code>) |
signing_profile_version_arn | string | The ARN of the signing profile version. (pattern: <code>arn:(aws[a-zA-Z0-9-]):([a-zA-Z0-9-])+:((eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1})?:(\d{12})?:(.)</code>) |
snap_start | object | Set ApplyOn to PublishedVersions to create a snapshot of the initialized execution environment when you publish a function version. For more information, see Improving startup performance with Lambda SnapStart. |
state | string | The current state of the function. When the state is Inactive, you can reactivate the function by invoking it. (Pending, Active, Inactive, Failed, Deactivating, Deactivated, ActiveNonInvocable, Deleting) |
state_reason | string | The reason for the function's current state. |
state_reason_code | string | The reason code for the function's current state. When the code is Creating, you can't invoke or modify the function. (Idle, Creating, Restoring, EniLimitExceeded, InsufficientRolePermissions, InvalidConfiguration, InternalError, SubnetOutOfIPAddresses, InvalidSubnet, InvalidSecurityGroup, ImageDeleted, ImageAccessDenied, InvalidImage, KMSKeyAccessDenied, KMSKeyNotFound, InvalidStateKMSKey, DisabledKMSKey, EFSIOError, EFSMountConnectivityError, EFSMountFailure, EFSMountTimeout, InvalidRuntime, InvalidZipFileException, FunctionError, ServiceQuotaExceededException, VcpuLimitExceeded, CapacityProviderScalingLimitExceeded, InsufficientCapacity, EC2RequestLimitExceeded, FunctionError.InitTimeout, FunctionError.RuntimeInitError, FunctionError.ExtensionInitError, FunctionError.InvalidEntryPoint, FunctionError.InvalidWorkingDirectory, FunctionError.PermissionDenied, FunctionError.TooManyExtensions, FunctionError.InitResourceExhausted, DisallowedByVpcEncryptionControl, DrainingDurableExecutions, DependencyError) |
tenancy_config | object | Specifies the tenant isolation mode configuration for a Lambda function. This allows you to configure specific tenant isolation strategies for your function invocations. Tenant isolation configuration cannot be modified after function creation. |
timeout | integer | The amount of time in seconds that Lambda allows a function to run before stopping it. |
tracing_config | object | The function's X-Ray tracing configuration. |
version | string | The version of the Lambda function. (pattern: <code>($LATEST|[0-9]+)</code>) |
vpc_config | object | The function's networking configuration. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_versions_by_function | select | function_name, region | Marker, MaxItems | Returns a list of versions, with the version-specific configuration of each. Lambda returns up to 50 versions per call. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
function_name | string | The name or ARN of the Lambda function. Name formats Function name - MyFunction. Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction. Partial ARN - 123456789012:function:MyFunction. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length. |
region | string | AWS region (default: us-east-1) |
Marker | string | Specify the pagination token that's returned by a previous request to retrieve the next page of results. |
MaxItems | integer | The maximum number of versions to return. Note that ListVersionsByFunction returns a maximum of 50 items in each response, even if you set the number higher. |
SELECT examples
- list_versions_by_function
Returns a list of versions, with the version-specific configuration of each. Lambda returns up to 50 versions per call.
SELECT
architectures,
capacity_provider_config,
code_sha_256,
code_size,
config_sha_256,
dead_letter_config,
description,
durable_config,
environment,
ephemeral_storage,
file_system_configs,
function_arn,
function_name,
handler,
image_config_response,
kms_key_arn,
last_modified,
last_update_status,
last_update_status_reason,
last_update_status_reason_code,
layers,
logging_config,
master_arn,
memory_size,
package_type,
revision_id,
role,
runtime,
runtime_version_config,
signing_job_arn,
signing_profile_version_arn,
snap_start,
state,
state_reason,
state_reason_code,
tenancy_config,
timeout,
tracing_config,
version,
vpc_config
FROM aws.lambda.versions_by_functions
WHERE function_name = '{{ function_name }}' -- required
AND region = '{{ region }}' -- required
AND Marker = '{{ Marker }}'
AND MaxItems = '{{ MaxItems }}'
;