The built-in function Fn::Join combines a set of strings into a single string that is separated by a delimiter.
Declaration
JSON
{ "Fn::Join": [ "delimiter", [ "toJoinString1", "toJoinString2", ... ] ] }
YAML
Syntax for the full function name:
Fn::Join: - delimiter - - toJoinstring1 - toJoinstring2 - ...
Syntax for the short form:
!Join [delimiter, [toJoinstring1, toJoinstring2, ...]]
Parameters
delimiter
: the delimiter between the values that you want to combine. If you leave this parameter empty, values are combined with no delimiter.toJoinString1, toJoinString2, ...
: the strings that you want to combine.
Return value
The combined string.
Examples
!Join [',', [a,b,c]]
{
"Fn::Join": [
",",
["a", "b", "c"]
]
}
Return value: a,b,c
.