AWS Global Accelerator
Developer Guide

Getting Started with AWS Global Accelerator

This tutorial provides the steps for getting started with AWS Global Accelerator using the console. You can also use AWS Global Accelerator API operations to create and customize your accelerator. At each step in this tutorial, there's a link to the corresponding API operation for completing the task programmatically. For more information about working with AWS Global Accelerator API operations, see the AWS Global Accelerator API Reference.

Tasks

Before You Begin

Before you create an accelerator, create at least one resource that you can add as an endpoint to direct traffic to. Do one of the following:

Step 1: Create an Accelerator

To create your accelerator, follow the steps in the Global Accelerator console in the AWS management console.

To complete this task by using an API operation instead of the console, see CreateAccelerator in the AWS Global Accelerator API Reference.

Important

Make sure that you’re in the US-West-2 (Oregon) Region. You must be in this Region to create or update accelerators.

  1. Open the Global Accelerator console at https://us-west-2.console.aws.amazon.com/ec2/v2/home?region=us-west-2#Global Accelerator:.

  2. Choose Create accelerator.

  3. Provide a name for your accelerator.

  4. Choose Next.

Step 2: Add Listeners

Create a listener to process inbound connections from your users to Global Accelerator.

Note

To complete this task by using an API operation instead of the console, see CreateListener in the AWS Global Accelerator API Reference.

  1. On the Add listener page, enter the ports or port ranges that you want to associate with the listener. Listeners support ports 1-65535.

  2. Choose the protocol for the ports that you entered.

  3. Optionally, choose to enable client affinity. Client affinity for a listener means that Global Accelerator ensures that connections from a specific source (client) IP address are always routed to the same endpoint. To enable this behavior, in the dropdown list, choose Source IP.

    The default is None, which means that client affinity is not enabled and Global Accelerator distributes traffic equally between the endpoints in the endpoint groups for the listener.

    For more information, see Client Affinity.

  4. Optionally, choose Add listener to add an additional listener.

  5. When you're finished adding listeners, choose Next.

Step 3: Add Endpoint Groups

Add one or more endpoint groups, each of which is associated with a specific AWS Region.

Note

To complete this task by using an API operation instead of the console, see CreateEndpointGroup in the AWS Global Accelerator API Reference.

  1. On the Add endpoint groups page, in the section for a listener, choose a Region from the dropdown list.

  2. Optionally, for Traffic dial, enter a number from 0 to 100 to set a percentage of traffic for this endpoint group. The percentage is applied only to the traffic already directed to this endpoint group, not all listener traffic. By default, the traffic dial for an endpoint group is set to 100 (that is, 100%).

  3. Optionally, for custom health check values, choose Configure health checks. When you configure health check settings, Global Accelerator uses the settings for health checks for Elastic IP address endpoints. For Network Load Balancer and Application Load Balancer endpoints, Global Accelerator uses the health check settings that you've already configured for the load balancers themselves. For more information, see Health Check Options.

  4. Optionally, choose Add endpoint group to add additional endpoint groups for this listener or other listeners.

  5. Choose Next.

Step 4: Add Endpoints

Add one or more endpoints that are associated with specific endpoint groups. This step isn't required, but no traffic is directed to endpoints in a Region unless the endpoints are included in an endpoint group.

Note

If you're creating your accelerator programmatically, you add endpoints as part of adding endpoint groups. For more information, see CreateEndpointGroup in the AWS Global Accelerator API Reference.

  1. On the Create endpoints page, in the section for an endpoint, choose an endpoint from the dropdown list.

  2. Optionally, for Weight, enter a number from 0 to 255 to set a weight for routing traffic to this endpoint. When you add weights to endpoints, you configure Global Accelerator to route traffic based on proportions that you specify. By default, all endpoints have a weight of 128. For more information, see Endpoint Weights.

  3. Optionally, choose Add endpoint to add more endpoints.

  4. Choose Next.

After you choose Next, on the Global Accelerator dashboard you'll see a message that your accelerator is in progress. When the process is finished, the accelerator status in the dashboard is Active.

Step 5: Test Your Accelerator

Take steps to test your accelerator to make sure that traffic is being directed to your endpoints. For example, run a curl command such as the following, substituting one of your accelerator's static IP addresses, to show the AWS Regions where requests are processed. The command calls the IP address 100 times, and then outputs a count of where each request was processed.

for ((i=0;i<100;i++)); do curl http://198.51.100.0/ >> output.txt; done; cat output.txt | sort | uniq -c ; rm output.txt;

If you've adjusted the traffic dial on any endpoint groups, this command can help you confirm that your accelerator is directing the correct percentages of traffic to different groups. For more information, see the detailed examples in the following blog post, Traffic management with AWS Global Accelerator.

Step 6: Delete Your Accelerator

If you created an accelerator as a test or if you're no longer using an accelerator, you can delete it. On the console, disable the accelerator, and then you can delete it. You don't have to remove listeners and endpoint groups from the accelerator.

To delete an accelerator by using an API operation instead of the console, you must first remove all listeners and endpoint groups that are associated with the accelerator as well as disable it. For more information, see the DeleteAccelerator operation in the AWS Global Accelerator API Reference.