updateFunctionConfiguration (original) (raw)
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 Services service, use AddPermission.
Samples
fun main() {
//sampleStart
// The following example modifies the memory size to be 256 MB for the unpublished ($LATEST) version of
// a function named my function.
val resp = lambdaClient.updateFunctionConfiguration {
functionName = "my-function"
memorySize = 256
}
//sampleEnd
}