in custom-resources/lex-intent/index.js [113:133]
function getIntentAttrs (props, next) {
const latestVersion = '$LATEST'
const IntentParams = {
name: props.name,
version: latestVersion
}
console.log('Accessing current slot version with getIntent: %j', IntentParams)
LexModelBuildingService.getIntent(IntentParams, function (err, IntentData) {
if (err) {
console.error('Problem accessing data during read to Intent: %j', err)
return next(err.code + ': ' + err.message)
}
console.log('Got Intent information back: %j', IntentData)
const IntentReplyAttrs = {
checksum: IntentData.checksum,
version: latestVersion
}
console.log('Intent attributes: %j', IntentReplyAttrs)
next(null, IntentReplyAttrs)
})
}