Learn R Programming

paws.compute (version 0.1.12)

lambda_update_alias: Updates the configuration of a Lambda function alias

Description

Updates the configuration of a Lambda function alias.

Usage

lambda_update_alias(FunctionName, Name, FunctionVersion, Description,
  RoutingConfig, RevisionId)

Value

A list with the following syntax:

list(
  AliasArn = "string",
  Name = "string",
  FunctionVersion = "string",
  Description = "string",
  RoutingConfig = list(
    AdditionalVersionWeights = list(
      123.0
    )
  ),
  RevisionId = "string"
)

Arguments

FunctionName

[required] 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.

Name

[required] The name of the alias.

FunctionVersion

The function version that the alias invokes.

Description

A description of the alias.

RoutingConfig

The routing configuration of the alias.

RevisionId

Only update the alias if the revision ID matches the ID that's specified. Use this option to avoid modifying an alias that has changed since you last read it.

Request syntax

svc$update_alias(
  FunctionName = "string",
  Name = "string",
  FunctionVersion = "string",
  Description = "string",
  RoutingConfig = list(
    AdditionalVersionWeights = list(
      123.0
    )
  ),
  RevisionId = "string"
)

Examples

Run this code
if (FALSE) {
# The following example updates the alias named BLUE to send 30% of
# traffic to version 2 and 70% to version 1.
svc$update_alias(
  FunctionName = "my-function",
  FunctionVersion = "2",
  Name = "BLUE",
  RoutingConfig = list(
    AdditionalVersionWeights = list(
      `1` = 0.7
    )
  )
)
}

Run the code above in your browser using DataLab