In this post, we will discuss different types of IPs used by AWS. And how to create an Elastic IP in AWS.
AWS offers three types of IP addresses.
- Public IP
- Private IP
- Elastic IP
By using public IP we can access our instance from anywhere on the internet.
By using private IP we can only access our instance within the same VPC.
Public IPs, however, change if an instance is restarted, so we cannot use them. Therefore, the website may be unavailable. Your instance can no longer be accessed using your old IP address.
So to solve that problem we use Elastic IP.
Elastic IPs are public IP addresses you can assign to your AWS account. You can associate this elastic IP with any EC2 instance, disassociate from one instance, then reassociate.
It won't change after you restart the instance because of it's static nature.
So the website won't face downtime.
HOW TO CREATE AN ELASTIC IP IN AWS.
-First create an instance
-Then select Elastic IP in Network & Security
-Now select Allocate IP address and Associate IP.
-Go to Associate IP and select the instance to which you want to allocate the Elastic IP, Leave everything as it is and click on Associate.
-Now you can see the Elastic IP and the public IP of instance are same.
You are done. Now restart the server. You will notice the IP won't change.
Hope you like it:>
Top comments (0)