WEBVTT

1
00:00:00.220 --> 00:00:01.410
<v Instructor>Okay. So now let's view</v>

2
00:00:01.410 --> 00:00:03.850
an advanced use case that comes up a lot in the exam

3
00:00:03.850 --> 00:00:05.750
which is around Hybrid DNS.

4
00:00:05.750 --> 00:00:09.650
So we have our region and there is the Route 53 Resolver.

5
00:00:09.650 --> 00:00:10.483
And by default,

6
00:00:10.483 --> 00:00:12.350
these resolver is going to automatically answer

7
00:00:12.350 --> 00:00:15.560
DNS queries for local domain names for EC2 instances.

8
00:00:15.560 --> 00:00:17.440
So for example, he's our VPC.

9
00:00:17.440 --> 00:00:18.950
We have an EC2 instance.

10
00:00:18.950 --> 00:00:20.400
There is this DNS name.

11
00:00:20.400 --> 00:00:22.840
The Route 53 Resolver knows how to reply

12
00:00:22.840 --> 00:00:24.490
to these queries so this is fine.

13
00:00:24.490 --> 00:00:26.480
Any records in your private hosted zone as well

14
00:00:26.480 --> 00:00:28.130
is going to be easy to answer too.

15
00:00:28.130 --> 00:00:29.940
And records in public name servers.

16
00:00:29.940 --> 00:00:31.600
For example, for a public hosted zone,

17
00:00:31.600 --> 00:00:32.970
or any name server out there

18
00:00:32.970 --> 00:00:35.060
that is public on the internet.

19
00:00:35.060 --> 00:00:37.160
Now, if you want to resolve DNS queries

20
00:00:37.160 --> 00:00:40.730
between your VPC and other private networks,

21
00:00:40.730 --> 00:00:41.850
your own networks,

22
00:00:41.850 --> 00:00:43.370
that has other DNS resolvers,

23
00:00:43.370 --> 00:00:46.080
then you're going to need a Hybrid DNS.

24
00:00:46.080 --> 00:00:48.370
So these networks can be peered to VPC,

25
00:00:48.370 --> 00:00:49.250
for example,

26
00:00:49.250 --> 00:00:51.340
or it could be an on-premises network

27
00:00:51.340 --> 00:00:53.950
that is going to be connected to our VPC

28
00:00:53.950 --> 00:00:57.270
through direct connect or AWS VPN.

29
00:00:57.270 --> 00:00:58.700
So for this, let me introduce you

30
00:00:58.700 --> 00:01:00.660
two concepts that we're going to see

31
00:01:00.660 --> 00:01:02.580
with diagrams in the next slides.

32
00:01:02.580 --> 00:01:05.280
So these are about resolver endpoints.

33
00:01:05.280 --> 00:01:06.330
So there is two things.

34
00:01:06.330 --> 00:01:08.560
There's an inbound endpoint and an outbound endpoint.

35
00:01:08.560 --> 00:01:11.720
So inbound endpoints are allowing DNS resolvers

36
00:01:11.720 --> 00:01:14.190
on your external networks

37
00:01:14.190 --> 00:01:17.800
to forward DNS queries to your Route 53 Resolver

38
00:01:17.800 --> 00:01:19.670
and answer these queries.

39
00:01:19.670 --> 00:01:22.890
So these resolvers will help resolve domain names

40
00:01:22.890 --> 00:01:24.660
for the resources of AWS.

41
00:01:24.660 --> 00:01:26.370
For example, your EC2 instances,

42
00:01:26.370 --> 00:01:28.600
or records that you create in your Route 53

43
00:01:28.600 --> 00:01:29.520
private hosted zones.

44
00:01:29.520 --> 00:01:33.480
So you would get both answers for your internal systems

45
00:01:33.480 --> 00:01:35.880
and also for AWS private hosted zones.

46
00:01:35.880 --> 00:01:36.840
And I will show you a diagram.

47
00:01:36.840 --> 00:01:39.040
It will make a lot more sense very, very soon.

48
00:01:39.040 --> 00:01:42.750
Now your outbound endpoint is to conditionally forward

49
00:01:42.750 --> 00:01:46.785
DNS queries to your on-premises DNS resolvers.

50
00:01:46.785 --> 00:01:48.850
And for this, we're going to create resolver rules

51
00:01:48.850 --> 00:01:50.110
to forward them.

52
00:01:50.110 --> 00:01:51.780
Now we associate these endpoints

53
00:01:51.780 --> 00:01:54.020
with one or more VPCs within the same region.

54
00:01:54.020 --> 00:01:55.850
And we create in two availability zones

55
00:01:55.850 --> 00:01:57.170
for high availability.

56
00:01:57.170 --> 00:01:59.880
Now each endpoint supports about 10,000 queries

57
00:01:59.880 --> 00:02:01.000
per second per IP address.

58
00:02:01.000 --> 00:02:01.970
And if you need more,

59
00:02:01.970 --> 00:02:04.000
well, you create some more IP addresses.

60
00:02:04.000 --> 00:02:07.010
And these resolvers remove the need from before

