Skip to content

LambdaClient.update_function_configuration

rboto-lambda==0.4.0 · Service index · Types

Model summary (excerpt): Modifies the version-specific settings of a Lambda Event Function. When you update a function, Lambda provisions an instance of the function and its supporting resources. If your function connects to a VPC, this process can take a minute. During this time, you can't modify the function, but you can still invoke it. The LastUpdateStatus , LastUpdateStatusReason , and LastUpdateStatusReasonCode...

Install and imports

python -m pip install "rboto[lambda]==0.4.0"
from rboto import LambdaClient
from collections.abc import Sequence
from rboto_lambda.types import (
    AcceleratorConfig,
    CapacityProviderConfig,
    DeadLetterConfig,
    DurableConfig,
    Environment,
    EphemeralStorage,
    FileSystemConfig,
    FunctionRuntimeConfig,
    ImageConfig,
    LoggingConfig,
    Runtime,
    SnapStart,
    TracingConfig,
    UpdateFunctionConfigurationOutput,
    VpcConfig,
)

Signature

async def update_function_configuration(
    *,
    function_name: str,
    role: str | None = None,
    handler: str | None = None,
    description: str | None = None,
    timeout: int | None = None,
    memory_size: int | None = None,
    vpc_config: VpcConfig | None = None,
    environment: Environment | None = None,
    runtime: Runtime | None = None,
    dead_letter_config: DeadLetterConfig | None = None,
    kms_key_arn: str | None = None,
    tracing_config: TracingConfig | None = None,
    revision_id: str | None = None,
    layers: Sequence[str] | None = None,
    file_system_configs: Sequence[FileSystemConfig] | None = None,
    image_config: ImageConfig | None = None,
    ephemeral_storage: EphemeralStorage | None = None,
    snap_start: SnapStart | None = None,
    logging_config: LoggingConfig | None = None,
    capacity_provider_config: CapacityProviderConfig | None = None,
    durable_config: DurableConfig | None = None,
    runtime_config: FunctionRuntimeConfig | None = None,
    accelerator_config: AcceleratorConfig | None = None,
) -> UpdateFunctionConfigurationOutput: ...

Arguments without defaults are required. None omits an optional request argument. Static types do not validate resource existence, permissions, lengths, ranges, or conditional service requirements.

Arguments

Argument Required Model notes (excerpt)
function_name Yes The name or ARN of the Lambda function. Name formats Function name – my-function . Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function . Partial ARN – 123456789012:function:my-function . The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.
role No The Amazon Resource Name (ARN) of the function's execution role.
handler No The name of the method within your code that Lambda calls to run your function. Handler is required if the deployment package is a .zip file archive. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see Lambda programming model .
description No A description of the function.
timeout No The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds, and the maximum allowed value is 1,800 seconds. For functions using Lambda Managed Instances, asynchronous invocations and event source mapping invocations (except Amazon MQ and Amazon DocumentDB) support a maximum allowed value of 5,400 seconds (90 minutes). For more information,...
memory_size No The amount of memory available to the function at runtime. Increasing the function memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB.
vpc_config No For network connectivity to Amazon Web Services resources in a VPC, specify a list of security groups and subnets in the VPC. When you connect a function to a VPC, it can access resources and the internet only through that VPC. For more information, see Configuring a Lambda function to access resources in a VPC .
environment No Environment variables that are accessible from function code during execution.
runtime No 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...
dead_letter_config No A dead-letter queue configuration that specifies the queue or topic where Lambda sends asynchronous events when they fail processing. For more information, see Dead-letter queues .
kms_key_arn No 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...
tracing_config No Set Mode to Active to sample and trace a subset of incoming requests with X-Ray .
revision_id No Update the function only if the revision ID matches the ID that's specified. Use this option to avoid modifying a function that has changed since you last read it.
layers No A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.
file_system_configs No Connection settings for an Amazon EFS file system or an Amazon S3 Files file system.
image_config No Container image configuration values that override the values in the container image Docker file.
ephemeral_storage No 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 functions that use AcceleratorConfig , the maximum is 32,768 MB. For more information, see Configuring ephemeral storage (console) .
snap_start No The function's SnapStart setting.
logging_config No The function's Amazon CloudWatch Logs configuration settings.
capacity_provider_config No Configuration for the capacity provider that manages compute resources for Lambda functions.
durable_config No 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.
runtime_config No The customer-managed runtime configuration for your function. Specifies the customer-managed runtime and the runtime alias that your function uses.
accelerator_config No The accelerator resource settings for a Lambda execution environment.

