How to assign a lambda function alias to LexV2

0

LexV2 allows you to assign a lambda for validation and fulfillment of intents. When selecting the lambda, the console says you can also select a "Lambda function version or alias". In the drop down, I am only able to see lambda versions, but not my lambda function alias. How can I assign a lambda alias to a LexV2 bot?

已提问 2 年前1070 查看次数
3 回答
1

Hey,

We've identified the issue and are working on a fix. We will post an update to this thread once the fix is rolled out. Thanks for bringing this to our attention.

Update (02/23) - We have deployed the fix, please let us know if it still doesn't work.

已回答 2 年前
0

Hi,

You can publish an alias through aws console as well.

  1. Go to your lambda function.
  2. You will find an alias header. ( Search for keyword alias ). click on the header.
  3. You will find a button Create alias. Click on it.
  4. Provide name, description and version number to which you are assigning an alias.
  5. Alias will be created successfully.

Then in the dropdown, it will show you the the lambda , alias.

To know more on lambda alias, refer LINK

Thank you.

AWS
已回答 2 年前
  • I already have a lambda alias, but only the lambda versions are showing in the dropdown. I literally cannot select the alias.

0

To use a lambda alias with my bot alias locale I needed to use the aws cdk with the aws lexv2-models update-bot-alias command. I was able to update the en_US local like so:

  "botAliasLocaleSettings": {
      "en_US": {
          "enabled": true,
          "codeHookSpecification": {
              "lambdaCodeHook": {
                  "lambdaARN": "arn:aws:lambda:<region>:<accountId>:function:<functionName>:<aliasName>",
                  "codeHookInterfaceVersion": "1.0"
              }
          }
      }
  },

Note, from the console the "Lambda function version or alias" section is blank but calling describe-bot-alias shows the proper configuration. This appears to be a console bug.

API Docs

CLI Docs

已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则