61
00:02:07.010 --> 00:02:10.920
where people had to run their own DNS resolvers on AWS

62
00:02:10.920 --> 00:02:13.390
and link them to their resolvers on-premises.

63
00:02:13.390 --> 00:02:16.860
Now, these are managed resolver endpoints by AWS.

64
00:02:16.860 --> 00:02:17.930
So let's have a look at a diagram.

65
00:02:17.930 --> 00:02:19.430
It will make a lot more sense.

66
00:02:19.430 --> 00:02:23.100
So let's take an example where we have an EC2 instance

67
00:02:23.100 --> 00:02:24.610
and lives in a VPC.

68
00:02:24.610 --> 00:02:26.540
And we have a private hosted zone that we create.

69
00:02:26.540 --> 00:02:28.860
For example, aws.private.

70
00:02:28.860 --> 00:02:31.660
And we have also an on-premises data center

71
00:02:31.660 --> 00:02:33.180
that has a server.

72
00:02:33.180 --> 00:02:35.280
Now, if you look at the EC2 instance,

73
00:02:35.280 --> 00:02:39.940
I gave it a CNAME of app.aws.private.

74
00:02:39.940 --> 00:02:44.230
Okay, this is a CNAME which is linked maybe to its EC2 DNS,

75
00:02:44.230 --> 00:02:47.100
or it could be an A record linked to its private IP.

76
00:02:47.100 --> 00:02:48.300
It doesn't matter, right?

77
00:02:48.300 --> 00:02:50.310
Now, what's happening is that the server

78
00:02:50.310 --> 00:02:55.150
at web.onpremise.private wants to access this EC2 instance.

79
00:02:55.150 --> 00:02:57.560
And so first, the on-premises data center

80
00:02:57.560 --> 00:03:00.380
and the AWS Cloud are going to be linked

81
00:03:00.380 --> 00:03:03.310
using a VPN connection or direct connect, okay?

82
00:03:03.310 --> 00:03:05.280
Now, we're going to have on-premises,

83
00:03:05.280 --> 00:03:07.550
as well some DNS resolvers for,

84
00:03:07.550 --> 00:03:10.080
obviously, the zone of our on-premises data center.

85
00:03:10.080 --> 00:03:13.830
So they're going to be for the zone onpremise.private.

86
00:03:13.830 --> 00:03:15.700
Now, when the server will issue

87
00:03:15.700 --> 00:03:19.540
a DNS query for app.aws.private,

88
00:03:19.540 --> 00:03:20.907
the DNS resolvers are going to say,

89
00:03:20.907 --> 00:03:22.850
"Hey, you know what? I don't know these."

90
00:03:22.850 --> 00:03:24.580
But what we're going to happen is that we're going to create

91
00:03:24.580 --> 00:03:26.240
a resolver inbound endpoint.

92
00:03:26.240 --> 00:03:27.380
And behind the scenes,

93
00:03:27.380 --> 00:03:30.480
this resolver inbound endpoint has two ENIs,

94
00:03:30.480 --> 00:03:32.350
again, for high availability.

95
00:03:32.350 --> 00:03:35.880
Now these ENIs are associated with private IP addresses.

96
00:03:35.880 --> 00:03:36.930
So what's going to happen is that

97
00:03:36.930 --> 00:03:39.800
within our DNS resolvers on-premises,

98
00:03:39.800 --> 00:03:41.637
we're going to say that for the domain name,

99
00:03:41.637 --> 00:03:43.310
aws.private,

100
00:03:43.310 --> 00:03:46.690
we're going to forward to these two IPS, okay?

101
00:03:46.690 --> 00:03:48.380
And what's going to happen is that now,

102
00:03:48.380 --> 00:03:51.560
the DNS query for app.aws.private

103
00:03:51.560 --> 00:03:54.620
matches this domain name that was configured on-premises.

104
00:03:54.620 --> 00:03:56.637
And therefore, the DNS resolver is going to say,

105
00:03:56.637 --> 00:03:58.870
"Hey, I know I should forward these queries

106
00:03:58.870 --> 00:04:02.120
to a DNS server that has this information."

107
00:04:02.120 --> 00:04:04.370
So it's going to forward them to these IPs.

108
00:04:04.370 --> 00:04:05.720
Now, the resolver inbound endpoint

109
00:04:05.720 --> 00:04:08.850
is linked to the Route 53 Resolver.

110
00:04:08.850 --> 00:04:11.150
And then from the private hosted zone,

111
00:04:11.150 --> 00:04:13.940
we're going to get our final lookup

112
00:04:13.940 --> 00:04:16.740
and give us the final information for this query.

113
00:04:16.740 --> 00:04:18.320
So this is what's called an inbound endpoints

114
00:04:18.320 --> 00:04:20.840
because requests coming from the exterior

115
00:04:20.840 --> 00:04:22.540
and go inbound on AWS.

116
00:04:22.540 --> 00:04:25.340
So on-premises to AWS.

117
00:04:25.340 --> 00:04:28.180
As you may expect, the outbound endpoints are quite similar

118
00:04:28.180 --> 00:04:29.440
but they go the other way.

119
00:04:29.440 --> 00:04:31.720
So we have again the same setup, okay?

120
00:04:31.720 --> 00:04:34.390
But this time, we want to be able to resolve

121
00:04:34.390 --> 00:04:38.600
the DNS names of the on-premises data center.

122
00:04:38.600 --> 00:04:42.257
So our EC2 instance is going to ask our Route 53 Resolver,

123
00:04:42.257 --> 00:04:45.640
"Do you know about web.onprem.private?"

124
00:04:45.640 --> 00:04:47.760
And for this, we're going to create a resolver

125
00:04:47.760 --> 00:04:50.750
outbound endpoint which has two different ENIs.

126
00:04:50.750 --> 00:04:52.600
And we're going to create a forwarding rule

127
00:04:52.600 --> 00:04:53.670
which we're saying, "Hey,

128
00:04:53.670 --> 00:04:55.180
for onprem.private,

129
00:04:55.180 --> 00:04:57.340
here is the target IP.

130
00:04:57.340 --> 00:04:59.610
And this target IP corresponds to the IP

131
00:04:59.610 --> 00:05:02.510
of my DNS resolver on-premises."

132
00:05:02.510 --> 00:05:04.030
So the Routes 53 Resolver

133
00:05:04.030 --> 00:05:05.063
is going to send this to this endpoint.

134
00:05:05.063 --> 00:05:07.820
And the endpoint is going to forward the DNS query

135
00:05:07.820 --> 00:05:10.480
into the on-premises DNS resolver,

136
00:05:10.480 --> 00:05:13.430
and then we will have automatically the response

137
00:05:13.430 --> 00:05:16.410
from the records stored in the DNS

138
00:05:16.410 --> 00:05:18.670
of our on-premises data center.

139
00:05:18.670 --> 00:05:20.590
Now, to manage this outbound endpoint,

140
00:05:20.590 --> 00:05:21.830
we need resolver rules.

141
00:05:21.830 --> 00:05:24.080
So the outbound endpoint is going to set,

142
00:05:24.080 --> 00:05:26.280
to have a set of rules, okay?

143
00:05:26.280 --> 00:05:27.750
And it's going to explain how to forward

144
00:05:27.750 --> 00:05:29.700
DNS queries on your network.

145
00:05:29.700 --> 00:05:30.990
So there's conditional forwarding

146
00:05:30.990 --> 00:05:32.330
which are the forwarding rules.

147
00:05:32.330 --> 00:05:34.087
So the idea is that we're going to say,

148
00:05:34.087 --> 00:05:37.030
"For specific DNS queries and this domain,

149
00:05:37.030 --> 00:05:40.040
please match all of it to a target IP address."

150
00:05:40.040 --> 00:05:41.980
So we can say, "For example.com

151
00:05:41.980 --> 00:05:43.400
or acme.example.com,

152
00:05:43.400 --> 00:05:44.950
here is the target IP

153
00:05:44.950 --> 00:05:48.910
or here are the target IPs for these domains."

154
00:05:48.910 --> 00:05:51.420
You can also override them with the system rule.

155
00:05:51.420 --> 00:05:53.890
And this is to define overriding behavior,

156
00:05:53.890 --> 00:05:55.660
which is saying, "Hey, for a whole sub domain,

157
00:05:55.660 --> 00:05:57.430
do not use these forwarding rules."

158
00:05:57.430 --> 00:05:58.830
This could be something you can create.

159
00:05:58.830 --> 00:06:01.050
And then finally, we have auto-defined system rules

160
00:06:01.050 --> 00:06:04.020
which is for domains that we know are resolved internally.

161
00:06:04.020 --> 00:06:06.800
For example, domain names that are internal to AWS

162
00:06:06.800 --> 00:06:08.440
or private hosted zones.

163
00:06:08.440 --> 00:06:12.980
For example, compute.amazonaws.com or ec2.internal.

164
00:06:12.980 --> 00:06:15.230
Now, in case of multiple rules matched,

165
00:06:15.230 --> 00:06:17.260
the Route 53 Resolver is going to choose

166
00:06:17.260 --> 00:06:18.890
the most specific match

167
00:06:18.890 --> 00:06:20.880
in terms of how to choose which rule to apply.

168
00:06:20.880 --> 00:06:22.230
Okay? So this is it.

169
00:06:22.230 --> 00:06:24.810
This is how you have a Hybrid DNS on AWS.

170
00:06:24.810 --> 00:06:27.150
Remember, inbound endpoints and outbound endpoints

171
00:06:27.150 --> 00:06:30.460
usually are used together to have in and out traffic

172
00:06:30.460 --> 00:06:33.910
from your both DNS systems from AWS and on-premises.

173
00:06:33.910 --> 00:06:36.490
And the exam will ask you about them, for sure.

174
00:06:36.490 --> 00:06:38.240
So that's it for this lecture. I hope you liked it.

175
00:06:38.240 --> 00:06:40.190
And I will see you in the next lecture.

