Reputation: 1164
Does anybody have experience with the AWS LEX V2 updateBotAlias call in the AWS JavaScript SDK? How do you specify the lambda interface version (codeHookInterfaceVersion)? The lambda clearly has a version 1. It keeps saying:
ValidationException: The specified Lambda function interface version isn't valid. Specify a different interface version and try your request again.
By the way how do you specify the $LATEST?
This is my request:
{
"botAliasId": "TSTALIASID",
"botAliasName": "TestBotAlias",
"botId": "3UR9######",
"botAliasLocaleSettings": {
"en_US": {
"enabled": true,
"codeHookSpecification": {
"lambdaCodeHook": {
"lambdaARN": "arn:aws:lambda:us-east-1:##########93:function:fulfill-lambda",
"codeHookInterfaceVersion": "1"
}
}
}
},
"description": "en_US (Alias)"
}
Upvotes: 2
Views: 895
Reputation: 7274
For me I'm sending:
codeHookSpecification: {
lambdaCodeHook: {
codeHookInterfaceVersion: '1.0',
lambdaARN: botFunctionArn
}
}
The ARN format ending in :function: is $LATEST. If you want to connect your code hook to a specific version of the lambda function you would use an ARN ending in :function::
Upvotes: 4