So let's get started.
And before we use route 53
I want to go ahead and create three EC2
two instances in different regions, as well as one ALB.
So in one of these regions
I'm going to go into instances and then launch an instance.
And very simply, I will choose Amazon Linux 2
on this architecture, a t2 micro type of instance.
I don't need a key pair because I will use, if I need to
I will use easy two instance connect.
And then for network settings
I'm going to create a security group.
I will allow SSH as well as HTTP from anywhere.
Then I will just in advanced details
specify a bootstrap user data script.
So to do so, just go into your route 53 user data sh script
and you copy this entire script and you paste it here.
So what it is going to do is say
Hello World from the instance just as before.
But now we're going to add the AZ the
instance was launched in.
Using this environment verbal called
EC2 availability zone that I created from before.
So it's going to gave us a little bit more info
about EC2 instance.
So I'm going to go ahead and launch this instance.
So this has been launched and it is right here.
Okay. That's good.
Next, I'm going to go into another region, for example
Northern Virginia.
So U.S. east one, and then I will launch an instance
and same settings.
So again, no key pair required.
So proceed with other key pair.
I will allow HTP as well.
And for advanced details, I will provide the exact
same easy two user data script.
Then we click on launch instance and we're good to go.
And finally, I'm going to go into one last region
for example, Singapore, and
in Singapore, I'm going to
launch an instance
And then we'll leave it as t2 micro.
We will choose no key pair.
We'll allow HTP from anywhere.
And then under advanced details
I'm going to paste in the data and launch this instance.
Okay. So we have three instances now being started
in three different regions.
So we have one in Frankfurt
one in Northern Virginia and one in Singapore.
So this is good.
Lastly, what I'm going to do is I'm going to
launch a load balancer in Frankfurt, for example.
So here I'm going to create a load balancer
and choose an application load balancer.
Creates.
And then the unique name will be demo route 53, ALB.
This is fine.
It's going to be internet facing on IPv4.
I will choose format one, two, and then three subnets.
And for security group, I can choose up to five.
So I'm going to choose the one that I've created just
from before, which was the launch wizard two
which had at such N HTP enabled.
This way we're sure that HTP is enabled and
the protocol is on 80.
You're going to forward to a new target group
that we're going to have to create based on instances.
And I'll collect this one demo TG route 53.
And what I want to do is next
and register my one instance right now
that I just created from before.
So you do include as pending
below then on the review targets
you have one target and then create the target group.
So the target group is not created.
So back into my load balancers
I can refresh this and select the demo TG group route 53
and everything looks good.
Let's create our load balancer
and then click on viewer balancer.
And here we go.
So now to summarize, let's see
if everything has been working properly.
So we have one situ instance right here
and let's tag the public IP.
So I'll just copy the IP itself
make sure using the IP via HTP.
And it says, hello world from blah blah.
So this is good.
So what I'm going to do is that I'm going to
under a text file just to have a mark of
a trace of everything.
I'm going to put the IP address as well
as the region I'm in.
So EU central one as you can see it says
hello from a AZ eu-central-1b.
Okay. So this instance is working.
I'm just testing where, whereas everything's working.
So I'm going to also take this public IP right here
paste it in.
And it says, yes. Hello from us-east-1a.
So this is perfect.
So this is us-east-1.
And the last instance right now, it's here.
And then I'm going to copy this.
IPv4, address paste it in
and it says hello from AP-southeast-1b.
So this was working as well.
So let's go here, AP-southeast-1.
And finally, if I go under my ALB
and take the DNS name right here and let's see
if it has been provisioned, so let's refresh this.
So it is provisioned as we can tell.
So this can take a bit of time.
So for you, it may not work for, for me, it worked.
And so, because it is pointing to one is to instance,
it says Hello World from AZ eu-central-1b.
So now we have properly set up
all our instances as well, our GNS.
So we're good to go
and keep this information handy and I will see you.
In the next lecture.