Menu
Amazon Route 53
Developer Guide (API Version 2013-04-01)

Routing Traffic to an Amazon EC2 Instance

Amazon EC2 provides scalable computing capacity in the AWS cloud. You can launch an EC2 virtual computing environment (an instance) using a preconfigured template (an Amazon Machine Image, or AMI). When you launch an EC2 instance, EC2 automatically installs the operating system (Linux or Microsoft Windows) and additional software included in the AMI, such as web server or database software.

If you're hosting a website or running a web application on an EC2 instance, you can route traffic for your domain, such as example.com, to your server by using Amazon Route 53.

Prerequisites

Before you get started, you need the following:

Configuring Amazon Route 53 to Route Traffic to an Amazon EC2 Instance

To configure Amazon Route 53 to route traffic to an EC2 instance, perform the following procedure.

To route traffic to an Amazon EC2 instance

  1. Get the IP address for the Amazon EC2 instance:

    1. Sign in to the AWS Management Console and open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

    2. In the regions list in the upper right corner of the console, choose the region that you launched the instance in.

    3. In the navigation pane, choose Instances.

    4. In the table, choose the instance that you want to route traffic to.

    5. In the bottom pane, on the Description tab, get the value of Elastic IPs.

      If you didn't associate an Elastic IP with the instance, get the value of Public IP.

  2. Open the Amazon Route 53 console at https://console.aws.amazon.com/route53/.

  3. In the navigation pane, choose Hosted Zones.

  4. Choose the name of the hosted zone for the domain name that you want to use to route traffic to your EC2 instance.

  5. Choose Create Record Set.

  6. Specify the following values:

    Name

    Type the domain name that you want to use to route traffic to your EC2 instance. The default value is the name of the hosted zone.

    For example, if the name of the hosted zone is example.com and you want to use acme.example.com to route traffic to your EC2 instance, type acme.

    Type

    Choose A – IPv4 address.

    Alias

    Choose No.

    TTL (Seconds)

    Accept the default value of 300.

    Value

    Type the IP address that you got in step 1.

    Routing Policy

    Accept the default value, Simple.

  7. Choose Create.

    Changes generally propagate to all Amazon Route 53 servers within 60 seconds. When propagation is done, you'll be able to route traffic to your EC2 instance by using the name of the resource record set that you created in this procedure.