My Yaml file is downloaded from S3 and the end of file looks like
Resource:
- !Join [ "", ["arn:aws:iam::", !Ref "AWS::AccountId", ":role/Abc*"] ]
- !Join [ "", ["arn:aws:iam::", !Ref "AWS::AccountId", ":role/abc*"] ]
When i try to process it in Java using :
Yaml yaml = new Yaml();
template = yaml.load(templateContent);
SnakeYaml ( the parser I am using ) gives the error : org.yaml.snakeyaml.constructor.ConstructorException: Can't construct a java object for !Join; exception=Invalid tag: !Join in 'string', line 106, column 21 : - !Join [ "", ["arn:aws:iam::", !R ...
I know this is because !Join and !Ref are cloudFormation intrinsic functions and snakeYaml doesn't recognise these
Is there a workaround for this? What alternative methods could I use to do this successfully?