You should have a running instance in your aws account to allocate it an Elastic IP which does not allow your IP to get disconnected from your project.
It provides you with a static IP designed for dynamic cloud. If you don’t have an instance created then you should follow this link to create your own instance – CREATING AN AMAZON INSTANCE
Elastic IP is public IP address that you can allocate to your account and it will be associated to your account unless you release it. It takes some minutes to map your IP address with your Elastic IP address. You can have a maximum of 5 Elastis IPs to your account as IPv4 addresses are limited across. So, it is not necessary that you need Elastic IP for your every instance. You can dissociate an Elastic IP address from a resource, and reassociate it with other different resources. It will associated to your account unless you will release it as told earlier. You are charged on hourly basis for your Elastic IP only when you have dissociated it from your instance but haven’t released it. If you have associated it then you are not charged even a single penny. It is also noted that if you have associated Elastic IP with a stopped instance or an unattached network interface then also you are charged for it.Now, to learn associating, dissociating and releasing Elastic IP to your instance, you can follow up the steps below:
To allocate an Elastic IP and associate it with an Amazon Web Services (AWS) instance, do the following steps:
- Open the AWS Management Console, click the EC2 link.
- In the navigation pane, click the Elastic IPs.
- Click the Allocate New Address and click Yes Allocate.
- Like this it will allocate a new address. Now you have to associate it to your instance.
- Click Actions, a drop-down list appears and then select Associate Address.
- A dialog box will appear. Choose your instance to which you wish to associate your IP.
- Once you have chosen your instance, click Associate.
Now you have allocated and associated Elastic IP to your instance. If you want to Disassociate Address or Release Address you can do so by clicking on Actions as shown in above image.