aws lambda update-function-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 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 account or AWS service, use AddPermission
Options
Name | Description |
---|---|
--function-name <string> | The name 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 <string> | The Amazon Resource Name (ARN) of the function's execution role |
--handler <string> | The name of the method within your code that Lambda calls to execute your function. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see Programming Model |
--description <string> | A description of the function |
--timeout <integer> | The amount of time that Lambda allows a function to run before stopping it. The default is 3 seconds. The maximum allowed value is 900 seconds |
--memory-size <integer> | The amount of memory available to the function at runtime. Increasing the function's memory also increases its CPU allocation. The default value is 128 MB. The value can be any multiple of 1 MB |
--vpc-config <structure> | For network connectivity to AWS 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 only access resources and the internet through that VPC. For more information, see VPC Settings |
--environment <structure> | Environment variables that are accessible from function code during execution |
--runtime <string> | The identifier of the function's runtime |
--dead-letter-config <structure> | 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 <string> | The ARN of the AWS Key Management Service (AWS KMS) key that's used to encrypt your function's environment variables. If it's not provided, AWS Lambda uses a default service key |
--tracing-config <structure> | Set Mode to Active to sample and trace a subset of incoming requests with AWS X-Ray |
--revision-id <string> | Only update the function 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 <list> | 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 <list...> | Connection settings for an Amazon EFS file system |
--image-config <structure> | Container image configuration values that override the values in the container image Dockerfile |
--cli-input-json <string> | Performs service operation based on the JSON string provided. The JSON string follows the format provided by ``--generate-cli-skeleton``. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally |
--generate-cli-skeleton <string> | Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value ``input``, prints a sample input JSON that can be used as an argument for ``--cli-input-json``. If provided with the value ``output``, it validates the command inputs and returns a sample output JSON for that command |