mapbox / magic-cfn-resources

Build Lambda-backed custom CloudFormation resources ✨
4 stars 5 forks source link

Remove unneeded Fn::Joins #7

Closed rclark closed 7 years ago

rclark commented 7 years ago

When using this downstream, I was encountering errors saying that there were invalid calls to Fn::GetAtt when I tried to deploy the template.

Since JS-land knows the options that have been provided for the LogicalName, you can use JS to build the complete names, rather than using CFN's functions to put the strings together. I think that the source of the issue was that for the first argument of Fn::GetAtt, you cannot use another CFN intrinsic function -- you have to use a straight-up string. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html#w2ab2c21c28c27c13

kellyoung commented 7 years ago

thanks @rclark !