使用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
EXPERTE
gefragt vor 2 Jahren32 Aufrufe
1 Antwort
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
EXPERTE
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen