Open ghost opened 2 years ago
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
fnJoin
Any clues?
Thanks
The problem happens when the function hasiamRoleStatements value set (even an empty array). To avoid the issue, you also need to specify a value in iamRoleStatementsName.
iamRoleStatements
iamRoleStatementsName
I have the following serverless.yml (snippet)
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:
And checking some things on
fnJoin
, which puzzles me because I didn't find in the documentation any reference to itAny clues?
Thanks