Movatterモバイル変換


[0]ホーム

URL:


Create an alias for a Lambda function - AWS Lambda
DocumentationAWS LambdaDeveloper Guide

Create an alias for a Lambda function

You can create aliases for your Lambda function. A Lambda alias is a pointer to a function version that you can update. The function's users can access the function version using the alias Amazon Resource Name (ARN). When you deploy a new version, you can update the alias to use the new version, or split traffic between two versions.

Console
To create an alias using the console
  1. Open theFunctions page of the Lambda console.

  2. Choose a function.

  3. ChooseAliases and then chooseCreate alias.

  4. On theCreate alias page, do the following:

    1. Enter aName for the alias.

    2. (Optional) Enter aDescription for the alias.

    3. ForVersion, choose a function version that you want the alias to point to.

    4. (Optional) To configure routing on the alias, expandWeighted alias. For more information, seeImplement Lambda canary deployments using a weighted alias.

    5. ChooseSave.

AWS CLI

To create an alias using the AWS Command Line Interface (AWS CLI), use thecreate-alias command.

aws lambda create-alias \ --function-namemy-function \ --namealias-name \ --function-versionversion-number \ --description " "

To change an alias to point a new version of the function, use theupdate-alias command.

aws lambda update-alias \ --function-namemy-function \ --namealias-name \ --function-versionversion-number

To delete an alias, use thedelete-alias command.

aws lambda delete-alias \ --function-namemy-function \ --namealias-name

The AWS CLI commands in the preceding steps correspond to the following Lambda API operations:

File system
Using aliases

[8]
ページ先頭

©2009-2025 Movatter.jp