Routing traffic to an AWS App Runner service (original) (raw)

AWS App Runner is a fully managed service that makes it easy for developers to deploy containerized web applications and APIs at scale and with no prior infrastructure experience required. Start with your source code or a container image. App Runner builds and deploys the web application automatically, load balances traffic with encryption, scales to meet your traffic needs, and makes it easy for your services to communicate with other AWS services and applications that run in a private Amazon VPC. With App Runner, rather than thinking about servers or scaling, you have more time to focus on your applications. For more information, see What is AWS App Runner in the_AWS App Runner Developer Guide._

Important

Amazon Route 53 currently supports alias records for AWS App Runner services that are created after August 1, 2022.

To route domain traffic to an App Runner Service, use Amazon Route 53 to create analias record that points to your App Runner service. An alias record is a Route 53 extension to DNS. It's similar to a CNAME record, except you can create an alias record both for the root domain, such as example.com, and for subdomains, such as www.example.com (http://www.example.com/). You can create only CNAME records for subdomains.

Note

Route 53 doesn't charge for alias queries to App Runner service or other AWS resources.

Prerequisites

To get started, you need the following:

Configuring Amazon Route 53 to route traffic to an App Runner service

To configure Amazon Route 53 to route traffic to an App Runner service, perform the following procedure.

To route traffic to an App Runner service
  1. Open the Route 53 console athttps://console.aws.amazon.com/route53/.
  2. In the navigation pane, choose Hosted zones.
  3. Choose the name of the hosted zone that matches the name of the domain that you want to route traffic for.
  4. Choose Create record.
  5. Specify the following values:
    Routing policy
    Choose the applicable routing policy. For more information, see Choosing a routing policy.
    Record name
    Enter the domain name that you want to use to route traffic to your App Runner service. 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 App Runner service, enter acme.
    Value/Route traffic to
    Choose Alias to App Runner Service, then choose the AWS Region. Choose the domain name of the environment that you want to route traffic to.
    Record type
    Accept the default value, A – IPv4 address.
    Evaluate target health
    Accept the default value of Yes.
  6. Choose Create records.
    Changes generally propagate to all Route 53 servers within 60 seconds. When propagation is done, you'll be able to route traffic to your App Runner service by using the name of the alias record that you created in this procedure.