cloudformation/FIXEngineApplication.yml [1535:1752]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  GlobalAccelerator:
    Condition: IsAcceptorStack
    Properties:
      Enabled: true
      Name: !Ref 'AWS::StackName'
    Type: AWS::GlobalAccelerator::Accelerator
  GlobalAcceleratorArnParam:
    Condition: IsAcceptorStack
    Properties:
      Description: !Join
        - ''
        - - 'Global Accelerator ARN for '
          - !Ref 'AWS::StackName'
          - ' stack'
      Name: !Join
        - /
        - - /fixengine
          - !Ref 'AWS::StackName'
          - GlobalAcceleratorArn
      Tier: Standard
      Type: String
      Value: !GetAtt 'GlobalAccelerator.AcceleratorArn'
    Type: AWS::SSM::Parameter
  GlobalAcceleratorDNSNameParam:
    Condition: IsAcceptorStack
    Properties:
      Description: !Join
        - ''
        - - 'Global Accelerator DNS name for '
          - !Ref 'AWS::StackName'
          - ' stack'
      Name: !Join
        - /
        - - /fixengine
          - !Ref 'AWS::StackName'
          - GlobalAcceleratorDNSName
      Tier: Standard
      Type: String
      Value: !GetAtt 'GlobalAccelerator.DnsName'
    Type: AWS::SSM::Parameter
  GlobalAcceleratorDNSRecord:
    Condition: CreateEndpointRecord
    DependsOn:
      - GlobalAccelerator
    Properties:
      HostedZoneId: !Ref 'HostedZoneID'
      RecordSets:
        - AliasTarget:
            DNSName: !GetAtt 'GlobalAccelerator.DnsName'
            HostedZoneId: Z2BJ6XQ5FK7U4H
          Name: !Ref 'FIXServerDNSName'
          Type: A
    Type: AWS::Route53::RecordSetGroup
  GlobalAcceleratorEndpointGroup:
    Condition: IsAcceptorStack
    DependsOn:
      - PrimaryNLB
      - FailoverNLB
      - GlobalAcceleratorListener
    Properties:
      EndpointConfigurations:
        - EndpointId: !Ref 'PrimaryNLB'
          Weight: 100
        - EndpointId: !Ref 'FailoverNLB'
          Weight: 0
      EndpointGroupRegion: !Ref 'AWS::Region'
      ListenerArn: !Ref 'GlobalAcceleratorListener'
    Type: AWS::GlobalAccelerator::EndpointGroup
  GlobalAcceleratorEndpointGroupArnParam:
    Condition: IsAcceptorStack
    Properties:
      Description: !Join
        - ''
        - - 'Global Accelerator Group Endpoint ARN for '
          - !Ref 'AWS::StackName'
          - ' stack'
      Name: !Join
        - /
        - - /fixengine
          - !Ref 'AWS::StackName'
          - GlobalAcceleratorEndpointGroupArn
      Tier: Standard
      Type: String
      Value: !GetAtt 'GlobalAcceleratorEndpointGroup.EndpointGroupArn'
    Type: AWS::SSM::Parameter
  GlobalAcceleratorIPAddressesParam:
    Condition: IsAcceptorStack
    Properties:
      Description: !Join
        - ''
        - - 'Global Accelerator IP addresses for '
          - !Ref 'AWS::StackName'
          - ' stack'
      Name: !Join
        - /
        - - /fixengine
          - !Ref 'AWS::StackName'
          - GlobalAcceleratorIPAddresses
      Tier: Standard
      Type: String
      Value: !GetAtt 'GlobalAcceleratorInfoRetriever.IPAddresses'
    Type: AWS::SSM::Parameter
  GlobalAcceleratorInfoRetriever:
    Condition: IsAcceptorStack
    DependsOn:
      - GlobalAccelerator
      - GlobalAcceleratorInfoRetrieverLogGroup
    Properties:
      Properties:
        AcceleratorArn: !Ref 'GlobalAccelerator'
      ServiceToken: !GetAtt 'GlobalAcceleratorInfoRetrieverFunction.Arn'
      Type: Custom::GetAcceleratorInfo
      Version: '1.0'
    Type: AWS::CloudFormation::CustomResource
  GlobalAcceleratorInfoRetrieverFunction:
    Condition: IsAcceptorStack
    DependsOn:
      - GlobalAcceleratorInfoRetrieverRole
    Metadata:
      cfn_nag:
        rules_to_suppress:
          - id: W89
            reason: This function is only invoked during the deployment of this solution,
              potentially PRIOR to the creation of a VPC, and is never used again.
          - id: W92
            reason: This function is only invoked during the deployment of this solution
              and is never used again. Reserving concurrency would therefore be wasteful.
    Properties:
      Code:
        ZipFile: "import json\nimport boto3\nimport logging\nimport cfnresponse\n\
          from botocore.exceptions import ClientError\n\nLOGGER = logging.getLogger()\n\
          LOGGER.setLevel(logging.INFO)\nlogging.getLogger('boto3').setLevel(logging.INFO)\n\
          logging.getLogger('botocore').setLevel(logging.INFO)\n\n'''\n    - AcceleratorArn\
          \ | str\n'''\ndef handler(event, context):\n\n    LOGGER.info('----- REQUEST\
          \ RECEIVED -----')\n    LOGGER.info(json.dumps(event))\n\n    responseData\
          \ = {}\n    \n    operation = event['ResourceProperties']['Type'].split('Custom::')[1]\n\
          \    properties = event['ResourceProperties']['Properties']\n    \n    if\
          \ event['RequestType'] in ['Create', 'Update']:\n\n        accelerator_client\
          \ = boto3.client('globalaccelerator', region_name = 'us-west-2')\n\n   \
          \     try:\n\n            response = accelerator_client.describe_accelerator(\n\
          \                AcceleratorArn = properties['AcceleratorArn']\n       \
          \     )\n\n            if 'Accelerator' not in response:\n\n           \
          \     return cfnresponse.send(event, context, cfnresponse.FAILED, responseData)\n\
          \n            else:\n\n                responseData['IPAddresses'] = ','.join(response['Accelerator']['IpSets'][0]['IpAddresses'])\n\
          \                return cfnresponse.send(event, context, cfnresponse.SUCCESS,\
          \ responseData, properties['AcceleratorArn'])\n\n        except ClientError\
          \ as e:\n            print(str(e))\n            return cfnresponse.send(event,\
          \ context, cfnresponse.FAILED, responseData)\n            \n    elif event['RequestType']\
          \ in ['Delete']:\n        \n        return cfnresponse.send(event, context,\
          \ cfnresponse.SUCCESS, responseData)"
      Description: !Join
        - ''
        - - 'GlobalAcceleratorInfoRetriever resource for '
          - !Ref 'AWS::StackName'
          - ' stack'
      Handler: index.handler
      KmsKeyArn: !If
        - KMSKeySupplied
        - !Ref 'KMSKeyARN'
        - ''
      Role: !GetAtt 'GlobalAcceleratorInfoRetrieverRole.Arn'
      Runtime: python3.7
      Timeout: 15
    Type: AWS::Lambda::Function
  GlobalAcceleratorInfoRetrieverLogGroup:
    Condition: IsAcceptorStack
    DependsOn:
      - GlobalAcceleratorInfoRetrieverFunction
    Metadata:
      cfn_nag:
        rules_to_suppress:
          - id: W84
            reason: These logs do not contain sensitive data.
    Properties:
      LogGroupName: !Join
        - ''
        - - /aws/lambda/
          - !Ref 'GlobalAcceleratorInfoRetrieverFunction'
      RetentionInDays: !Ref 'LogRetentionInDays'
    Type: AWS::Logs::LogGroup
  GlobalAcceleratorInfoRetrieverRole:
    Condition: IsAcceptorStack
    DependsOn:
      - GlobalAccelerator
    Metadata: {}
    Properties:
      AssumeRolePolicyDocument:
        Statement:
          - Action:
              - sts:AssumeRole
            Effect: Allow
            Principal:
              Service:
                - lambda.amazonaws.com
      ManagedPolicyArns:
        - arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole
      Policies:
        - PolicyDocument:
            Statement:
              - Action:
                  - globalaccelerator:DescribeAccelerator
                Effect: Allow
                Resource:
                  - !GetAtt 'GlobalAccelerator.AcceleratorArn'
          PolicyName: PrimaryPolicy
    Type: AWS::IAM::Role
  GlobalAcceleratorListener:
    Condition: IsAcceptorStack
    DependsOn:
      - GlobalAccelerator
    Properties:
      AcceleratorArn: !Ref 'GlobalAccelerator'
      ClientAffinity: NONE
      PortRanges:
        - FromPort: !Ref 'FIXServerPort'
          ToPort: !Ref 'FIXServerPort'
      Protocol: TCP
    Type: AWS::GlobalAccelerator::Listener
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



