Search⌘ K
AI Features

Custom Domains: Map our Domain to Load Balancers

Explore how to map your custom domain names to AWS load balancers using Route 53. This lesson guides you through creating DNS records, updating CloudFormation templates, and configuring environment variables to provide user-friendly domain access to your applications. By the end, you'll understand how to replace default endpoints with custom domains for better usability and prepare for HTTPS migration.

Objective

  • Access our application from a custom domain.

Steps

  • Map our domain to the load balancers.

Creating a DNS record per stage

Let’s start by adding two new input parameters in our stage.yml to receive the stage domain and subdomain.

YAML
Domain:
Type: String
SubDomain:
Type: String

Then, let’s add a resource to create a Route 53 A record that points <subdomain>.<domain> to ...