Skip to content

create_alias

Operation

create_alias

create_alias(request: CreateAliasInput | CreateAliasInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateAliasInputDict]) -> CreateAliasOutput

Creates an alias for a Lambda Event Function version. Use aliases to provide clients with a function identifier that you can update to invoke a different version.

You can also map an alias to split invocation requests between two versions. Use the RoutingConfig parameter to specify a second version and the percentage of invocation requests that it receives.

Parameters:

Name Type Description Default
request CreateAliasInput | CreateAliasInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[CreateAliasInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CreateAliasOutput

An instance of CreateAliasOutput.

create_alias async

create_alias(request: CreateAliasInput | CreateAliasInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[CreateAliasInputDict]) -> CreateAliasOutput

Creates an alias for a Lambda Event Function version. Use aliases to provide clients with a function identifier that you can update to invoke a different version.

You can also map an alias to split invocation requests between two versions. Use the RoutingConfig parameter to specify a second version and the percentage of invocation requests that it receives.

Parameters:

Name Type Description Default
request CreateAliasInput | CreateAliasInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[CreateAliasInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
CreateAliasOutput

An instance of CreateAliasOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

CreateAliasInputDict

Bases: TypedDict

Dictionary form of CreateAliasInput.

Attributes

description instance-attribute
description: str | None

A description of the alias.

function_name instance-attribute
function_name: Required[str]

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.

function_version instance-attribute
function_version: Required[str]

The function version that the alias invokes.

name instance-attribute
name: Required[str]

The name of the alias.

routing_config instance-attribute

The routing configuration of the alias.

CreateAliasInput dataclass

Bases: _SerdeShape

Dataclass for CreateAliasInput structure.

Attributes

description class-attribute instance-attribute
description: str | None = ...

A description of the alias.

function_name class-attribute instance-attribute
function_name: str | None = ...

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.

function_version class-attribute instance-attribute
function_version: str | None = ...

The function version that the alias invokes.

name class-attribute instance-attribute
name: str | None = ...

The name of the alias.

routing_config class-attribute instance-attribute
routing_config: AliasRoutingConfiguration | None = ...

The routing configuration of the alias.

Output

CreateAliasOutput dataclass

Bases: _SerdeShape

Provides configuration information about a Lambda function alias.

Attributes

alias_arn class-attribute instance-attribute
alias_arn: str | None = ...

The Amazon Resource Name (ARN) of the alias.

description class-attribute instance-attribute
description: str | None = ...

A description of the alias.

function_version class-attribute instance-attribute
function_version: str | None = ...

The function version that the alias invokes.

name class-attribute instance-attribute
name: str | None = ...

The name of the alias.

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

revision_id class-attribute instance-attribute
revision_id: str | None = ...

A unique identifier that changes when you update the alias.

routing_config class-attribute instance-attribute
routing_config: AliasRoutingConfiguration | None = ...

The routing configuration of the alias.