‫So, let's go into the Route 53 console.
‫And to get started with Amazon Route 53,
‫you need to register a domain.
‫So on the left-hand side, click on Registered domains,
‫but this will cost you money.
‫So if you don't wanna do it, then just watch me do.
‫I'm going to register a domain.
‫And I have to choose a domain name so, stephane-ccp.com.
‫Let's see if someone took it.
‫And no one took it, it's available for me,
‫so I'm going to buy it for 12 dollars a year.
‫I'll add it to my cart and then I will click on continue.
‫Then, I have to register my information,
‫so I'll just do that offline.
‫And then, my order is completed
‫and it will take a bit of time to get processed.
‫So for this, I can go to my domains
‫and I can see the domain registration is in progress.
‫So after a while, maybe ten, fifteen minutes,
‫you will see your domain, stephane-ccp.com
‫and you will see its expiration date and so on.
‫So once you have done this,
‫you go into the left-hand side into Hosted zones.
‫And the hosted zones, you will have one created,
‫which is stephane-ccp.com.
‫And, this is where we're going to place our DNS records.
‫And currently we should only have two DNS records,
‫but we're going to create EC2 instances
‫and then, DNS records to point to them.
‫So, let's go ahead and create EC2 instances.
‫So, I'm gonna go into the EC2 console
‫in the region I'm in right now,
‫which is going to be the Ireland region, right here.
‫And I'm going to create our first EC2 instance
‫that's going to say, hello from whatever the region.
‫So I will launch the instance
‫and then, I will just scroll down
‫where I'm going to be a little bit quicker on this
‫because we've done this before.
‫So, I will proceed without a key pair.
‫I will select create a new security group
‫that allows HTTP traffic.
‫No need for SSH, so HTTP is enough.
‫And then, we're going to scroll down.
‫And under advanced details,
‫we're going to add some user data.
‫And, I will just post this.
‫And instead of hello world from host name,
‫we're gonna say, "Hello world from Ireland". Okay.
‫Next, I'm going to launch this instance.
‫And, we have one instance launching right now
‫in this region.
‫So, I'm going to click on it
‫and I'm going to get the public IP from this instance.
‫So, here it is.
‫And, I'm going to just save this
‫in, in a new file in here, just to have a reference to it.
‫So, Ireland is this IP.
‫And then what I'm going to do is,
‫I'm going to switch regions.
‫So maybe, I'll go to US West two, so Oregon.
‫And, I'm going to do the exact same thing.
‫So, I will launch instances and I will scroll down.
‫Instance type, I will choose a T2 Micro.
‫So as you can see, it's a bit slower.
‫So, this is because we're in a region
‫that's further away from me.
‫So, it's a good example of a latency.
‫I will create a security group again
‫and it will just allow HTTP traffic from anywhere.
‫And for advance details, again,
‫I'm going to copy the user data from before.
‫And this one is going to be "Hello world from the US". Okay.
‫Next, I'm going to launch my instance
‫and go in the console to find it.
‫So now, we have two instances being launched.
‫So, we have one in the Ireland region
‫and one in the US West two region.
‫So, they're further, far away from each other.
‫And, if I go to this first IPV four address and go for it,
‫I get the "Hello world from Ireland".
‫So, this is working just fine.
‫And, I'm going to pause for this instance
‫to start running and get back to you.
‫Now, if I go to this instance
‫and look at the public IPV four address and paste it,
‫I get a "Hello world from the US".
‫So, this is awesome.
‫We have an instance in Ireland and an instance in the US.
‫So now, let's go into Route 53.
‫So, here I am.
‫And, I'm going to actually create records.
‫So, we're going to create our first record
‫and the sub-domain is going to be www.stephane-ccp.com.
‫It's a type of record which is the A type of record.
‫And the value is going to be,
‫the value of my instance in Ireland.
‫So I copy this and paste it, and you need to remove the htp
‫if it does, if it does get copied.
‫And, the routing policy
‫is going to be a Latency based policy
‫because I wanna be routed to the instance
‫that is the closest to me in terms of Latency.
‫So this instance right here, is in the EU-West one region.
‫So I will just type it, EU-West one and I have it.
‫And then, the record ID will say my,
‫my instance from Ireland.
‫And, we can add another record underneath.
‫So again, for www.stephane-ccp.com,
‫same thing as in A record.
‫This time the value is going to be this IP right here.
‫So, I copy it and paste it.
‫And then, the routing policy is again a Latency
‫but this time, the region that this is in
‫is the US-West two,
‫which is Oregon.
‫And, the record is, "My US Instance".
‫Okay. So here, that means
‫that for the www, we have two records.
‫One associated with the US-West region and one
‫with the EU regions.
‫So, let's create these records.
‫And as you can see in here, you can look at the Latency
‫for two of these instances.
‫So now, we should go ahead and test this.
‫So, if I open a new tab and go to www.stephane-ccp.com
‫and press enter.
‫As you can see, I get a "Hello World from Ireland".
‫So, this is the instance
‫that is the closest to me, of course.
‫And if I refresh this page, of course,
‫I'm going to remain on the hello world from Ireland.
‫But if I use a VPN, and this is Nord VPN that I'm using
‫and connect to another country.
‫So for example, the United States.
‫Now, it will look like my connection
‫is coming from the United States, Okay.
‫So, I open a new private window and go to stephane-ccp.com.
‫And as you can see, I get a hello world back from the US
‫because my connection is closest to my US based instance.
‫So, that's it for this lecture.
‫So, we've demonstrated how Route 53 was allowing us
‫to create a record that would basically guide us
‫to the instance that has the least latency versus us, okay,
‫compared to us.
‫So, this is all you need to know for the scope of Route 53
‫at the exam, but of course,
‫if you're going to an associate level exam
‫then you need to learn more about
‫how to use different types of records,
‫what they mean, and so on.
‫So to clean up, just make sure to terminate your instances
‫in the various regions so that you don't have any cost.
‫So, you can terminate this one
‫and you can terminate that one as well.
‫And then also lastly, you can choose if you wanted to
‫to delete the hosted zones, stephane-ccp.com
‫or whatever you have chosen for your domain name.
‫This will cost you 50 cents per month, but no matter what,
‫the domain that you have purchased
‫before will cost you around 12 dollars per year.
‫So if you don't want to pay again 12 dollars next year,
‫please make sure to disable the auto renewal.
‫Okay. So, that's it for this lecture.
‫I hope you liked it and I will see you in the next lecture.