Unable to deploy function due to "Missing required key 'Role' in params" #903

carolynnvu opened this Issue Mar 28, 2016 · 4 comments


None yet

4 participants


Running into this with v0.5.0 and v0.5.1 when I attempt to deploy. My AWS credentials are set in ~/.aws/credentials and I've successfully deployed with them using past versions of Serverless.

Serverless:   my-function-name: Missing required key 'Role' in params
        fn = function () { throw arg; };

ServerlessError: Function Deployment Failed
    at new ServerlessError (/usr/local/lib/node_modules/serverless/lib/Error.js:17:11)
    at FunctionDeploy.<anonymous> (/usr/local/lib/node_modules/serverless/lib/actions/FunctionDeploy.js:127:19)
    at next (/usr/local/lib/node_modules/serverless/node_modules/rimraf/rimraf.js:74:7)
    at FSReqWrap.CB [as oncomplete] (/usr/local/lib/node_modules/serverless/node_modules/rimraf/rimraf.js:110:9)
From previous event:
    at FunctionDeploy.functionDeploy (/usr/local/lib/node_modules/serverless/lib/actions/FunctionDeploy.js:106:10)
From previous event:
    at /usr/local/lib/node_modules/serverless/lib/Serverless.js:181:31
    at Array.reduce (native)
    at /usr/local/lib/node_modules/serverless/lib/Serverless.js:180:32
From previous event:
    at Serverless._execute (/usr/local/lib/node_modules/serverless/lib/Serverless.js:178:12)
    at Serverless.actions.(anonymous function) (/usr/local/lib/node_modules/serverless/lib/Serverless.js:424:20)
    at Serverless.command (/usr/local/lib/node_modules/serverless/lib/Serverless.js:393:38)
    at /usr/local/lib/node_modules/serverless/bin/serverless:19:16
    at processImmediate [as _immediateCallback] (timers.js:383:17)
From previous event:
    at Object.<anonymous> (/usr/local/lib/node_modules/serverless/bin/serverless:18:4)
    at Module._compile (module.js:410:26)
    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
@ac360 ac360 added the bug label Mar 29, 2016
@ac360 ac360 added this to the v0.5.2 milestone Mar 29, 2016
ac360 commented Mar 29, 2016

Hi @carolynnvu - Are you migrating a project over from a previous version? Do you have a iamRoleArnLambda variable defined in the stage.region.json variables file containing your Lambda's IAM Role ARN?

@ac360 ac360 removed the bug label Mar 29, 2016

Hi @ac360. Yes, I'm migrating from a previous version. I see iamRoleArnLambda defined in my s-resources-cf-stage-region.json file.


@carolynnvu you might try adding the value for that output (in the CFT output tab, accessible from the console) to your s-variables-[stage].json (not sure this one works, see #791) or s-variables-[stage]-[region].json file. Something like:

  "iamRoleArnLambda": "[ARN_HERE]"

You may have it already defined somewhere in your project, such as your s-project.json.


@erikerikson I just saw your response now.

But I got it to work yesterday by removing the project from AWS and then doing a sls project install. Deploying worked without any issues after that.

@eahefnawy eahefnawy closed this Mar 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment