When mapping an AWS resource (e.g., Load Balancer, CloudFront) to a domain, you have two options:
Understanding when to use each is crucial for DNS management in AWS.
A CNAME (Canonical Name) record allows you to map a domain name to another hostname.
app.mydomain.com → blabla.anything.com
Here, app.mydomain.com points to another domain instead of an IP address.
mydomain.com → something.amazonaws.com (Not allowed)
✅ app.mydomain.com → something.amazonaws.com (Allowed)Alias records are AWS-specific DNS records that allow mapping directly to AWS resources.
✔️ Can be used at both root domains and subdomains
✔️ No additional cost (unlike CNAME queries)
✔️ Supports AWS services (e.g., ALB, CloudFront, S3 Websites)