AWS::Lambda::VersionThe `AWS::Lambda::Version` resource creates a [version](https://docs.aws.amazon.com/lambda/latest/dg/versioning-aliases.html) from the current code and configuration of a function. Use versions to create a snapshot of your function code and configuration that doesn't change.
import { CfnVersion } from 'aws-cdk-lib/aws-lambda';Or use the module namespace:
import * as lambda from 'aws-cdk-lib/aws-lambda';
// lambda.CfnVersionConfiguration passed to the constructor as CfnVersionProps.
functionNameRequiredstring | IFunctionRefThe 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.
codeSha256OptionalstringOnly 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.
descriptionOptionalstringA description for the version to override the description in the function configuration. Updates are not supported for this property.
functionScalingConfigOptionalIResolvable | FunctionScalingConfigPropertyConfiguration 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 | ProvisionedConcurrencyConfigurationPropertySpecifies a provisioned concurrency configuration for a function's version. Updates are not supported for this property.
runtimePolicyOptionalIResolvable | RuntimePolicyPropertyRuntime Management Config of a function.
This L1 construct maps directly to the following CloudFormation resource type.
Everything you need to know about AWS Lambda on one page. HD quality, print-friendly.
Download Free Infographicaws-lambdaAWS::Lambda::Version