cloudformation/FIXEngineVPCApplication.yml [1681:1898]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  GlobalAccelerator:
    Condition: IsAcceptorStack
    Properties:
      Enabled: true
      Name: !Ref 'AWS::StackName'
    Type: AWS::GlobalAccelerator::Accelerator
  GlobalAcceleratorArnParam:
    Condition: IsAcceptorStack
    Properties:
      Description: !Join
        - ''
        - - 'Global Accelerator ARN for '
          - !Ref 'AWS::StackName'
          - ' stack'
      Name: !Join
        - /
        - - /fixengine
          - !Ref 'AWS::StackName'
          - GlobalAcceleratorArn
      Tier: Standard
      Type: String
      Value: !GetAtt 'GlobalAccelerator.AcceleratorArn'
    Type: AWS::SSM::Parameter
  GlobalAcceleratorDNSNameParam:
    Condition: IsAcceptorStack
    Properties:
      Description: !Join
        - ''
        - - 'Global Accelerator DNS name for '
          - !Ref 'AWS::StackName'
          - ' stack'
      Name: !Join
        - /
        - - /fixengine
          - !Ref 'AWS::StackName'
          - GlobalAcceleratorDNSName
      Tier: Standard
      Type: String
      Value: !GetAtt 'GlobalAccelerator.DnsName'
    Type: AWS::SSM::Parameter
  GlobalAcceleratorDNSRecord:
    Condition: CreateEndpointRecord
    DependsOn:
      - GlobalAccelerator
    Properties:
      HostedZoneId: !Ref 'HostedZoneID'
      RecordSets:
        - AliasTarget:
            DNSName: !GetAtt 'GlobalAccelerator.DnsName'
            HostedZoneId: Z2BJ6XQ5FK7U4H
          Name: !Ref 'FIXServerDNSName'
          Type: A
    Type: AWS::Route53::RecordSetGroup
  GlobalAcceleratorEndpointGroup:
    Condition: IsAcceptorStack
    DependsOn:
      - PrimaryNLB
      - FailoverNLB
      - GlobalAcceleratorListener
    Properties:
      EndpointConfigurations:
        - EndpointId: !Ref 'PrimaryNLB'
          Weight: 100
        - EndpointId: !Ref 'FailoverNLB'
          Weight: 0
      EndpointGroupRegion: !Ref 'AWS::Region'
      ListenerArn: !Ref 'GlobalAcceleratorListener'
    Type: AWS::GlobalAccelerator::EndpointGroup
  GlobalAcceleratorEndpointGroupArnParam:
    Condition: IsAcceptorStack
    Properties:
      Description: !Join
        - ''
        - - 'Global Accelerator Group Endpoint ARN for '
          - !Ref 'AWS::StackName'
          - ' stack'
      Name: !Join
        - /
        - - /fixengine
          - !Ref 'AWS::StackName'
          - GlobalAcceleratorEndpointGroupArn
      Tier: Standard
      Type: String
      Value: !GetAtt 'GlobalAcceleratorEndpointGroup.EndpointGroupArn'
    Type: AWS::SSM::Parameter
  GlobalAcceleratorIPAddressesParam:
    Condition: IsAcceptorStack
    Properties:
      Description: !Join
        - ''
        - - 'Global Accelerator IP addresses for '
          - !Ref 'AWS::StackName'
          - ' stack'
      Name: !Join
        - /
        - - /fixengine
          - !Ref 'AWS::StackName'
          - GlobalAcceleratorIPAddresses
      Tier: Standard
      Type: String
      Value: !GetAtt 'GlobalAcceleratorInfoRetriever.IPAddresses'
    Type: AWS::SSM::Parameter
  GlobalAcceleratorInfoRetriever:
    Condition: IsAcceptorStack
    DependsOn:
      - GlobalAccelerator
      - GlobalAcceleratorInfoRetrieverLogGroup
    Properties:
      Properties:
        AcceleratorArn: !Ref 'GlobalAccelerator'
      ServiceToken: !GetAtt 'GlobalAcceleratorInfoRetrieverFunction.Arn'
      Type: Custom::GetAcceleratorInfo
      Version: '1.0'
    Type: AWS::CloudFormation::CustomResource
  GlobalAcceleratorInfoRetrieverFunction:
    Condition: IsAcceptorStack
    DependsOn:
      - GlobalAcceleratorInfoRetrieverRole
    Metadata:
      cfn_nag:
        rules_to_suppress:
          - id: W89
            reason: This function is only invoked during the deployment of this solution,
              potentially PRIOR to the creation of a VPC, and is never used again.
          - id: W92
            reason: This function is only invoked during the deployment of this solution
              and is never used again. Reserving concurrency would therefore be wasteful.
    Properties:
      Code:
        ZipFile: "import json\nimport boto3\nimport logging\nimport cfnresponse\n\
          from botocore.exceptions import ClientError\n\nLOGGER = logging.getLogger()\n\
          LOGGER.setLevel(logging.INFO)\nlogging.getLogger('boto3').setLevel(logging.INFO)\n\
          logging.getLogger('botocore').setLevel(logging.INFO)\n\n'''\n    - AcceleratorArn\
          \ | str\n'''\ndef handler(event, context):\n\n    LOGGER.info('----- REQUEST\
          \ RECEIVED -----')\n    LOGGER.info(json.dumps(event))\n\n    responseData\
          \ = {}\n    \n    operation = event['ResourceProperties']['Type'].split('Custom::')[1]\n\
          \    properties = event['ResourceProperties']['Properties']\n    \n    if\
          \ event['RequestType'] in ['Create', 'Update']:\n\n        accelerator_client\
          \ = boto3.client('globalaccelerator', region_name = 'us-west-2')\n\n   \
          \     try:\n\n            response = accelerator_client.describe_accelerator(\n\
          \                AcceleratorArn = properties['AcceleratorArn']\n       \
          \     )\n\n            if 'Accelerator' not in response:\n\n           \
          \     return cfnresponse.send(event, context, cfnresponse.FAILED, responseData)\n\
          \n            else:\n\n                responseData['IPAddresses'] = ','.join(response['Accelerator']['IpSets'][0]['IpAddresses'])\n\
          \                return cfnresponse.send(event, context, cfnresponse.SUCCESS,\
          \ responseData, properties['AcceleratorArn'])\n\n        except ClientError\
          \ as e:\n            print(str(e))\n            return cfnresponse.send(event,\
          \ context, cfnresponse.FAILED, responseData)\n            \n    elif event['RequestType']\
          \ in ['Delete']:\n        \n        return cfnresponse.send(event, context,\
          \ cfnresponse.SUCCESS, responseData)"
      Description: !Join
        - ''
        - - 'GlobalAcceleratorInfoRetriever resource for '
          - !Ref 'AWS::StackName'
          - ' stack'
      Handler: index.handler
      KmsKeyArn: !If
        - KMSKeySupplied
        - !Ref 'KMSKeyARN'
        - ''
      Role: !GetAtt 'GlobalAcceleratorInfoRetrieverRole.Arn'
      Runtime: python3.7
      Timeout: 15
    Type: AWS::Lambda::Function
  GlobalAcceleratorInfoRetrieverLogGroup:
    Condition: IsAcceptorStack
    DependsOn:
      - GlobalAcceleratorInfoRetrieverFunction
    Metadata:
      cfn_nag:
        rules_to_suppress:
          - id: W84
            reason: These logs do not contain sensitive data.
    Properties:
      LogGroupName: !Join
        - ''
        - - /aws/lambda/
          - !Ref 'GlobalAcceleratorInfoRetrieverFunction'
      RetentionInDays: !Ref 'LogRetentionInDays'
    Type: AWS::Logs::LogGroup
  GlobalAcceleratorInfoRetrieverRole:
    Condition: IsAcceptorStack
    DependsOn:
      - GlobalAccelerator
    Metadata: {}
    Properties:
      AssumeRolePolicyDocument:
        Statement:
          - Action:
              - sts:AssumeRole
            Effect: Allow
            Principal:
              Service:
                - lambda.amazonaws.com
      ManagedPolicyArns:
        - arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole
      Policies:
        - PolicyDocument:
            Statement:
              - Action:
                  - globalaccelerator:DescribeAccelerator
                Effect: Allow
                Resource:
                  - !GetAtt 'GlobalAccelerator.AcceleratorArn'
          PolicyName: PrimaryPolicy
    Type: AWS::IAM::Role
  GlobalAcceleratorListener:
    Condition: IsAcceptorStack
    DependsOn:
      - GlobalAccelerator
    Properties:
      AcceleratorArn: !Ref 'GlobalAccelerator'
      ClientAffinity: NONE
      PortRanges:
        - FromPort: !Ref 'FIXServerPort'
          ToPort: !Ref 'FIXServerPort'
      Protocol: TCP
    Type: AWS::GlobalAccelerator::Listener
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



