Skip to content

aws.lambda.get_function

Example SQL Queries

SELECT * FROM
aws.lambda.get_function
WHERE
"function_name" = 'VALUE';

Description

Returns information about the function or function version, with a link to download the deployment package that's valid for 10 minutes. If you specify a function version, only details that are specific to that version are returned.

Table Definition

Column NameColumn Data Type
function_name Required Input Column

The name or ARN of the Lambda function, version, or alias.

Name formats

  • Function namemy-function (name-only), my-function:v1 (with alias).

  • Function ARNarn:aws:lambda:us-west-2:123456789012:function:my-function.

  • Partial ARN123456789012:function:my-function.

You can append a version number or alias to any of the formats. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.

VARCHAR
qualifier Input Column

Specify a version or alias to get details about a published version of the function.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
code

The deployment package of the function or version.

STRUCT(
"repository_type" VARCHAR,
"location" VARCHAR,
"image_uri" VARCHAR,
"resolved_image_uri" VARCHAR
)
Show child fields
code.image_uri

URI of a container image in the Amazon ECR registry.

code.location

A presigned URL that you can use to download the deployment package.

code.repository_type

The service that's hosting the file.

code.resolved_image_uri

The resolved URI for the image.

concurrency

The function's reserved concurrency.

STRUCT(
"reserved_concurrent_executions" BIGINT
)
Show child fields
concurrency.reserved_concurrent_executions

The number of concurrent executions that are reserved for this function. For more information, see Managing Lambda reserved concurrency.

configuration

The configuration of the function or version.

STRUCT(
"function_name" VARCHAR,
"function_arn" VARCHAR,
"runtime" VARCHAR,
"role" VARCHAR,
"handler" VARCHAR,
"code_size" BIGINT,
"description" VARCHAR,
"timeout" BIGINT,
"memory_size" BIGINT,
"last_modified" VARCHAR,
"code_sha256" VARCHAR,
"version" VARCHAR,
"vpc_config" STRUCT(
"subnet_ids" VARCHAR[],
"security_group_ids" VARCHAR[],
"vpc_id" VARCHAR,
"ipv6_allowed_for_dual_stack" BOOLEAN
),
"dead_letter_config" STRUCT(
"target_arn" VARCHAR
),
"environment" STRUCT(
"variables" MAP(VARCHAR, VARCHAR),
"error" STRUCT(
"error_code" VARCHAR,
"message" VARCHAR
)
),
"kms_key_arn" VARCHAR,
"tracing_config" STRUCT(
"mode" VARCHAR
),
"master_arn" VARCHAR,
"revision_id" VARCHAR,
"layers" STRUCT(
"arn" VARCHAR,
"code_size" BIGINT,
"signing_profile_version_arn" VARCHAR,
"signing_job_arn" VARCHAR
)[],
"state" VARCHAR,
"state_reason" VARCHAR,
"state_reason_code" VARCHAR,
"last_update_status" VARCHAR,
"last_update_status_reason" VARCHAR,
"last_update_status_reason_code" VARCHAR,
"file_system_configs" STRUCT(
"arn" VARCHAR,
"local_mount_path" VARCHAR
)[],
"package_type" VARCHAR,
"image_config_response" STRUCT(
"image_config" STRUCT(
"entry_point" VARCHAR[],
"command" VARCHAR[],
"working_directory" VARCHAR
),
"error" STRUCT(
"error_code" VARCHAR,
"message" VARCHAR
)
),
"signing_profile_version_arn" VARCHAR,
"signing_job_arn" VARCHAR,
"architectures" VARCHAR[],
"ephemeral_storage" STRUCT(
"size" BIGINT
),
"snap_start" STRUCT(
"apply_on" VARCHAR,
"optimization_status" VARCHAR
),
"runtime_version_config" STRUCT(
"runtime_version_arn" VARCHAR,
"error" STRUCT(
"error_code" VARCHAR,
"message" VARCHAR
)
),
"logging_config" STRUCT(
"log_format" VARCHAR,
"application_log_level" VARCHAR,
"system_log_level" VARCHAR,
"log_group" VARCHAR
)
)
Show child fields
configuration.architectures[]
configuration.code_sha256

The SHA256 hash of the function's deployment package.

configuration.code_size

The size of the function's deployment package, in bytes.

configuration.dead_letter_config

The function's dead letter queue.

Show child fields
configuration.dead_letter_config.target_arn

The Amazon Resource Name (ARN) of an Amazon SQS queue or Amazon SNS topic.

configuration.description

The function's description.

configuration.environment

The function's environment variables. Omitted from CloudTrail logs.

Show child fields
configuration.environment.error

Error messages for environment variables that couldn't be applied.

Show child fields
configuration.environment.error.error_code

The error code.

configuration.environment.error.message

The error message.

configuration.environment.variables

Environment variable key-value pairs. Omitted from CloudTrail logs.

configuration.ephemeral_storage

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

