I am creating a Nodebot with claudiajs.
const botBuilder = require('claudia-bot-builder')
const excuse = require('huh')
module.exports = botBuilder((req) => {
return `Thanks for sending ${req.text}. Your message is very important to us, but ${excuse.get()}`
})
but when I am deploying to aws cloud.
claudia create --region us-east-1 --api-module app
I am getting this error:
{ EntityAlreadyExists: Role with name chatbot-andrea-executor already exists.
at Request.extractError (/.nvm/versions/node/v6.10.3/lib/node_modules/claudia/node_modules/aws-sdk/lib/protocol/query.js:47:29)
at Request.callListeners (/.nvm/versions/node/v6.10.3/lib/node_modules/claudia/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
at Request.emit (/.nvm/versions/node/v6.10.3/lib/node_modules/claudia/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
at Request.emit (/.nvm/versions/node/v6.10.3/lib/node_modules/claudia/node_modules/aws-sdk/lib/request.js:678:14)
at Request.transition (/.nvm/versions/node/v6.10.3/lib/node_modules/claudia/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/.nvm/versions/node/v6.10.3/lib/node_modules/claudia/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /.nvm/versions/node/v6.10.3/lib/node_modules/claudia/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/.nvm/versions/node/v6.10.3/lib/node_modules/claudia/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (/.nvm/versions/node/v6.10.3/lib/node_modules/claudia/node_modules/aws-sdk/lib/request.js:680:12)
at Request.callListeners (/.nvm/versions/node/v6.10.3/lib/node_modules/claudia/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
message: 'Role with name chatbot-andrea-executor already exists.',
code: 'EntityAlreadyExists',
time: 2017-05-19T19:03:01.956Z,
requestId: '-requestId (I changed it)-',
statusCode: 409,
retryable: false,
retryDelay: 4.143280988568199 }
I just find that even (if you need to) you can set the role in the deployment command:
claudia create --region us-east-1 --role chatbot-andrea-executor --api-module app
You have to replace the name on collision after --role's flag. Also you are more curios about here is a good starting point about custom deployments.