WEBVTT

1
00:00:00.620 --> 00:00:03.060
<v ->Okay, so now let's enable DNS resolutions.</v>

2
00:00:03.060 --> 00:00:06.240
So for this, I'm going to go into my VPC, right click,

3
00:00:06.240 --> 00:00:09.560
and then I can edit DNS hostnames and resolution.

4
00:00:09.560 --> 00:00:11.910
So, we need to enable DNS hostnames.

5
00:00:11.910 --> 00:00:14.340
And this is to indicate whether instances with public IP

6
00:00:14.340 --> 00:00:17.310
addresses get corresponding public DNS hostnames.

7
00:00:17.310 --> 00:00:20.250
So if we go into our EC2 instances and look at the

8
00:00:20.250 --> 00:00:22.773
bastion host, which was a public instance,

9
00:00:23.640 --> 00:00:25.580
it has a public IP forward address,

10
00:00:25.580 --> 00:00:26.980
as you can see right here.

11
00:00:26.980 --> 00:00:29.870
But there is no public IP before DNS.

12
00:00:29.870 --> 00:00:33.210
So what I need to do is just click on this enabled DNS'

13
00:00:33.210 --> 00:00:35.273
name and then save the changes.

14
00:00:36.140 --> 00:00:36.973
So now,

15
00:00:36.973 --> 00:00:41.890
if I go into my management console and refresh this and look

16
00:00:41.890 --> 00:00:43.590
at my bastion host again, as you can see now,

17
00:00:43.590 --> 00:00:47.140
there is an public IP before DNS that is available right

18
00:00:47.140 --> 00:00:49.810
here, which were resolved to make public IP forward address.

19
00:00:49.810 --> 00:00:52.410
So the setting we just enabled, made it work.

20
00:00:52.410 --> 00:00:55.170
And also we can look at edit DNS resolution,

21
00:00:55.170 --> 00:00:57.460
as we can see DNS resolution is already enabled.

22
00:00:57.460 --> 00:01:00.222
That means that our instances will resolve DNS names within

23
00:01:00.222 --> 00:01:01.150
AWS.

24
00:01:01.150 --> 00:01:04.110
So that means that now we can go to the next stage and look

25
00:01:04.110 --> 00:01:06.073
at Route 53 hosted zones.

26
00:01:07.000 --> 00:01:09.220
So now we can create a private one.

27
00:01:09.220 --> 00:01:12.011
So what I'm going to do is going to host the zones,

28
00:01:12.011 --> 00:01:15.470
and I'm going to create a hosted zone.

29
00:01:15.470 --> 00:01:18.373
Now this one is going to be called demo.internal.

30
00:01:21.003 --> 00:01:21.836
And as you can see,

31
00:01:21.836 --> 00:01:23.130
this is a domain name that I don't own,

32
00:01:23.130 --> 00:01:24.760
but because this is a private hosted zone,

33
00:01:24.760 --> 00:01:26.090
I don't need to own this domain.

34
00:01:26.090 --> 00:01:28.880
This just allows my EC2 instances to resolve it.

35
00:01:28.880 --> 00:01:31.430
So I'm going to select a private hosted zone,

36
00:01:31.430 --> 00:01:32.710
and because this is a private hosted zone,

37
00:01:32.710 --> 00:01:35.840
we need to associate it with a specific VPC. So the region

38
00:01:35.840 --> 00:01:40.740
I'm in is EU-Central-1 and the VPC ID is my demo VPC.

39
00:01:40.740 --> 00:01:42.760
So as you can see for each VPC that you associate with the

40
00:01:42.760 --> 00:01:45.720
private hosted zone, you must set the Amazon VPC setting,

41
00:01:45.720 --> 00:01:48.840
enabled DNS host name and enableDnsSupport to true,

42
00:01:48.840 --> 00:01:51.003
which we did in a few minutes ago.

43
00:01:51.890 --> 00:01:53.780
So just remember that if you create this hosted zone is

44
00:01:53.780 --> 00:01:55.945
going to cost you 50 cents per month, just so you know.

45
00:01:55.945 --> 00:01:58.980
So let's create this hosted zone, okay.

46
00:01:58.980 --> 00:02:01.250
It is created. And within they have two records,

47
00:02:01.250 --> 00:02:03.390
but let's create a new record.

48
00:02:03.390 --> 00:02:08.180
And this one is going to be a google.demo.internal,

49
00:02:08.180 --> 00:02:09.880
and it's going to be a C name.

50
00:02:09.880 --> 00:02:14.060
And the value of it is www.google.com.

51
00:02:14.060 --> 00:02:17.330
And this is just to demonstrate as creating a quick record.

52
00:02:17.330 --> 00:02:19.560
So we'll choose a simple routine. Everything is good.

53
00:02:19.560 --> 00:02:23.910
Let's create this record. So this was created successfully.

54
00:02:23.910 --> 00:02:26.080
And now we need to see with our not instances within our

55
00:02:26.080 --> 00:02:28.600
VPC can resolve this hostname.

56
00:02:28.600 --> 00:02:31.683
So let's go into the easy to manage run console,

57
00:02:32.590 --> 00:02:35.900
and then I'm going to connect to my bastion hosts and

58
00:02:35.900 --> 00:02:38.970
connect to it. So this is an instance in my public subnets,

59
00:02:38.970 --> 00:02:42.790
so I can directly SSH into it and I need to install the

60
00:02:42.790 --> 00:02:45.294
decrement. So the decrement is already installed.

61
00:02:45.294 --> 00:02:46.127
So it's it perfect.

62
00:02:46.127 --> 00:02:50.230
And then just dig and then google.demo.internal.

63
00:02:50.230 --> 00:02:53.010
Press enter. And as we can see, we get an answer.

64
00:02:53.010 --> 00:02:56.460
So google.demo.internal is a C name and the value of it

65
00:02:56.460 --> 00:02:59.530
is Google.com and Google.com then corresponds to

66
00:02:59.530 --> 00:03:03.010
Google. And it's an area code with this IP address.

67
00:03:03.010 --> 00:03:06.090
So the really cool thing is that now we are able to create

68
00:03:06.090 --> 00:03:08.810
internal private records for our DNS, thanks

69
00:03:08.810 --> 00:03:11.350
to this things we enabled. And this is Tasha VPC,

70
00:03:11.350 --> 00:03:12.270
and this is really,

71
00:03:12.270 --> 00:03:14.400
really powerful because now we can start creating some very

72
00:03:14.400 --> 00:03:17.500
interesting domain names for our internal applications.

73
00:03:17.500 --> 00:03:19.010
So that's it. I hope you liked it.

74
00:03:19.010 --> 00:03:20.960
And I will see you in the next lecture.

