Instantly share code, notes, and snippets.

Embed
What would you like to do?
exportlexbot - script to use AWS SDK & Lex ModelBuildingService API to export the definition for an Amazon Lex bot
Superseded by:
https://github.com/awslabs/amazon-lex-bot-export
@parisbutterfield

This comment has been minimized.

Show comment
Hide comment
@parisbutterfield

parisbutterfield Jul 15, 2017

I think the comments section should include details on the IAM policy needed to run this. I attached "AmazonLexFullAccess" to the user running this. Otherwise I was getting an error like:

[user] is not authorized to perform: lex:GetSlotType on resource: ... code: 'AccessDeniedException',

Hope this helps someone.

parisbutterfield commented Jul 15, 2017

I think the comments section should include details on the IAM policy needed to run this. I attached "AmazonLexFullAccess" to the user running this. Otherwise I was getting an error like:

[user] is not authorized to perform: lex:GetSlotType on resource: ... code: 'AccessDeniedException',

Hope this helps someone.

@nhira

This comment has been minimized.

Show comment
Hide comment
@nhira

nhira Jul 15, 2017

Updated - thanks, @parisbutterfield!

Owner

nhira commented Jul 15, 2017

Updated - thanks, @parisbutterfield!

@adi658

This comment has been minimized.

Show comment
Hide comment
@adi658

adi658 Jul 18, 2017

Hi.. I am getting this error when I run this
SyntaxError: Unexpected token >
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3

node --harmony exportlexbot.js AWS_Services "$LATEST" | jq '.' > bot.json


tried with node exportlexbot.js AWS_Services "$LATEST" | jq '.' > bot.json
but then i get
let AWS = require('aws-sdk');
^^^
SyntaxError: Unexpected strict mode reserved word
(I am using the strict)

adi658 commented Jul 18, 2017

Hi.. I am getting this error when I run this
SyntaxError: Unexpected token >
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3

node --harmony exportlexbot.js AWS_Services "$LATEST" | jq '.' > bot.json


tried with node exportlexbot.js AWS_Services "$LATEST" | jq '.' > bot.json
but then i get
let AWS = require('aws-sdk');
^^^
SyntaxError: Unexpected strict mode reserved word
(I am using the strict)

@triducnghiem

This comment has been minimized.

Show comment
Hide comment
@triducnghiem

triducnghiem Jul 18, 2017

Hi, I am getting this error:

(function (exports, require, module, __filename, __dirname) { Superseded by:
                                                                         ^^

SyntaxError: Unexpected identifier
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3

I ran with this cmd:
node exportlexbot.js AWS_Services "$LATEST" | jq "." > bot.json

triducnghiem commented Jul 18, 2017

Hi, I am getting this error:

(function (exports, require, module, __filename, __dirname) { Superseded by:
                                                                         ^^

SyntaxError: Unexpected identifier
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3

I ran with this cmd:
node exportlexbot.js AWS_Services "$LATEST" | jq "." > bot.json

@phwankhede

This comment has been minimized.

Show comment
Hide comment
@phwankhede

phwankhede Jul 18, 2017

node exportlexbot.js Adam "$LATEST" | jq "." > bot.json returning null for me

phwankhede commented Jul 18, 2017

node exportlexbot.js Adam "$LATEST" | jq "." > bot.json returning null for me

@bharanisruthi

This comment has been minimized.

Show comment
Hide comment
@bharanisruthi

bharanisruthi Jul 18, 2017

we are getting following error. please help
node exportlexbot.js SDBot "$LATEST" | jq "." > SDbot.json
parse error: Invalid numeric literal at line 1, column 19

bharanisruthi commented Jul 18, 2017

we are getting following error. please help
node exportlexbot.js SDBot "$LATEST" | jq "." > SDbot.json
parse error: Invalid numeric literal at line 1, column 19

@NoobRunner

This comment has been minimized.

Show comment
Hide comment
@NoobRunner

NoobRunner Jul 18, 2017

HOW THE HELL DO YOU EXPORT!

NoobRunner commented Jul 18, 2017

HOW THE HELL DO YOU EXPORT!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment