CfnAliasProps

class aws_cdk.aws_lambda.CfnAliasProps(*, function_name, function_version, name, description=None, provisioned_concurrency_config=None, routing_config=None)

Bases: object

Properties for defining a CfnAlias.

Parameters
  • function_name (str) – The name 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.

  • function_version (str) – The function version that the alias invokes.

  • name (str) – The name of the alias.

  • description (Optional[str]) – A description of the alias.

  • provisioned_concurrency_config (Union[ProvisionedConcurrencyConfigurationProperty, Dict[str, Any], IResolvable, None]) – Specifies a provisioned concurrency configuration for a function’s alias.

  • routing_config (Union[IResolvable, AliasRoutingConfigurationProperty, Dict[str, Any], None]) – The routing configuration of the alias.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.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
        )]
    )
)

Attributes

description

A description of the alias.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-description

Return type

Optional[str]

function_name

The name 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.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-functionname

Return type

str

function_version

The function version that the alias invokes.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-functionversion

Return type

str

name

The name of the alias.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-name

Return type

str

provisioned_concurrency_config

//docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html>`_ configuration for a function’s alias.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-provisionedconcurrencyconfig

Type

Specifies a `provisioned concurrency <https

Return type

Union[ProvisionedConcurrencyConfigurationProperty, IResolvable, None]

routing_config

//docs.aws.amazon.com/lambda/latest/dg/lambda-traffic-shifting-using-aliases.html>`_ of the alias.

Link

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-alias.html#cfn-lambda-alias-routingconfig

Type

The `routing configuration <https

Return type

Union[IResolvable, AliasRoutingConfigurationProperty, None]