#
Add Global Accelerator to Existing Deployment
#
Prerequisites
Before starting, gather the following information:
- AWS Account ID: Locate this in the deployment organization's settings page.
- Deployment ID: Found in the deployment's settings page.
Log in to the production SSO account, and assume the ProdAutoPilotSupportLevelTwo role in the correct AWS account.
#
Locating The Correct Stack
- Open the CloudFormation service in the AWS console.
- Use the Deployment ID to filter and locate the main stack.
- To simplify the search, untoggle the "View nested" switch.
Once the main stack is identified, proceed to update it.
#
Editing The Template
The recommended method for editing the stack's template is through the "Infrastructure Composer" since you can edit it through your browser. Once in the editor, follow these steps:
- Navigate to the Template tab within the editor.
- Ensure the template remains in JSON format.
danger
Do not convert the template to YAML. AutoPilot requires JSON format, and converting from YAML can introduce discrepancies that prevent the deployment page from loading correctly.
Proceed to update the template.
#
Add Global Accelerator Resources
Locate the end of the Resources section in the template and merge the following JSON with the existing resources:
{
"GlobalAccelerator": {
"Type": "AWS::GlobalAccelerator::Accelerator",
"Properties": {
"Name": "CorporateVPNAccelerator",
"Enabled": true,
"IpAddressType": "IPV4"
}
},
"GlobalAcceleratorListener": {
"Type": "AWS::GlobalAccelerator::Listener",
"Properties": {
"AcceleratorArn": {
"Ref": "GlobalAccelerator"
},
"Protocol": "TCP",
"PortRanges": [
{
"FromPort": 443,
"ToPort": 443
}
]
}
},
"GlobalAcceleratorListenerEndpointGroup": {
"Type": "AWS::GlobalAccelerator::EndpointGroup",
"Properties": {
"ListenerArn": {
"Ref": "GlobalAcceleratorListener"
},
"EndpointGroupRegion": {
"Ref": "AWS::Region"
},
"EndpointConfigurations": [
{
"EndpointId": {
"Ref": "LoadBalancer"
}
}
]
}
}
}
The above snippet adds a Global Accelerator, a Global Accelerator listener (listening on port 443), and an endpoint group. The endpoint group points the accelerator to the Application Load Balancer endpoint.
#
Adding An Output Value
Navigate to the Outputs section of the template and merge the following JSON with the existing outputs:
{
"AcceleratorIpAddressOne": {
"Value": {
"Fn::Select": [
0,
{
"Fn::GetAtt": [
"GlobalAccelerator",
"Ipv4Addresses"
]
}
]
}
},
"AcceleratorIpAddressTwo": {
"Value": {
"Fn::Select": [
1,
{
"Fn::GetAtt": [
"GlobalAccelerator",
"Ipv4Addresses"
]
}
]
}
}
}
Note
Since the Accelerator's IPv4 Address output type is an array, this is accounted for by creating 2 outputs using the index numbers for each. In the above case, 0 and 1.
#
Add Metadata To Display Info In AutoPilot
Navigate to the Metadata section of the template and merge the following JSON with the JetRails::Gui::Output section as well as the JetRails::Gui::OutputGroup section.
For the JetRails::Gui::Output section, merge the following:
{
"AcceleratorIpAddressOne": {
"Component": "ListItem",
"FriendlyName": "Static IPV4 Address"
},
"AcceleratorIpAddressTwo": {
"Component": "ListItem",
"FriendlyName": "Static IPV4 Address"
}
}
For the JetRails::Gui::OutputGroup section, merge the following:
{
"GlobalAccelerator": {
"FriendlyName": "Global Accelerator",
"Variant": "LabelValueTable",
"Outputs": [
"AcceleratorIpAddressOne",
"AcceleratorIpAddressTwo"
]
}
}
#
Applying the Changes
- Validate the updated template.
- Update the stack's new template.
- Use the wizard to apply the changes.
Once the update is complete, the Global Accelerator IPs will be displayed in the AutoPilot interface in the Overview tab.
#
Verify Changes
Whitelist your IP address for port 443. Create a local hosts entry pointing the domain or subdomain to the Global Accelerator IP addresses.
Curl can also be used to test:
curl -svo /dev/null --resolve example.net:443:GLOBAL_ACCELERATOR_IP https://example.net