Skip to content

Use !Ref to return RoleName

Aidan Hoolachan requested to merge ajhool/aws-sam:patch-1 into master

Using !GetAtt without a property value is invalid syntax, here and leads to this error message:

An error occurred (ValidationError) when calling the CreateChangeSet operation: Template error: if specifying one argument to Fn::GetAtt, that argument must be a non-empty string in format .

The fix is to use !Ref instead of !GetAtt. The AWS documentation shows that !Ref returns RoleName:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html

Merge request reports