Skip to content
v2.273.0

CfnVersionProps Struct ​

Properties for defining a CfnVersion.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lambda as lambda } from 'aws-cdk-lib';
const cfnVersionProps: lambda.CfnVersionProps = {
  functionName: 'functionName',

  // the properties below are optional
  codeSha256: 'codeSha256',
  description: 'description',
  functionScalingConfig: {
    maxExecutionEnvironments: 123,
    minExecutionEnvironments: 123,
  },
  provisionedConcurrencyConfig: {
    provisionedConcurrentExecutions: 123,
  },
  runtimePolicy: {
    updateRuntimeOn: 'updateRuntimeOn',

    // the properties below are optional
    runtimeVersionArn: 'runtimeVersionArn',
  },
};

Properties ​

codeSha256stringcode_sha256strcodeSha256StringCodeSha256stringCodeSha256*string#
Only publish a version if the hash value matches the value that's specified.

Use this option to avoid publishing a version if the function code has changed since you last updated it. Updates are not supported for this property.

descriptionstringdescriptionstrdescriptionStringDescriptionstringDescription*string#
A description for the version to override the description in the function configuration.

Updates are not supported for this property.

functionNamestring | IFunctionReffunction_nametyping.Union[str, IFunctionRef]functionNameStringFunctionNamestringFunctionNameinterface{}required#
The name or ARN of the Lambda function.
notes

Name formats - Function name - MyFunction .

  • Function ARN - arn:aws:lambda:us-west-2:123456789012:function:MyFunction .
  • Partial ARN - 123456789012:function:MyFunction .

The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.

functionScalingConfigIResolvable | CfnVersion.FunctionScalingConfigPropertyfunction_scaling_configtyping.Union[IResolvable, FunctionScalingConfigProperty]functionScalingConfigIResolvableFunctionScalingConfigIResolvableFunctionScalingConfiginterface{}#
Configuration that defines the scaling behavior for a Lambda Managed Instances function, including the minimum and maximum number of execution environments that can be provisioned.
provisionedConcurrencyConfigIResolvable | CfnVersion.ProvisionedConcurrencyConfigurationPropertyprovisioned_concurrency_configtyping.Union[IResolvable, ProvisionedConcurrencyConfigurationProperty]provisionedConcurrencyConfigIResolvableProvisionedConcurrencyConfigIResolvableProvisionedConcurrencyConfiginterface{}#
Specifies a provisioned concurrency configuration for a function's version.

Updates are not supported for this property.

runtimePolicyIResolvable | CfnVersion.RuntimePolicyPropertyruntime_policytyping.Union[IResolvable, RuntimePolicyProperty]runtimePolicyIResolvableRuntimePolicyIResolvableRuntimePolicyinterface{}#
Runtime Management Config of a function.

Used as props by ​