# CfnAliasProps

Properties for defining a `CfnAlias`.

Used as props by: [CfnAlias](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.CfnAlias.html)

- Source: Generated at build time
- Type last changed: v2.239.0 · 19 Feb 2026

## Example

TypeScript:

```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 cfnAliasProps: lambda.CfnAliasProps = {
  functionName: 'functionName',
  functionVersion: 'functionVersion',
  name: 'name',

  // the properties below are optional
  description: 'description',
  provisionedConcurrencyConfig: {
    provisionedConcurrentExecutions: 123,
  },
  routingConfig: {
    additionalVersionWeights: [{
      functionVersion: 'functionVersion',
      functionWeight: 123,
    }],
  },
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_lambda as lambda_

cfn_alias_props = lambda.CfnAliasProps(
    function_name="functionName",
    function_version="functionVersion",
    name="name",

    # the properties below are optional
    description="description",
    provisioned_concurrency_config=lambda.CfnAlias.ProvisionedConcurrencyConfigurationProperty(
        provisioned_concurrent_executions=123
    ),
    routing_config=lambda.CfnAlias.AliasRoutingConfigurationProperty(
        additional_version_weights=[lambda.CfnAlias.VersionWeightProperty(
            function_version="functionVersion",
            function_weight=123
        )]
    )
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.lambda.*;

CfnAliasProps cfnAliasProps = CfnAliasProps.builder()
        .functionName("functionName")
        .functionVersion("functionVersion")
        .name("name")

        // the properties below are optional
        .description("description")
        .provisionedConcurrencyConfig(ProvisionedConcurrencyConfigurationProperty.builder()
                .provisionedConcurrentExecutions(123)
                .build())
        .routingConfig(AliasRoutingConfigurationProperty.builder()
                .additionalVersionWeights(List.of(VersionWeightProperty.builder()
                        .functionVersion("functionVersion")
                        .functionWeight(123)
                        .build()))
                .build())
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lambda;

var cfnAliasProps = new CfnAliasProps {
    FunctionName = "functionName",
    FunctionVersion = "functionVersion",
    Name = "name",

    // the properties below are optional
    Description = "description",
    ProvisionedConcurrencyConfig = new ProvisionedConcurrencyConfigurationProperty {
        ProvisionedConcurrentExecutions = 123
    },
    RoutingConfig = new AliasRoutingConfigurationProperty {
        AdditionalVersionWeights = new [] { new VersionWeightProperty {
            FunctionVersion = "functionVersion",
            FunctionWeight = 123
        } }
    }
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnAliasProps := &CfnAliasProps{
	FunctionName: jsii.String("functionName"),
	FunctionVersion: jsii.String("functionVersion"),
	Name: jsii.String("name"),

	// the properties below are optional
	Description: jsii.String("description"),
	ProvisionedConcurrencyConfig: &ProvisionedConcurrencyConfigurationProperty{
		ProvisionedConcurrentExecutions: jsii.Number(123),
	},
	RoutingConfig: &AliasRoutingConfigurationProperty{
		AdditionalVersionWeights: []interface{}{
			&VersionWeightProperty{
				FunctionVersion: jsii.String("functionVersion"),
				FunctionWeight: jsii.Number(123),
			},
		},
	},
}
```

## Properties

- `description`: string — A description of the alias.

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

- `functionVersion`: string (required) — The function version that the alias invokes.

- `name`: string (required) — The name of the alias.

- `provisionedConcurrencyConfig`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAlias.ProvisionedConcurrencyConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.CfnAlias.ProvisionedConcurrencyConfigurationProperty.html) — Specifies a [provisioned concurrency](https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html) configuration for a function's alias.

- `routingConfig`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnAlias.AliasRoutingConfigurationProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.CfnAlias.AliasRoutingConfigurationProperty.html) — The [routing configuration](https://docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html) of the alias.
