使用Cloudformation创建带有Lambdahook的AWS::Lex::BotAlias不管用。

0

【以下的问题经过翻译处理】 我在使用下面的Cloudformation脚本创建别名并分配lambda代码钩子,但是它会出现以下错误。 请大家提供一下有效的示例为我提供帮助。 注意:Lex机器人的创建和版本创建是正常工作的。

Properties validation failed for resource VOCBotAliasWithCFN with message: #/BotAliasLocaleSettings/0: required key [Key] not found #/BotAliasLocaleSettings/0: required key [Value] not found 
VOCBotAliasWithCFN:
    DependsOn: VOCBotVersionWithCFN
    Type: AWS::Lex::BotAlias
    Properties:
      BotId: !Ref VOCBot
      BotAliasName: prod
      BotVersion: !GetAtt VOCBotVersionWithCFN.BotVersion
      SentimentAnalysisSettings:
        DetectSentiment: false 
      BotAliasLocaleSettings: 
        - BotAliasLocaleSetting:
            Enabled: true
            CodeHookSpecification:
              LambdaCodeHook:
                CodeHookInterfaceVersion: 1
                LambdaArn: <LambdaArn>
          LocaleId: en_US

profile picture
专家
已提问 2 年前26 查看次数
1 回答
0

【以下的回答经过翻译处理】 我收到了AWS支持团队的更新,这个问题现在已经被修复了。我已经在us-east-1区域测试了它,现在它对我来说可以运行。这里有一个工作示例

---------
VOCBotAliasWithCFN:
  DependsOn:VOCBotVersionWithCFN
  Type:AWS :: Lex :: BotAlias
  Properties:
    …
    …
    BotAliasLocaleSettings:
        - BotAliasLocaleSetting:
            Enabled:true
            CodeHookSpecification:
              LambdaCodeHook:
                CodeHookInterfaceVersion:1.0
                LambdaArn:arn:aws:lambda:us-east-1:<Account_Id>:function:Lexfunction
          LocaleId:en_US
---------

profile picture
专家
已回答 2 年前

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

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

回答问题的准则