(aws-autoscaling): Lambda autoscaling example uses an alias to latestVersion, which doesn't work #19103
Labels
@aws-cdk/aws-autoscaling
Related to Amazon EC2 Auto Scaling
documentation
This is a problem with documentation.
effort/small
Small work item – less than a day of effort
good first issue
Related to contributions. See CONTRIBUTING.md
p2
link to reference doc page
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.AutoScalingOptions.html
Describe your issue?
When following the example in the docs to setup auto-scaling provisioned concurrency on a lambda function, the docs explicitly state in the example to first add an alias on the lambda function's
latestVersion
. I followed the example, setup an alias tolatestVersion
, added a basicscaleOnUtilization
target, and then deployed the stack. The deploy went through without errors.After deploy, I checked the lambda in the AWS Console and noticed there was no provisioned concurrency setup for it. I drilled down into the alias associated with the lambda that I created from the example and promptly saw:
Did I misunderstand something in the docs or is this a bad example? Looking at the docs for
Version
I see it's example uses theFunction
methodaddVersion
- and theaddVersion
method docs tell me is deprecated and points me to usefunction.currentVersion
. If this is not a misunderstanding on my part, can these be updated to whatever the current best practice for setting up basic provisioned concurrency auto-scaling on the most recently deployed lambda version is?The text was updated successfully, but these errors were encountered: