AWSTemplateFormatVersion: "2010-09-09" Description: EndpointGroup Dependencies Parameters: LatestAmiId: Description: Region specific image from the Parameter Store Type: AWS::SSM::Parameter::Value Default: /aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2 Resources: EndpointGroupAccelerator: Type: AWS::GlobalAccelerator::Accelerator Properties: Name: CFNEndpointGroupAccelerator IpAddressType: IPV4 EndpointGroupListener: Type: AWS::GlobalAccelerator::Listener Properties: AcceleratorArn: Ref: EndpointGroupAccelerator Protocol: TCP PortRanges: - FromPort: 5342 ToPort: 5343 EndpointGroupEC2KeyPair: Type: "AWS::EC2::KeyPair" Properties: KeyName: EndpointGroupEC2KeyPair EndpointGroupInstanceOne: Type: AWS::EC2::Instance Properties: ImageId: Ref: LatestAmiId InstanceType: t3.nano KeyName: Ref: EndpointGroupEC2KeyPair Tags: - Key: Name Value: contract-test-endpoint-group-ec2 Outputs: EndpointGroupListenerArn: Value: Fn::GetAtt: [EndpointGroupListener, ListenerArn] Export: Name: awsglobalacceleratorendpointgroupcto1 EndpointGroupEC2InstanceId: Value: Ref: EndpointGroupInstanceOne Export: Name: awsglobalacceleratorendpointgroupcto2 StackRegion: Value: Ref: AWS::Region Export: Name: awsglobalacceleratorendpointgroupcto3