It looks like there are some bugs when creating IAM Role for Step Functions. This plugin try to create IAM Role when it can't find statesExecutionRole-us-east-1 role, but always fail because of some reasons.
this.iamRoleName is not defined.
When createRole is invoked, this.iamRoleName variable is not set, so failing with this error message.
$ sls deploy stepf -t hellostepfunc -v
Serverless: Start to deploy hellostepfunc step function...
Serverless Error ---------------------------------------
Missing required key 'RoleName' in params
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Your Environment Information -----------------------------
OS: darwin
Node Version: 7.1.0
Serverless Version: 1.4.0
- Invalid Policy Document
Also assumeRolePolicyDocument, passed to createRole as a param, is not valid policy document. It's value must be assume role policy, not policy for invoking Lambda function. Here is a error message with passing string to this.iamRoleName.
$ sls deploy stepf -t hellostepfunc -v
Serverless: Start to deploy hellostepfunc step function...
Serverless Error ---------------------------------------
Has prohibited field Resource
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Your Environment Information -----------------------------
OS: darwin
Node Version: 7.1.0
Serverless Version: 1.4.0
I think it's JSON object should be looks like this.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "states.<region-defined-in-provider>.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
And I don't know how to implement, but you have to define poliicy for invoking Lambda function somewhere in code.
Thanks for very useful plugin!
It looks like there are some bugs when creating IAM Role for Step Functions. This plugin try to create IAM Role when it can't find
statesExecutionRole-us-east-1role, but always fail because of some reasons.this.iamRoleNameis not defined.When
createRoleis invoked,this.iamRoleNamevariable is not set, so failing with this error message.$ sls deploy stepf -t hellostepfunc -v Serverless: Start to deploy hellostepfunc step function... Serverless Error --------------------------------------- Missing required key 'RoleName' in params Get Support -------------------------------------------- Docs: docs.serverless.com Bugs: github.com/serverless/serverless/issues Your Environment Information ----------------------------- OS: darwin Node Version: 7.1.0 Serverless Version: 1.4.0Also
assumeRolePolicyDocument, passed tocreateRoleas a param, is not valid policy document. It's value must be assume role policy, not policy for invoking Lambda function. Here is a error message with passing string tothis.iamRoleName.$ sls deploy stepf -t hellostepfunc -v Serverless: Start to deploy hellostepfunc step function... Serverless Error --------------------------------------- Has prohibited field Resource Get Support -------------------------------------------- Docs: docs.serverless.com Bugs: github.com/serverless/serverless/issues Your Environment Information ----------------------------- OS: darwin Node Version: 7.1.0 Serverless Version: 1.4.0I think it's JSON object should be looks like this.
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "states.<region-defined-in-provider>.amazonaws.com" }, "Action": "sts:AssumeRole" } ] }And I don't know how to implement, but you have to define poliicy for invoking Lambda function somewhere in code.
Thanks for very useful plugin!