I've set up Magento web on an aws ec2 instance for development & testing.

I was able to access it by putting a host entry on my local machine using the public IP. But then I changed it to an elastic IP and even after updating my local host entry I could not access the site.

Any idea why this could be happening.

Also what is the real benifit of elastic IPs, as far as I can tell is they are easy to assign to new EC2s if they one of you them go down? Do EC2s fail alot and need to be replaced?

I'm very new to server config and AWS and come from more of a web dev background.

The EC2 instance has ubuntu 14.04 OS and is running on an NGINX server. I have set up a vhost/nginx config file serve the site from another directory than the nginx default as the plan to have to sites running on this server for development and testing purposes, i.e. development & staging sites.

1 Answer 1


Elastic IP addresses give you a consistent IP address whereas the auto-assigned public IP addresses will change as you stop and restart your instance.

Do EC2s fail alot and need to be replaced?

EC2 instances don't fail often. But if they do, you'll wish you were using an Elastic IP address otherwise you'd have to update your DNS and wait for the old DNS entries to expire. So it's really a "just in case" type of thing.

There are many uses for Elastic IP addresses. Here are some:

  1. As you say, if a server fails, then you can create a replacement server and move the Elastic IP address.
  2. If you are deploying using a blue/green deployment strategy, then you can swap Elastic IP addresses with zero downtime.
  • Thanks @Matt, that explains it well. Still don't understand why I could not access the site with the elastic IP in my host entry while I can when I'm using just a public IP.
    – Holly
    Jun 25, 2015 at 8:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .