PUT /2015-03-31/functions/{FunctionName}/configuration

Modify the version-specific settings of a Lambda 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 fields in the response from GetFunctionConfiguration indicate when the update is complete and the function is processing events with the new configuration. For more information, see Lambda function states.

These settings can vary between versions of a function and are locked when you publish a version. You can't modify the configuration of a published version, only the unpublished version.

To configure function concurrency, use PutFunctionConcurrency. To grant invoke permissions to an Amazon Web Services account or Amazon Web Service, use AddPermission.

Servers

Path parameters

Name Type Required Description
FunctionName String Yes

The name of the Lambda function.

Name formats

  • Function namemy-function.

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

  • Partial ARN123456789012: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.

Request headers

Name Type Required Description
X-Amz-Content-Sha256 String No
X-Amz-Credential String No
Content-Type String Yes The media type of the request body.

Default value: "application/json"

X-Amz-Date String No
X-Amz-Algorithm String No
X-Amz-SignedHeaders String No
X-Amz-Security-Token String No
X-Amz-Signature String No

Request body fields

Name Type Required Description
Environment Object No

A function's environment variable settings. You can use environment variables to adjust your function's behavior without updating code. An environment variable is a pair of strings that are stored in a function's version-specific configuration.

Runtime String No

The identifier of the function's runtime. Runtime is required if the deployment package is a .zip file archive.

The following list includes deprecated runtimes. For more information, see Runtime deprecation policy.

Possible values:

  • "nodejs4.3"
  • "dotnet6"
  • "dotnetcore2.0"
  • "dotnetcore3.1"
  • "java11"
  • "ruby2.7"
  • "ruby2.5"
  • "java8.al2"
  • "python3.9"
  • "go1.x"
  • "python3.7"
  • "provided"
  • "nodejs18.x"
  • "nodejs16.x"
  • "nodejs8.10"
  • "nodejs"
  • "nodejs12.x"
  • "dotnetcore1.0"
  • "nodejs14.x"
  • "nodejs4.3-edge"
  • "python3.10"
  • "nodejs10.x"
  • "java8"
  • "dotnetcore2.1"
  • "nodejs6.10"
  • "python3.8"
  • "provided.al2"
  • "python2.7"
  • "python3.6"
Layers[] Array No

A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.

KMSKeyArn String No

The ARN of the Key Management Service (KMS) customer managed key that's used to encrypt your function's environment variables. When Lambda SnapStart is activated, this key is also used to encrypt your function's snapshot. If you don't provide a customer managed key, Lambda uses a default service key.

DeadLetterConfig Object No

The dead-letter queue for failed asynchronous invocations.

DeadLetterConfig.TargetArn String No

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

FileSystemConfigs[] Array No

Connection settings for an Amazon EFS file system.

FileSystemConfigs[].Arn String Yes

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

FileSystemConfigs[].LocalMountPath String Yes

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

Role String No

The Amazon Resource Name (ARN) of the function's execution role.

Description String No

A description of the function.

VpcConfig Object No

The VPC security groups and subnets that are attached to a Lambda function. For more information, see Configuring a Lambda function to access resources in a VPC.

VpcConfig.SubnetIds[] Array No

A list of VPC subnet IDs.

VpcConfig.SecurityGroupIds[] Array No

A list of VPC security group IDs.

ImageConfig Object No

Configuration values that override the container image Dockerfile settings. For more information, see Container image settings.

ImageConfig.EntryPoint[] Array No

Specifies the entry point to their application, which is typically the location of the runtime executable.

ImageConfig.WorkingDirectory String No

Specifies the working directory.

ImageConfig.Command[] Array No

Specifies parameters that you want to pass in with ENTRYPOINT.

Timeout Integer No

The amount of time (in seconds) that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds. For more information, see Lambda execution environment.

EphemeralStorage Object No

The size of the function's /tmp directory in MB. The default value is 512, but it can be any whole number between 512 and 10,240 MB.

EphemeralStorage.Size Integer No

The size of the function's /tmp directory.

RevisionId String 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.

MemorySize Integer 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.

TracingConfig Object No

The function's X-Ray tracing configuration. To sample and record incoming requests, set Mode to Active.

TracingConfig.Mode String No

The tracing mode.

Possible values:

  • "PassThrough"
  • "Active"
SnapStart Object No

The function's Lambda SnapStart setting. Set ApplyOn to PublishedVersions to create a snapshot of the initialized execution environment when you publish a function version.

SnapStart is supported with the java11 runtime. For more information, see Improving startup performance with Lambda SnapStart.

SnapStart.ApplyOn String No

Set to PublishedVersions to create a snapshot of the initialized execution environment when you publish a function version.

Possible values:

  • "PublishedVersions"
  • "None"
Handler String 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.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.