Adding Elastic IP to your AWS EC2 instance

Share post:

Why you may need a static IP address for EC2 instance

This article explains how to add an Elastic IP to your AWS EC2 instance and why this is so important.

The problem with EC2 instances is when they are resized or rebooted the public IP address is changed.

This causes a lot of problems for a web server since DNS records point to a certain IP address and even if they automatically get updated (for example for subdomains) it still takes some time, which results in downtime for your service.

Also you might want server's IP address static if it calls 3rd party APIs and you need to whitelist its IP address. Elastic IP address will be used when server is making outgoing connections.


In order to be able to do what is described in the article you should have all of the following: - Create an account in - Make sure you have credentials set for AWS (For personal accounts or if you are setting it up for a team - in team's settings AWS Connect).

How to add Elastic IP Address to the instance

First create an EC2 instance through Appliku dashboard.

Select a region and an EC2 instance type and click "Create Instance" button.

You will be redirected to the server page.

Wait until server is provisioned and server setup is complete. Refresh the page if you don't see any changes. If "Server Setup" says "Error" check the tab Setup Logs and try to create another instance.

Click on the link "Manage Server in AWS Panel"

You will see the page with your instance. Tap on the Name column of the instance to select it and observe the current public IPv4 address of the server.

In the left sidebar find and click on "Network & Security -> Elastic IPs".

On the "Elastic IP Addresses" page click "Allocate Elastic IP Address" button.

On the "Allocate Elastic IP Address" page make sure Amazon's pool of IPv4 addresses radio button is selected and click "Allocate" button.

You will be taken to the list of Elastic IP addresses.

Make sure the address you have just created is selected and from "Actions" menu click "Associate Elastic IP Address".

You will be taken to the page "Associate Elastic IP address".

Make sure that "Resource type" is set to instance. From the instance dropdown select the instance we created through Appliku dashboard and click "Associate" button.

You will be taken bacl to list of Elastic IP addresses.

You can see now that IP is associated with the instance we selected.

Go back to Appliku dashboard with the details of the server. Refresh it and you will see that server's ip address is now same as the elastic IP address.

Go to Run tab and run the following command:

curl ''

You will see that the returned IP is our new Elastic IP, which means it is used for outgoing connections.

Share post: