> For the complete documentation index, see [llms.txt](https://dev7days.gitbook.io/dev7days/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev7days.gitbook.io/dev7days/aws/route-53/records.md).

# Records

Describe about DNS Record

For record is the configuration that we need to configure about how you want to route traffic for a domain.

Eache Record contains:

* Domain/ Subdomain name -> example.com
* Record Type: A or AAAA
* Value: 12.34.56.78 (IP)
* Routing Policy (How Route 53 responds to queries
* TTL (Time of record cached at DNS resolver)

There are many `Record Types` **.**

1. Type `A`
2. Type `AAAA`
3. Type `CNAME`
4. Type `NS`
5. Type `Alias`

## Record Type

### (1) Type A

It maps a hostname to IPv4.

### (2) Type AAAA

It maps a hostname to IPv6.

### (3) Type CNAME

It maps a hostname to another hostname and target must have A or AAAA record. It is not able to create for `example.com` and  but able for `www.example.com`

e.g map our domain to load balancer domain.

### (4) Type NS

It maps a hostname to another Name servers for `Hosted Zone` or `Another Name Server`.

### (5) Type Alias

It maps a hostname to an AWS resource except EC2 DNS name. It similar to `CNAME` but it is able to create for **Root Domain(example.com)** and **Non Root Domain([www.example.com](http://www.example.com)).** Moreover It still has health check feature.  The drawback is you are not able to set TTL for it.

## Record TTL

There 2 usecases

1. Low TTL = If the browser has a less ttl then we can ensure the records is up to date but we will have a lot of traffic to Route 53 instead.
2. High TTL = If the DNS updated the data then browser still is not able to access because it still use cache data.
