title: aws cloudformation use Fn::Join in a list
body: <p>I've a cloudformation template that uses custom resource backed by lambda function. One of the parameters of the lambda function is a list of strings. I have only one item to pass in the list and would like to use Fn:Join to concatenate create the string. However, using Fn::Join gives error as it leads to invalid json. Any inputs are appreciated.</p>
  
  <p>"Subscriptions": [ "Fn::Join": [":", ["a", "b", "c"]]]</p>
  
  <blockquote>
    <p>A client error (ValidationError) occurred when calling the CreateStack
    operation : Template format error: JSON not well-formed.</p>
  </blockquote>
  
  <p><strong>Cloudformation snippet:-</strong></p>
  
  <pre><code>  "Resources": {
  "MyCustomRes": {
        "Type": "Custom::CustomResource",
        "Properties": {
          "ServiceToken": { "Fn::Join": [ "", [
                                          "arn:aws:lambda:",
                                          { "Ref": "AWS::Region" },
                                          ":",
                                          { "Ref": "AWS::AccountId" },
                                          ":function:LambdaFn"
                                        ] ] },
          "Version": 1,
          "ResourceName": { "Ref": "ResourceName" },
          "Subscriptions"       : [ "Fn::Join": [ "", [
                                          "arn:aws:sns:",
                                          { "Ref": "AWS::Region" },
                                          ":",
                                          { "Ref": "AWS::AccountId" },
                                          ":Topic1"
                                        ] ] ]
      }
  }     },
  </code></pre>