Route 53 - Global DNS Flashcards

1
Q

R53 Hosted Zones

A

-A R53 Hosted Zone is a DNS DB for a domain e.g. animals4life.org

-R53 is Globally Resilient (multiple DNS Servers)

-Are created automatically when you register a domain via R53 - can be created separately

-There’s a monthly fee to host each hosted zone, and a fee for those queries made against that hosted zone

-Host DNS Records (e.g. A, AAAA, MX, NS, TXT ….)

-Hosted Zones are what the DNS system references - Authoritative for a domain e.g. Animals4life.org

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

R53 Public Hosted Zones

A

-DNS Database (zone file) hosted by R53 (Public Name Servers)

-Accessible from the public internet & VPCs

-When created, R53 allocates 4 PublicNameServers, and it’s on those names servers, that the zone file is hosted - Hosted on 4 R43 Name Servers (NS) specific for the zone

-To integrate it with the public DNS system, you change the NS records for that domain to point at those 4 R53 NS - Use “NS Records” to point at these NS (connect to global DNS)

-Resource Records (RR) created within the Hosted Zone

-Externally registered domains can point at R53 Public Zone

Architecture

-VPC instances are already configured (if enabled) with the VPC+2 address as their DNS Resolver - this allows querying of R53 public and internet hosted DNS zones

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

R53 Private Hosted Zones

A

-A Public Hosted Zone … which isn’t public

-Associated with VPCs (Only accessible within VPCs)

-Using different accounts is supported via CLI/API

-Split-view (overlapping public & private) for PUBLIC and PRIVATE (INTERNAL) use with the same zone name

-Inacessible from the public internet - Zone cannot be queried outside of associated VPCs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

CNAME vs R53 Alias

A

CNAME

-An “A” record maps a NAME to an IP ADDRESS (catagram.io&raquo_space;> 1.3.3.7)

-CNAME maps a NAME to another NAME (www.catagram.io&raquo_space;> catagram.io)

-CNAME is invalid for naked/apex (catagram.io) (Problem)

-Many AWS services use a DNS Name (ELBs)

-With just CNAME - catagram.io&raquo_space;> ELB WOULD BE INVALID

-For anything that’s not the naked domain, where you want to point a NAME to another NAME, CNAME records are fine

For the naked/apex domain, if you need to point at another name, such as ELBs, you can’t use CNAMEs

ALIAS

-ALIAS records map a NAME to an AWS resource

-Can be used both for naked/apex and normal records ***

-For non apex/naked - you could use CNAMEs or ALIAS

-There is no charge for ALIAS requests pointing at AWS resources

-For AWS Services - default to picking ALIAS ***

-Should be the same “Type” as what the record is pointing at ***

-API Gateway, CloudFront, Elastic Beanstalk, ELB, Global Accelerator & S3 Buckets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Simple Routing

A

-Starts with a Hosted Zone, with Simple Routing, you can create one record per name (www = A)

-Each record using Simple Routing, can have multiple values, which are part of that same record

-When a client makes a request to resolve www, all of the values are returned in the same query in a random order

-The client chooses one of the values, and then connects to that server based on the value

-Use it when you want to route requests towards one single service, such as a web server ***

-Simple to implement and manage

-The limitation is that doesn’t support health checks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

R53 Health Checks

A

-Health check are separate from, but are used by records

-Health ckeckers located globally

-They aren’t limited to just AWS targets - You can check anything which is accessible over the public internet (it just needs an IP address)

-Checks occur every 30s (every 10s costs extra)

-The checks can be: TCP, HTTP/HTTPS, HTTP/HTTPS WITH String Matching (to check the content of the response)

-Based on these Health Checks, end-points are either, Healthy or Unhealthy

-Types of checks:

–Endpoint = These are checks which assess the health of an actual endpoint that you specify

–CloudWatch Alarm = These checks react to CW Alarms, which can be configured separately and can involve some detailed in-OS or in-app tests (if you use the CW Agent)

–Checks of Checks (calculated) = Checks of other checks, so you can create health checks, which check application wide health with lots of individual components

-If 18% of health checkers report as healthy, the health check is healthy

-In most cases an unhealthy record is NOT returned in queries

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Failover Routing

A

-Starts with a Hosted Zone (www), with Failover Routing, we can add multiple records of the same name, a primary and a secondary.

-Each of these records points at a resource

-A common architecture is to use failover for a “out of band” failure/maintenance page for a service (e.g. EC2/S3)

-The health check generally occurs on the primary record, if the target of the health check is “Healthy” the primary record is used

-If it’s “Unhealthy”, then the secondary record of the same name is used

-Use when you want to configure active passive failover **

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Multi-Value Routing

A

-Starts with a Hosted Zone (www), with Multi-Value Routing, you can create many records (www) all with the same name

-Each of the records can have an associated health check, and when queried, up to 8 healthy records are returned to the client. (If more exist, 8 are randomly selected)

-The client picks one of those values and uses it to connect to the resource

-Each record is independent and can have an associated health check

-Any record which fail health checks won’t be returned to the client and won’t be selected by the client, when connecting to resources

-Multi-Value Routing, aims to improve availability. It is NOT a replacement for load balancing **

-Used when you have many resources and you want them all health checked and then returned at random

-Ability to return multiple health checkable IP addresses

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Weighted Routing

A

-Simple load balancing or testing new software versions ***

-Starts with a Hosted Zone with records (www) and they point at IP addresses

-You are able to specify a weight for each record.

-The total weight is calculated (100) = 40 + 40 + 20

-Each record then gets returned based on it’s waiting versus the total weight (40% - 40% - 20%)

-A “0” weight means a record is NEVER returned, unless all are “0” then all are considered

-Each record, it’s returned based on it’s record weight VS total weight

-If a chosen record is Unhealthy, the process of selection is repeated, until a healthy record is chosen

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Latency Routing

A

-Use latency-based routing when optimizing for performance & user experience ***

-Starts with a Hosted Zone with records (www) of the same name and they point at IP addresses

-Each record you can specify a Record Region - www > us-east-1 > A > 1.1.1.1 // www > us-east-2 > A > 2.2.2.2

-Latency-based routing supports one record with the same name in each AWS Region

-In the background, AWS maintains a database of latency between the users general location and the Regions tagged in records. (isn’t real time)

-The record is selected and it’s returned to the user and used to connect to resources

-The record returned is the one which offers the lowest estimated latency & is healthy

-If the record is unhealthy, then the next lowest latency is returned to the client

This type of routing policy, is designed to improve performance for global applications by directing traffic towards infrastructure with the best, so lowest latency, for users accessing that application.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Geolocation Routing

A

-The location of customers and the location of resources, are used to influence resolution decisions

-When you create records, you tag the records with the location - Either “US state”, “country”, “continent” or “default”

-When a user is making a resolution request, an IP check verifies the location of the user (normally the resolver)

-Geolocation doesm’t return the “closest” records, only relevant (location) records

-R53 checks for records 1) in the state, 2) the country, 3) the continent and 4) (optionally) default - it returns the most specific record or “NO ANSWER”

-Can be used for regional restrictions, language specific content or load balancing across regional endpoints ***

-If you’re based in the US, but are based in a different state than a record, you won’t get that record
-If you’re based in the US and there is a record, which is tagged as the US as a country, you will get that record returned
-If there isn’t a country specific record, but there is one for the continent that you’re in, you’ll get that record returned
-The “default” is a catch-all, it’s optional, if you choose to add it, then it’s returned, if you’re user is in a location where you don’t have specific record tagged to that location

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Geoproximity

A

-Aims to provide records, which are as close to your customers as possible

-Latency based routing provides the record, which has the lowest estimated latency between your customer and the region that the record is in

-Geoproximity aims to calculate the distance between a customer and the record, and answer with the lowest distance

-When using Geoproximity, you define rules

So you define the region that a resource is created in, if it’s an AWS (Region) resource or provide the latitude and longtitude coordinates, if it’s an external resource.

You also define a bias, so rather than just using the actual physical distance, we can adjust how R53 handles the calculation. We can define a plus (+) or minus (-) bias. “+” increases a region size and decreases neighbouring regions.

-R53 knows the location of these resources, it also knows the location of the customers making the requests and so it will direct those requests at the closest resource

-Geoproximity routing lets R53, route traffic to your resources based on the geographic location of your users and your resources, but you can optionally choose to route more traffic or less traffic to a given resource by specifying a value (bias).

A bias expands or shrinks the size of a geographic region, that is used for traffic to be routed to.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

R53 Interoperability

A

Means using R53 to register domains or to host zone files, when the other part of that is not with R53. Generally both of these things are performed together, by R53, but it’s possible for R53 just to do one or the other.

-R53 normally has 2 jobs - Domain Registrar and Domain Hosting

-R53 can do BOTH, or either Domain Registrar or Domain Hosting

Let’s step through what happens, when you register a domain using R53:

1st. R53 accepts your money (domain registration fee)

2nd. R53 allocates 4 Name Servers (NS) (domain hosting)

3rd. R53 creates a zone file (domain hosting) on the above NS

4th. R53 communicates with the registry of the TLD (domain registrar)

5th. sets the NS records (animals4life.org) for the domain to point at the 4 NS above

The registrar registers the domain on your behalf, and then another entity provides DNS or domain hosting, which is how you add a manage records within hosted zones. (Both provided by R53)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

R53 - Both Roles

A

R53 Registrar Role (Registered Domain) - R53 DNS Hosting Role (Public Hosted Zone)

1st. Register a domain within R53 (animals4life.org) (You pay the fee, 1 per Y/1 per 3Y)

2nd. R53 Domain Registrar liaises with R53 Domain hosting to create a Public Hosted Zone, which allocates 4 R53 NS to host that zone, which are then returned to the registrar

3rd. Once the registrar has these 4 NS, it passes all of this along through to the .org top level domain registry (TLD). The registry is the manager of the .org top level domain zone file, and it’s via this entity that records, are created in the top level domains zone for the “animals4life.org” domain.

So entries are added for our domain, which point at the 4 NS, which are created and managed by R53. That’s how the domain becomes active on the public DNS system.

-We also have to pay a monthly fee to host the domain, so the hosted zone. (also paid to R53)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Route 53 - Registrar Only

A

R53 Registrar Role (Registered Domain) - 3rd Party Domain Hosting

-We still pay R53 for the domain, they still liaise on our behalf with the registry for the top level domain (TLD), but this time a different entity is hosting the domain, so the zone files and the domain servers.

-Records are managed (3rd Party) and the domain is managed via R53

-So as the DNS admin, you would need to create a hosted zone (3rd Party)

-The 3rd Party provider would generally charge a monthly to host that zone on name servers that they manage

-You would need to get the details of those servers, once it’s been created, and pass those details on to R53

-Then R53 would then liaise with the .org TLD registry, and set those NS records within the domain, to point the name servers managed in this case by the 3rd Party.

(Worst way to manage domains)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Route53 - Hosting Only

A

3rd Party Registrar (Registered Domain) - R53 Domain Hosting

You may see this, when a company needs to register domains via a 3rd party provider or you might have domains which have already been historically registered, with another provider and you want to get the benefit that R53 DNS hosting provides

-The domain is registered via a 3rd party domain registrar

-The 3rd party liaise with the TLD domain registry

-When the domain is being created or afterwards, we have to create a public zone, within R53. This creates the zone and the NS, to host the zone, for a monthly fee.

-Once this has been created, we pass those details through to the registrar, who will liaise with the registry for the TLD and then those NS records, are added to the TLD, meaning the hosted zone is now active, on the public internet.

You can use this architecture either by registering a domain or after the fact by creating the public hosted zone and then updating the NS records, in the domain, via the 3rd Party registrar or the .org registry.

-Using the Registrar, NS records for domain can also be updated AFTER registration, if you decide to host records via R53

17
Q

DNSSEC using Route53

A

DNSSEC strengthens authentication in DNS using digital signatures based on public key cryptography. With DNSSEC, it’s not DNS queries and responses themselves that are cryptographically signed, but rather DNS data itself is signed by the owner of the data.

-Enablink DNSSEC on a R53 hosted zone, is done from either, the R53 console UI or the CLI, and once initiated, the process starts with KMS

-An asymmetric key pair is created within KMS. (Public/Private)

–The Key Signing Keys (KSK) is created from these keys

-These keys are used to create the public and private KSK, which R53 uses, and these keys need to be in US-EAST-1 Region.

-Next, ZSK Creation and Rotation is handled by R53 internally

-Next, R53 adds the KSK and the ZSK public parts, into a DNSKEY record, within the hosted zone

This tells any DNSSEC resolvers which public keys to use, to verify the signatures on any other records, in this zone. (PUBLIC KEY TO VERIFY SIGNATURES)

-Next, the private KSK, is used to sign those DNSKEY records and create the RRSIG DNSKEY record. (PRIVATE KEY TO SIGN)

This signatures mean that any DNSSEC resolver, can verify that the DNSKEY records are valid and unchanged.

-Next, R53 has to establish the chain of trust with the parent zone.

The parent zone needs to add a DS record, or delegated signer record, which is a HASH of the public part of the KSK for this zone.

If the domain is registered via R53: If so, the registered domains area at the R53 console or the CLI command, can be used to make this change. R53 will liaise with the appropriate TLD and add the delefated signer record.

If we didn’t register the domain using R53: We’re going to need to perform this step manually. Once done, the TLD (.org), will trust this domain via the delegated signer record (HASH of the domain’s public KSK)

The domain zone will sign all records within it, either using the KSK or ZSK.

-As part of enabling this, you should also make sure to configure CW Alarms, specifically, create alarms for “DNSSECInternalFailure” and “DNSSECKeySigningKeysNeedingAction” ***

Both of these indicate a DNSSEC issue with the zone, which needs to be resolved urgently, either an issue with the KSK itself or a problem interacting with KMS.

-You might want to consider enabling DNSSEC validation for VPCs - Any invalid resolts on DNSSEC enabled zones WON’T BE RETURNED *** (due to a mismatch signatures or otherwise not being trusted)