Shantanu Pavgi • over 5 years ago
bot definition export-import
I was able to export Bot using script mentioned in instructions: https://gist.github.com/nhira/3036fdc49f51e838f1beea8dcb7c1fa3
I'm not able to import/create bot using this same exported json file. It fails with an error like:
# aws lex-models put-bot --name newgiftfinder --cli-input-json file://bot-export-node.json
Parameter validation failed:
Unknown parameter in input: "status", must be one of: name, description, intents, clarificationPrompt, abortStatement, idleSessionTTLInSeconds, voiceId, checksum, processBehavior, locale, childDirected
Unknown parameter in input: "createdDate", must be one of: name, description, intents, clarificationPrompt, abortStatement, idleSessionTTLInSeconds, voiceId, checksum, processBehavior, locale, childDirected
I was wondering if this is expected behavior or I'm missing something. Any help?
Comments are closed.
Atharva Chauthaiwale • over 5 years ago
I don't think generated bot.json is meant to be used directly in put-bot command. You need a different import utility which reads from this json and calls put-slot-type, put-intent, put-bot separately.
N Hira • over 5 years ago
Yep -- Atharva is right, Shantanu. The script was a quick way to share your bot definition with the judges. To use that output for an import, you would need to remove some attributes (e.g., dates and version).
Thank you both for trying it out and sharing your feedback!
Sergey Smolnikov • over 5 years ago
I created an importer on Java. It has some non-completed features (see in description), but it fully restores my bot with intends and slots (only it does not add Lambda to hooks, as I restored the bot on another account). Comments, improvements are appreciated: https://github.com/satr/amazon-lex-importer