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?

feita há 2 anos1070 visualizações
3 Respostas
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.

respondido há 2 anos
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
respondido há 2 anos
  • 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

respondido há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas