# Records

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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dev7days.gitbook.io/dev7days/aws/route-53/records.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
