All right in this video let's see how to configure the elastic IP address right so this one here and it's
a very simple thing.
It's a two step process.
The first step is to allocate so we allocate which means we request AWS to issue an
elastic IP address to our account.
Right so this is always allocated to our account which means that we can attach this elastic IP address
or associate the elastic IP address with any server in this region.
OK.
this is at an account.
level not really allocated to a particular server.
OK.
So once we allocate the elastic IP we have the elastic IP right but it's lying in an orphaned state right.
Not really associated with any particular server.
So then we go and then we associate the elastic ip with.
with our server.
Right.
And then you'll notice by the way that once the elastic IP is associated with the instance the public
IP address that we that we had will go away this will
be removed.
And the elastic IP address will take its place because remember the elastic IP address also is a public
IP address.
Right.
And the idea is since you have an elastic IP address already.
Right.
Why do we have to have another one.
Why do we have to have another one.
And remember these are IPv4 addresses which are very scarce right.
So that's why it will remove the public IP address and and then you'll be using only the elastic IP
address.
OK so let's do this let's see how to do this.
First we will allocate.
This will be the step one second we will associate the elastic IP address with the EC2 instance.
And third we also verify that the public ip address has gone away.
And the elastic IP address has taken its place and we can maybe verify our application as well using
using the elastic IP address.
Ok so lets see how to do these three steps.
OK.
So here's the management console right.
And this is the EC2 instance and you can see this is the IP address public IP address.
Right now there's no elastic IP address associated with this instance.
Right.
And we can verify the application using the public IP address of the server of this instance.
At the moment.
Right.
OK.
Now we want to change that.
So let's go to elastic IP addresses under network and security and the first step is to allocate which
means we request for an elastic IP address at an account level.
Right.
And you can see we are allocated an IP address.
And this is in an orphaned state.
It's not really attached to any particular instance at the moment.
Right next we associate which means we can select the IP and we can say associate and then we can select
any instance in this region we can select any instance of this region to associate this elastic IP address
with.
So we just have one instance right now.
So let's select that one.
And this is how we can associate.
So.
So that's step number two is done.
Let's now verify so if you if you go back to the instance you will notice that the Elastic IP field now has
some value.
Right this is the elastic IP address and at the same time we notice that the public IP address we had
has has gone .
It has gone away and has in fact been replaced by the elastic IP address.
OK.
So.
So you will see that this will this will not work.
To try to test the application using the public IP address.
It will no longer work.
All right so so let me copy the elastic IP address and and let me use this IP address instead of the
public IP address.
Right.
And verify our application.
Now you can see the application is available on the elastic IP address ok in a similar manner.
You can also test your S-sh connection.
By the way.
So even the S-sh connection now has to be made using the elastic ip.
OK so the same thing that we did with the public IP except we will be using the elastic IP instead
of the public ip address.
So so now we can see you're able to S-sh to the server using the elastic IP.
address.
All right.
So in this video just to summarize.
What we've done is we have allocated first at an account level an elastic IP address and then we have
associated it with our EC2 instance.
And when we do that we find that the elastic IP address replaces the public IP address.
Right.
And going forward we have to use elastic IP address for testing the application via the browser or even
for our S-sh connection.
OK.
So so good luck with this task.
'[AWS] > Highly Available, Scalable, AWS Stack' 카테고리의 다른 글
13. Recovery: Instance failure (0) | 2022.01.18 |
---|---|
12. Prep for recovery: Create AMI & EBS snapshot (0) | 2022.01.18 |
10. Prep for recovery: Configure MySQL to use data volume (0) | 2022.01.18 |
9. Prepare for recovery: Configure data volume (0) | 2022.01.18 |
8. Install MySQL server on EC2 instance (0) | 2022.01.18 |
댓글