Configure a custom domain name for your VPC Lattice service
When you create a new service, VPC Lattice generates a unique Fully Qualified Domain Name (FQDN) for the service with the following syntax.
service_name
-service_id
.partition_id
.vpc-lattice-svcs.region
.on.aws
However, the domain names that VPC Lattice provides are not easy for your users to
remember. Custom domain names are simpler and more intuitive URLs that you can provide
to your users. If you'd prefer to use a custom domain name for your service, such as
www.parking.example.com
instead of the VPC Lattice generated DNS name, you can configure
it when you create a VPC Lattice service. When a client makes a request using your
custom domain name, the DNS server resolves it to the VPC Lattice generated domain
name.
Prerequisites
-
You must have a registered domain name for your service. If you don't already have a registered domain name, you can register one through Amazon Route 53 or any other commercial registrar.
-
To receive HTTPS requests, you must provide your own certificate in AWS Certificate Manager. VPC Lattice doesn't support a default certificate as a fallback. Therefore, if you don't provide an SSL/TLS certificate corresponding to your custom domain name, all HTTPS connections to your custom domain name will fail. For more information, see Bring Your Own Certificate (BYOC) for VPC Lattice.
Limitations and considerations
-
You can’t have more than one custom domain name for a service.
-
You can’t modify the custom domain name after you've created the service.
-
The custom domain name must be unique for a service network. This means that a service can't be created with a custom domain name that already exists (for another service) in the same service network.
The following procedure shows how to configure a custom domain name for your service.
Associate a custom domain name with your service
First, if you haven't already done so, register your custom domain name. The Internet Corporation for Assigned Names and Numbers (ICANN) manages domain names on the internet. You register a domain name using a domain name registrar, an ICANN-accredited organization that manages the registry of domain names. The website for your registrar will provide detailed instructions and pricing information for registering your domain name. For more information, see the following resources:
-
To use Amazon Route 53 to register a domain name, see Registering domain names using Route 53 in the Amazon Route 53 Developer Guide.
-
For a list of accredited registrars, see the Accredited Registrar Directory
.
Next, use your DNS service, such as your domain registrar, to create a record to route queries to your service. For more information, see the documentation for your DNS service. Alternatively, you can use Route 53 as your DNS service.
If you're using Route 53, you can use an alias record or a CNAME record to route queries to your service. We recommend that you use an alias record as you can create an alias record at the top node of a DNS namespace, also known as the zone apex.
If you're using Route 53, you must first create a hosted zone, which
contains information about how to route traffic on the internet for your domain.
After you create the private or public hosted zone, create a record such that
your custom domain name, for example parking.example.com
, is mapped to
the VPC Lattice auto-generated domain name, for example,
my-service-02031c045478f6ddf1.7d67968.vpc-lattice-svcs.us-west-2.on.aws
.
Without this mapping, your custom domain name won't work in VPC Lattice.
The following procedures show how to create a private or public hosted zone using Route 53