Skip to content
v2.274.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 ​

codeSha256optionalstringcode_sha256optionalstrcodeSha256optionalStringCodeSha256optionalstringCodeSha256optional*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.

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*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.

functionScalingConfigoptionalIResolvable | CfnVersion.FunctionScalingConfigPropertyfunction_scaling_configoptionaltyping.Union[IResolvable, FunctionScalingConfigProperty]functionScalingConfigoptionalIResolvableFunctionScalingConfigoptionalIResolvableFunctionScalingConfigoptionalinterface{}#
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.
provisionedConcurrencyConfigoptionalIResolvable | CfnVersion.ProvisionedConcurrencyConfigurationPropertyprovisioned_concurrency_configoptionaltyping.Union[IResolvable, ProvisionedConcurrencyConfigurationProperty]provisionedConcurrencyConfigoptionalIResolvableProvisionedConcurrencyConfigoptionalIResolvableProvisionedConcurrencyConfigoptionalinterface{}#
Specifies a provisioned concurrency configuration for a function's version.

Updates are not supported for this property.

runtimePolicyoptionalIResolvable | CfnVersion.RuntimePolicyPropertyruntime_policyoptionaltyping.Union[IResolvable, RuntimePolicyProperty]runtimePolicyoptionalIResolvableRuntimePolicyoptionalIResolvableRuntimePolicyoptionalinterface{}#
Runtime Management Config of a function.