Error: The CloudFormation template is invalid: Template error: instance of Fn::GetAtt references undefined resource lambda_user

Got this error:
Error: The CloudFormation template is invalid: Template error: instance of Fn::GetAtt references undefined resource lambda_user.

My serverless.yml:

[..]
    provider:
      name: aws
      runtime: nodejs6.10
      memorySize: 512
      timeout: 30
      stage: staging
      region: ap-southeast-2
      role: lambda_user
[..]

had to replace the role with the full arn to avoid the error.

  1. It would be nice if the error would be more precise
  2. Not sure if the docs should just mention the arn and not the role name