EC2 instances, by default, are assigned random public IP addresses. An "Elastic IP" allows us to reserve an IP address for ourselves, as "associate" it with any of our EC2 instances.
When a CloudWatch alarm recovers an EC2 instance, it actually creates a new EC2 instance, but uses back the old EC2 instance's EBS volume, the instance ID and private IP address. The "Elastic IP" is "associated" with the instance ID. Thus, the public IP is preserved in the recovered EC2 instance.
On with the actual work..
 |
| "Services", "EC2", "Elastic IPs", "Allocate new address". |
 |
| "Allocate". |
 |
We do not get to choose the IP address. Amazon will assign an IP address to us.
Click "Close". |
 |
| "Associate address" (with an EC2 instance). |
 |
Select the Instance ID of the client's EC2 instance.
(Notice how the "Name" of the instance can be used to help us identify it more easily.) |
 |
| "Associate" (the Elastic IP with the chosen EC2 instance). |
 |
| Click "Close". |
 |
| This is what it looks like when it is done. |
 |
| If we look at the EC2 instance itself, it now has an "Elastic IP" which is the same as its public IP. |
Next, some Plesk configuration.
Part 4 - Plesk Configuration
Single EC2 Instance - Table of Contents