Skip to content

aws.greengrass.get_function_definition_version

Example SQL Queries

SELECT * FROM
aws.greengrass.get_function_definition_version
WHERE
"function_definition_id" = 'VALUE'
AND "function_definition_version_id" = 'VALUE';

Description

Retrieves information about a Lambda function definition version, including which Lambda functions are included in the version and their configurations.

Table Definition

Column NameColumn Data Type
function_definition_id Required Input Column

The ID of the Lambda function definition.

VARCHAR
function_definition_version_id Required Input Column

The ID of the function definition version. This value maps to the ''Version'' property of the corresponding ''VersionInformation'' object, which is returned by ''ListFunctionDefinitionVersions'' requests. If the version is the last one that was associated with a function definition, the value also maps to the ''LatestVersion'' property of the corresponding ''DefinitionInformation'' object.

VARCHAR
next_token Input Column

The token for the next set of results, or ''null'' if there are no additional results.

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
arn

The ARN of the function definition version.

VARCHAR
creation_timestamp

The time, in milliseconds since the epoch, when the function definition version was created.

VARCHAR
definition

Information on the definition.

STRUCT(
"default_config" STRUCT(
"execution" STRUCT(
"isolation_mode" VARCHAR,
"run_as" STRUCT(
"gid" BIGINT,
"uid" BIGINT
)
)
),
"functions" STRUCT(
"function_arn" VARCHAR,
"function_configuration" STRUCT(
"encoding_type" VARCHAR,
"environment" STRUCT(
"access_sysfs" BOOLEAN,
"execution" STRUCT(
"isolation_mode" VARCHAR,
"run_as" STRUCT(
"gid" BIGINT,
"uid" BIGINT
)
),
"resource_access_policies" STRUCT(
"permission" VARCHAR,
"resource_id" VARCHAR
)[],
"variables" MAP(VARCHAR, VARCHAR)
),
"exec_args" VARCHAR,
"executable" VARCHAR,
"memory_size" BIGINT,
"pinned" BOOLEAN,
"timeout" BIGINT,
"function_runtime_override" VARCHAR
),
"id" VARCHAR
)[]
)
Show child fields
definition.default_config

The default configuration that applies to all Lambda functions in this function definition version. Individual Lambda functions can override these settings.

Show child fields
definition.default_config.execution

Configuration information that specifies how a Lambda function runs.

Show child fields
definition.default_config.execution.isolation_mode

Specifies whether the Lambda function runs in a Greengrass container (default) or without containerization. Unless your scenario requires that you run without containerization, we recommend that you run in a Greengrass container. Omit this value to run the Lambda function with the default containerization for the group.

definition.default_config.execution.run_as

Specifies the user and group whose permissions are used when running the Lambda function. You can specify one or both values to override the default values. We recommend that you avoid running as root unless absolutely necessary to minimize the risk of unintended changes or malicious attacks. To run as root, you must set ''IsolationMode'' to ''NoContainer'' and update config.json in ''greengrass-root/config'' to set ''allowFunctionsToRunAsRoot'' to ''yes''.

Show child fields
definition.default_config.execution.run_as.gid

The group ID whose permissions are used to run a Lambda function.

definition.default_config.execution.run_as.uid

The user ID whose permissions are used to run a Lambda function.

definition.functions[]
Show child fields
definition.functions[].function_arn

The ARN of the Lambda function.

definition.functions[].function_configuration

The configuration of the Lambda function.

Show child fields
definition.functions[].function_configuration.encoding_type

The expected encoding type of the input payload for the function. The default is ''json''.

definition.functions[].function_configuration.environment

The environment configuration of the function.

Show child fields
definition.functions[].function_configuration.environment.access_sysfs

If true, the Lambda function is allowed to access the host's /sys folder. Use this when the Lambda function needs to read device information from /sys. This setting applies only when you run the Lambda function in a Greengrass container.

definition.functions[].function_configuration.environment.execution

Configuration related to executing the Lambda function

Show child fields
definition.functions[].function_configuration.environment.execution.isolation_mode

Specifies whether the Lambda function runs in a Greengrass container (default) or without containerization. Unless your scenario requires that you run without containerization, we recommend that you run in a Greengrass container. Omit this value to run the Lambda function with the default containerization for the group.

definition.functions[].function_configuration.environment.execution.run_as

Specifies the user and group whose permissions are used when running the Lambda function. You can specify one or both values to override the default values. We recommend that you avoid running as root unless absolutely necessary to minimize the risk of unintended changes or malicious attacks. To run as root, you must set ''IsolationMode'' to ''NoContainer'' and update config.json in ''greengrass-root/config'' to set ''allowFunctionsToRunAsRoot'' to ''yes''.

Show child fields
definition.functions[].function_configuration.environment.execution.run_as.gid

The group ID whose permissions are used to run a Lambda function.

definition.functions[].function_configuration.environment.execution.run_as.uid

The user ID whose permissions are used to run a Lambda function.

definition.functions[].function_configuration.environment.resource_access_policies[]
Show child fields
definition.functions[].function_configuration.environment.resource_access_policies[].permission

The permissions that the Lambda function has to the resource. Can be one of ''rw'' (read/write) or ''ro'' (read-only).

definition.functions[].function_configuration.environment.resource_access_policies[].resource_id

The ID of the resource. (This ID is assigned to the resource when you create the resource definiton.)

definition.functions[].function_configuration.environment.variables

Environment variables for the Lambda function's configuration.

definition.functions[].function_configuration.exec_args

The execution arguments.

definition.functions[].function_configuration.executable

The name of the function executable.

definition.functions[].function_configuration.function_runtime_override

The Lambda runtime supported by Greengrass which is to be used instead of the one specified in the Lambda function.

definition.functions[].function_configuration.memory_size

The memory size, in KB, which the function requires. This setting is not applicable and should be cleared when you run the Lambda function without containerization.

definition.functions[].function_configuration.pinned

True if the function is pinned. Pinned means the function is long-lived and starts when the core starts.

definition.functions[].function_configuration.timeout

The allowed function execution time, after which Lambda should terminate the function. This timeout still applies to pinned Lambda functions for each request.

definition.functions[].id

A descriptive or arbitrary ID for the function. This value must be unique within the function definition version. Max length is 128 characters with pattern ''[a-zA-Z0-9:_-]+''.

id

The ID of the function definition version.

VARCHAR
version

The version of the function definition version.

VARCHAR