serverless-iam-roles-per-function
serverless-iam-roles-per-function copied to clipboard
Global Role Name is not in expected format
I have the following serverless.yml (snippet)
iam:
role:
name: ${self:provider.stage}-${self:service.name}-default-role
statements:
- Effect: Allow
Action:
- ssm:GetParameter
- ssm:GetParameters
Resource:
- !Sub "arn:aws:ssm:${self:provider.region}:${AWS::AccountId}:parameter/${self:provider.stage}/*"
And when trying to deploy I get:
ERROR: Global Role Name is not in expected format. Got name: "test-rest-ra-gui-apis-default-role"
This used to work up until some time ago (maybe I updated serverless or the plugin inadvertently)
Looking at the source code it's doing:
const roleName = this.serverless.providers.aws.naming.getRoleName();
const fnJoin = roleName['Fn::Join'];
And checking some things on fnJoin
, which puzzles me because I didn't find in the documentation any reference to it
Any clues?
Thanks