Lambda

class lambda.function

Example:

resources = storage_connector.read_resources(
    service="lambda",
    resource_type="function")
for resource in resources:
    resource.load()
    print(resource.urn)
    print(resource.code_sha256)
    print(resource.code_size)
    print(resource.dead_letter_config)
    print(resource.description)
    print(resource.environment)
    print(resource.file_system_configs)
    print(resource.function_arn)
    print(resource.handler)
    print(resource.image_config_response)
    print(resource.kms_key_arn)
    print(resource.last_modified)
    print(resource.last_update_status)
    print(resource.last_update_status_reason)
    print(resource.last_update_status_reason_code)
    print(resource.layers)
    print(resource.master_arn)
    print(resource.memory_size)
    print(resource.package_type)
    print(resource.revision_id)
    print(resource.role)
    print(resource.runtime)
    print(resource.signing_job_arn)
    print(resource.signing_profile_version_arn)
    print(resource.state)
    print(resource.state_reason)
    print(resource.state_reason_code)
    print(resource.timeout)
    print(resource.tracing_config)
    print(resource.version)
    print(resource.vpc_config)
code_sha256

The SHA256 hash of the function’s deployment package.

code_size

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

dead_letter_config

The function’s dead letter queue.

description

The function’s description.

environment

The function’s environment variables.

file_system_configs

Connection settings for an Amazon EFS file system.

function_arn

The function’s Amazon Resource Name (ARN).

handler

The function that Lambda calls to begin executing your function.

image_config_response

The function’s image configuration values.

kms_key_arn

The KMS key that’s used to encrypt the function’s environment variables. This key is only returned if you’ve configured a customer managed CMK.

last_modified

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

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.

last_update_status_reason

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

last_update_status_reason_code

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

layers

The function’s layers .

master_arn

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

memory_size

The amount of memory available to the function at runtime.

package_type

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

revision_id

The latest updated revision of the function or alias.

role

The function’s execution role.

runtime

The runtime environment for the Lambda function.

signing_job_arn

The ARN of the signing job.

signing_profile_version_arn

The ARN of the signing profile version.

state

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

state_reason

The reason for the function’s current state.

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.

timeout

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

tracing_config

The function’s AWS X-Ray tracing configuration.

version

The version of the Lambda function.

vpc_config

The function’s networking configuration.

class lambda.layer

Example:

resources = storage_connector.read_resources(
    service="lambda",
    resource_type="layer")
for resource in resources:
    resource.load()
    print(resource.urn)
    print(resource.latest_matching_version)
    print(resource.layer_arn)
latest_matching_version

The newest version of the layer.

layer_arn

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

class lambda.layer.layer_version

A subresource of lambda.layer.

Example:

resources = storage_connector.read_resources(
    service="lambda",
    resource_type="layer_version")
for resource in resources:
    resource.load()
    print(resource.urn)
    print(resource.compatible_runtimes)
    print(resource.created_date)
    print(resource.description)
    print(resource.layer_version_arn)
    print(resource.license_info)
compatible_runtimes

The layer’s compatible runtimes.

created_date

The date that the version was created, in ISO 8601 format. For example, 2018-11-27T15:10:45.123+0000 .

description

The description of the version.

layer_version_arn

The ARN of the layer version.

license_info

The layer’s open-source license.