# CfnVersionProps

Properties for defining a `CfnVersion`.

Extends: CfnVersionProps
Used as props by: CfnVersion

- Source: Generated code
- Type last changed: v2.231.0 · 1 Dec 2025

## 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

- `codeSha256`: 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.

- `description`: string — A description for the version to override the description in the function configuration.

  Updates are not supported for this property.

- `functionName`: string | [IFunctionRef](/cdk/api/v2/docs/aws-cdk-lib.interfaces.aws_lambda.IFunctionRef.html) (required) — The name or ARN of the Lambda function.

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

- `functionScalingConfig`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnVersion.FunctionScalingConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.CfnVersion.FunctionScalingConfigProperty.html) — 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.

- `provisionedConcurrencyConfig`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnVersion.ProvisionedConcurrencyConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.CfnVersion.ProvisionedConcurrencyConfigurationProperty.html) — Specifies a provisioned concurrency configuration for a function's version.

  Updates are not supported for this property.

- `runtimePolicy`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnVersion.RuntimePolicyProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.CfnVersion.RuntimePolicyProperty.html) — Runtime Management Config of a function.
