title: ARN as a parameter in Cloud Formation Stack
body: <p>I wanted to use the ARN as parameter input to cloudformation stack resources <code>EventRuleRegion1</code> - <code>Target</code> as well as <code>EventBridgeIAMrole</code>  , but it is not working. when i call with Ref function</p>
  <p>Original ARN</p>
  <pre><code>arn:aws:events:ap-southeast-2:123456789123:event-bus/central-eventbus-sydney
  </code></pre>
  <p>When i give the arn directly in code its working fine.</p>
  <h1>Code</h1>
  <pre><code>AWSTemplateFormatVersion: 2010-09-09
  
  Parameters:
    EventBridgeName:
      Description: Enter the Event Bridge Name
      Type: String
      Default: ec2-lifecycle-events
      
    EventBusName:
      Description: Enter the Central Event Bus Name
      Type: String
      Default: central-eventbus-sydney
      
    EventBusArn:
      Description: Enter the ARN of Central Event Bus
      Type: String
      Default: arn:aws:events:ap-southeast-2:123456789123:event-bus/central-eventbus-sydney
      
    Monitoringaccount:
      Description: Enter the Monitoring AWS account number
      Type: String
      Default: 123456789123
  
  Resources:
      EventRuleRegion1:
          Type: AWS::Events::Rule
          Properties: 
              Description: Event rule to send events to monitoring account event bus
              EventBusName: default
              EventPattern:
                  source:
                      - aws.ec2
                  detail-type:
                      - &quot;EC2 Instance State-change Notification&quot;
                  detail:
                    state:
                      - &quot;running&quot;
                      - &quot;stopped&quot;
                      - &quot;terminated&quot;
                      
              Name: !Ref EventBridgeName
              State: ENABLED
              Targets: 
                  - Arn: &gt;-
                      - !Join [ &quot;&quot;, [ !Sub &quot;arn:aws:events:${AWS::Region}:123456789123:event-bus/&quot;,!Ref EventBusName ] ]
                    Id: !Ref EventBusName
                    RoleArn: !GetAtt
                      - EventBridgeIAMrole
                      - Arn      
                    
      
      
      EventBridgeIAMrole:
          Type: 'AWS::IAM::Role'
          Properties:
              AssumeRolePolicyDocument:
                  Version: 2012-10-17
                  Statement:
                      - Effect: Allow
                        Principal:
                          Service: !Sub events.amazonaws.com
                        Action: 'sts:AssumeRole'
              Path: /
              Policies:
                  - PolicyName: PutEventsDestinationBus
                    PolicyDocument:
                      Version: 2012-10-17
                      Statement:
                          - Effect: Allow
                            Action:
                              - 'events:PutEvents'
                            Resource:
                              - &gt;-
                                - !Join [ &quot;&quot;, [ !Sub &quot;arn:aws:events:${AWS::Region}:123456789123:event-bus/&quot;,!Ref EventBusName ] ]
  </code></pre>
  <h1>Error</h1>
  <pre><code>Parameter - !Join [ &quot;&quot;, [ !Sub &quot;arn:aws:events:${AWS::Region}:123456789123:event-bus/&quot;,!Ref EventBusName ] ] is not valid. Reason: Provided Arn is not in correct format. (Service: AmazonCloudWatchEvents; Status Code: 400; Error Code: ValidationException; Request ID: 0d52a1d6-095e-44f7-9455-b7481dc4fb8d; Proxy: null)
  </code></pre>