Show child fields
configuration.ephemeral_storage.size

The size of the function's /tmp directory.

configuration.file_system_configs[]
Show child fields
configuration.file_system_configs[].arn

The Amazon Resource Name (ARN) of the Amazon EFS access point that provides access to the file system.

configuration.file_system_configs[].local_mount_path

The path where the function can access the file system, starting with /mnt/.

configuration.function_arn

The function's Amazon Resource Name (ARN).

configuration.function_name

The name of the function.

configuration.handler

The function that Lambda calls to begin running your function.

configuration.image_config_response

The function's image configuration values.

Show child fields
configuration.image_config_response.error

Error response to GetFunctionConfiguration.

Show child fields
configuration.image_config_response.error.error_code

Error code.

configuration.image_config_response.error.message

Error message.

configuration.image_config_response.image_config

Configuration values that override the container image Dockerfile.

Show child fields
configuration.image_config_response.image_config.command[]
configuration.image_config_response.image_config.entry_point[]
configuration.image_config_response.image_config.working_directory

Specifies the working directory.

configuration.kms_key_arn

The KMS key that's used to encrypt the function's environment variables. When Lambda SnapStart is activated, this key is also used to encrypt the function's snapshot. This key is returned only if you've configured a customer managed key.

configuration.last_modified

The date and time that the function was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD).

configuration.last_update_status

The status of the last update that was performed on the function. This is first set to Successful after function creation completes.

configuration.last_update_status_reason

The reason for the last update that was performed on the function.

configuration.last_update_status_reason_code

The reason code for the last update that was performed on the function.

configuration.layers[]
Show child fields
configuration.layers[].arn

The Amazon Resource Name (ARN) of the function layer.

configuration.layers[].code_size

The size of the layer archive in bytes.

configuration.layers[].signing_job_arn

The Amazon Resource Name (ARN) of a signing job.

configuration.layers[].signing_profile_version_arn

The Amazon Resource Name (ARN) for a signing profile version.

configuration.logging_config

The function's Amazon CloudWatch Logs configuration settings.

Show child fields
configuration.logging_config.application_log_level

Set this property to filter the application logs for your function that Lambda sends to CloudWatch. Lambda only sends application logs at the selected level of detail and lower, where TRACE is the highest level and FATAL is the lowest.

configuration.logging_config.log_format

The format in which Lambda sends your function's application and system logs to CloudWatch. Select between plain text and structured JSON.

configuration.logging_config.log_group

The name of the Amazon CloudWatch log group the function sends logs to. By default, Lambda functions send logs to a default log group named /aws/lambda/<function name>. To use a different log group, enter an existing log group or enter a new log group name.

configuration.logging_config.system_log_level

Set this property to filter the system logs for your function that Lambda sends to CloudWatch. Lambda only sends system logs at the selected level of detail and lower, where DEBUG is the highest level and WARN is the lowest.

configuration.master_arn

For Lambda@Edge functions, the ARN of the main function.

configuration.memory_size

The amount of memory available to the function at runtime.

configuration.package_type

The type of deployment package. Set to Image for container image and set Zip for .zip file archive.

configuration.revision_id

The latest updated revision of the function or alias.

configuration.role

The function's execution role.

configuration.runtime

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

The ARN of the runtime and any errors that occured.

Show child fields
configuration.runtime_version_config.error

Error response when Lambda is unable to retrieve the runtime version for a function.

Show child fields
configuration.runtime_version_config.error.error_code

The error code.

configuration.runtime_version_config.error.message

The error message.

configuration.runtime_version_config.runtime_version_arn

The ARN of the runtime version you want the function to use.

configuration.signing_job_arn

The ARN of the signing job.

configuration.signing_profile_version_arn

The ARN of the signing profile version.

configuration.snap_start

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.

Show child fields
configuration.snap_start.apply_on

When set to PublishedVersions, Lambda creates a snapshot of the execution environment when you publish a function version.

configuration.snap_start.optimization_status

When you provide a qualified Amazon Resource Name (ARN), this response element indicates whether SnapStart is activated for the specified function version.

configuration.state

The current state of the function. When the state is Inactive, you can reactivate the function by invoking it.

configuration.state_reason

The reason for the function's current state.

configuration.state_reason_code

The reason code for the function's current state. When the code is Creating, you can't invoke or modify the function.

configuration.timeout

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

configuration.tracing_config

The function's X-Ray tracing configuration.

Show child fields
configuration.tracing_config.mode

The tracing mode.

configuration.version

The version of the Lambda function.

configuration.vpc_config

The function's networking configuration.

Show child fields
configuration.vpc_config.ipv6_allowed_for_dual_stack

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

configuration.vpc_config.security_group_ids[]
configuration.vpc_config.subnet_ids[]
configuration.vpc_config.vpc_id

The ID of the VPC.

tags

The function's tags.

MAP(VARCHAR, VARCHAR)