Output

UpdateFunctionConfigurationOutput.

Read-only native attributes, accessed as response.field. Collection getters materialize Python values; to_dict() recursively materializes a mapping. Streams are consumed once.

Field Type Presence References
function_name str | None Always present —
function_arn str | None Always present —
runtime RuntimeOutput | None Always present RuntimeOutput
role str | None Always present —
handler str | None Always present —
code_size int Always present —
description str | None Always present —
timeout int | None Always present —
memory_size int | None Always present —
last_modified str | None Always present —
code_sha256 str | None Always present —
version str | None Always present —
vpc_config VpcConfigResponseOutput | None Always present VpcConfigResponseOutput
dead_letter_config DeadLetterConfigOutput | None Always present DeadLetterConfigOutput
environment EnvironmentResponseOutput | None Always present EnvironmentResponseOutput
kms_key_arn str | None Always present —
tracing_config TracingConfigResponseOutput | None Always present TracingConfigResponseOutput
master_arn str | None Always present —
revision_id str | None Always present —
layers list[LayerOutput] | None Always present LayerOutput
state StateOutput | None Always present StateOutput
state_reason str | None Always present —
state_reason_code StateReasonCodeOutput | None Always present StateReasonCodeOutput
last_update_status LastUpdateStatusOutput | None Always present LastUpdateStatusOutput
last_update_status_reason str | None Always present —
last_update_status_reason_code LastUpdateStatusReasonCodeOutput | None Always present LastUpdateStatusReasonCodeOutput
file_system_configs list[FileSystemConfigOutput] | None Always present FileSystemConfigOutput
signing_profile_version_arn str | None Always present —
signing_job_arn str | None Always present —
package_type PackageTypeOutput | None Always present PackageTypeOutput
image_config_response ImageConfigResponseOutput | None Always present ImageConfigResponseOutput
architectures list[ArchitectureOutput] | None Always present ArchitectureOutput
ephemeral_storage EphemeralStorageOutput | None Always present EphemeralStorageOutput
snap_start SnapStartResponseOutput | None Always present SnapStartResponseOutput
runtime_version_config RuntimeVersionConfigOutput | None Always present RuntimeVersionConfigOutput
logging_config LoggingConfigOutput | None Always present LoggingConfigOutput
tenancy_config TenancyConfigOutput | None Always present TenancyConfigOutput
capacity_provider_config CapacityProviderConfigOutput | None Always present CapacityProviderConfigOutput
config_sha256 str | None Always present —
durable_config DurableConfigOutput | None Always present DurableConfigOutput
runtime_config FunctionRuntimeConfigOutput | None Always present FunctionRuntimeConfigOutput
accelerator_config AcceleratorConfigOutput | None Always present AcceleratorConfigOutput

| None means a value can be absent. Output mappings include every declared key; optional input keys may be omitted. Unknown output enum/union variants are not automatically valid inputs.

AcceleratorConfig, CapacityProviderConfig, DeadLetterConfig, DurableConfig, Environment, EphemeralStorage, FileSystemConfig, FunctionRuntimeConfig, ImageConfig, LoggingConfig, Runtime, SnapStart, TracingConfig, UpdateFunctionConfigurationOutput, VpcConfig

Follow these links for nested inputs and outputs; recursive types link back to the same type page.

Pagination and streaming

No generated paginator for this operation.

No output stream.

Errors

Import from rboto_lambda.exceptions:

CodeSigningConfigNotFoundError, CodeVerificationFailedError, InvalidCodeSignatureError, InvalidParameterValueError, PreconditionFailedError, ResourceConflictError, ResourceNotFoundError, ServiceError, TooManyRequestsError.

Other service failures use the service base error; credential, transport and timeout failures use shared errors.

Service guide · Pinned model