Skip to main content

versions_by_functions

Creates, updates, deletes, gets or lists a versions_by_functions resource.

Overview

Nameversions_by_functions
TypeResource
Idaws.lambda.versions_by_functions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
architecturesarrayThe 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_configobjectConfiguration for the capacity provider that manages compute resources for Lambda functions.
code_sha_256stringThe SHA256 hash of the function's deployment package.
code_sizeinteger (int64)The size of the function's deployment package, in bytes.
config_sha_256stringThe SHA256 hash of the function configuration.
dead_letter_configobjectThe dead-letter queue for failed asynchronous invocations.
descriptionstringThe function's description.
durable_configobjectConfiguration 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.
environmentobjectThe function's environment variables. Omitted from CloudTrail logs.
ephemeral_storageobjectThe 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_configsarrayConnection settings for an Amazon EFS file system or an Amazon S3 Files file system.
function_arnstringThe 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_namestringThe 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>)
handlerstringThe function that Lambda calls to begin running your function. (pattern: <code>[^\s]+</code>)
image_config_responseobjectThe function's image configuration values.
kms_key_arnstringThe 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_modifiedstringThe date and time that the function was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD). (pattern: <code>.*</code>)
last_update_statusstringThe 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_reasonstringThe reason for the last update that was performed on the function.
last_update_status_reason_codestringThe 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)
layersarrayThe function's layers.
logging_configobjectThe function's Amazon CloudWatch Logs configuration settings.
master_arnstringFor 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_sizeintegerThe amount of memory available to the function at runtime.
package_typestringThe type of deployment package. Set to Image for container image and set Zip for .zip file archive. (Zip, Image)
revision_idstringThe latest updated revision of the function or alias.
rolestringThe function's execution role. (pattern: <code>arn:(aws[a-zA-Z-]*)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@-_/]+</code>)
runtimestringThe 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_configobjectThe ARN of the runtime and any errors that occured.
signing_job_arnstringThe 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_arnstringThe 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_startobjectSet 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.
statestringThe 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_reasonstringThe reason for the function's current state.
state_reason_codestringThe 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_configobjectSpecifies 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.
timeoutintegerThe amount of time in seconds that Lambda allows a function to run before stopping it.
tracing_configobjectThe function's X-Ray tracing configuration.
versionstringThe version of the Lambda function. (pattern: <code>($LATEST|[0-9]+)</code>)
vpc_configobjectThe function's networking configuration.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_versions_by_functionselectfunction_name, regionMarker, MaxItemsReturns 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.

NameDatatypeDescription
function_namestringThe 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.
regionstringAWS region (default: us-east-1)
MarkerstringSpecify the pagination token that's returned by a previous request to retrieve the next page of results.
MaxItemsintegerThe 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

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 }}'
;