•   over 1 year 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?

Thanks,
Shantanu

  • 3 comments

  •   •   over 1 year 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.

  •   •   over 1 year 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!

  •   •   over 1 year 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

Comments are closed.