AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the UpdateFunctionConfiguration operation. 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.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.Lambda.AmazonLambdaRequest
      Amazon.Lambda.Model.UpdateFunctionConfigurationRequest

Namespace: Amazon.Lambda.Model
Assembly: AWSSDK.Lambda.dll
Version: 3.x.y.z

Syntax

C#
public class UpdateFunctionConfigurationRequest : AmazonLambdaRequest
         IAmazonWebServiceRequest

The UpdateFunctionConfigurationRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property DeadLetterConfig Amazon.Lambda.Model.DeadLetterConfig

Gets and sets the property DeadLetterConfig.

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.

Public Property Description System.String

Gets and sets the property Description.

A description of the function.

Public Property Environment Amazon.Lambda.Model.Environment

Gets and sets the property Environment.

Environment variables that are accessible from function code during execution.

Public Property EphemeralStorage Amazon.Lambda.Model.EphemeralStorage

Gets and sets the property EphemeralStorage.

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

Public Property FileSystemConfigs System.Collections.Generic.List<Amazon.Lambda.Model.FileSystemConfig>

Gets and sets the property FileSystemConfigs.

Connection settings for an Amazon EFS file system.

Public Property FunctionName System.String

Gets and sets the property FunctionName.

The name or ARN 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.

Public Property Handler System.String

Gets and sets the property Handler.

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.

Public Property ImageConfig Amazon.Lambda.Model.ImageConfig

Gets and sets the property ImageConfig.

Container image configuration values that override the values in the container image Docker file.

Public Property IsFileSystemConfigsSet System.Boolean

This property is set to true if the property Amazon.Lambda.Model.UpdateFunctionConfigurationRequest.FileSystemConfigs is set; false otherwise. This property can be used to determine if the related property was returned by a service response or if the related property should be sent to the service during a service call.

Public Property IsLayersSet System.Boolean

This property is set to true if the property Amazon.Lambda.Model.UpdateFunctionConfigurationRequest.Layers is set; false otherwise. This property can be used to determine if the related property was returned by a service response or if the related property should be sent to the service during a service call.

Public Property KMSKeyArn System.String

Gets and sets the property KMSKeyArn.

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, Lambda also uses this key is to encrypt your function's snapshot. If you deploy your function using a container image, Lambda also uses this key to encrypt your function when it's deployed. Note that this is not the same key that's used to protect your container image in the Amazon Elastic Container Registry (Amazon ECR). If you don't provide a customer managed key, Lambda uses a default service key.

Public Property Layers System.Collections.Generic.List<System.String>

Gets and sets the property Layers.

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

Public Property LoggingConfig Amazon.Lambda.Model.LoggingConfig

Gets and sets the property LoggingConfig.

The function's Amazon CloudWatch Logs configuration settings.

Public Property MemorySize System.Int32

Gets and sets the property MemorySize.

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.

Public Property RevisionId System.String

Gets and sets the property RevisionId.

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.

Public Property Role System.String

Gets and sets the property Role.

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

Public Property Runtime Amazon.Lambda.Runtime

Gets and sets the property Runtime.

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.

Public Property SnapStart Amazon.Lambda.Model.SnapStart

Gets and sets the property SnapStart.

The function's SnapStart setting.

Public Property Timeout System.Int32

Gets and sets the property Timeout.

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.

Public Property TracingConfig Amazon.Lambda.Model.TracingConfig

Gets and sets the property TracingConfig.

Set Mode to Active to sample and trace a subset of incoming requests with X-Ray.

Public Property VpcConfig Amazon.Lambda.Model.VpcConfig

Gets and sets the property VpcConfig.

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.

Examples

The following example modifies the memory size to be 256 MB for the unpublished ($LATEST) version of a function named my-function.

To update a Lambda function's configuration


var response = client.UpdateFunctionConfiguration(new UpdateFunctionConfigurationRequest 
{
    FunctionName = "my-function",
    MemorySize = 256
});

string codeSha256 = response.CodeSha256;
long codeSize = response.CodeSize;
string description = response.Description;
string functionArn = response.FunctionArn;
string functionName = response.FunctionName;
string handler = response.Handler;
string lastModified = response.LastModified;
int memorySize = response.MemorySize;
string revisionId = response.RevisionId;
string role = response.Role;
string runtime = response.Runtime;
int timeout = response.Timeout;
TracingConfigResponse tracingConfig = response.TracingConfig;
string version = response.Version;

            

Version Information

.NET Core App:
Supported in: 3.1

.NET Standard:
Supported in: 2.0

.NET Framework:
Supported in: 4.5, 4.0, 3.5