How to use Amazon Elastic IP?

I get a new elastic IP, I attach it to an instance, but it doesn't work? I can't ping the IP from my local computer either? Am I missing something here?

  1. How do I use Amazon Elastic IP?
  2. When is a new IP assign to an instance? When I turn it off and reboot?

An EBS-backed instance can be "stopped" as opposed to being "terminated". You won't pay server charges, just storage charges for the EBS boot volume. You can "start" the server again later and all boot volume data will still be there. If, however, the server had an Elastic IP associated with it, that association will be lost when the server is stopped, and you will pay unassociated EIP charges. Also, when you restart the server you will have to manually reassociate the EIP with it.


The default EC2 firewall configuration disallows all traffic from outside of the AWS Cloud, including pings. If you haven't modified your firewall configuration, then you won't be able to ping your hosts. You can enable pings by running something like

ec2auth default -P icmp -t 8:0

(substituting the name of the security group of your EC2 instance for "default")

If you shutdown an EC2 instance, that instance is destroyed; you can't turn off instances and reboot them [*]. So if you do turn off an instance and then start another one, you'll need to associate the Elastic IP address with the new instance.

[*] Unless you're using an EBS-backed instance. I've never used these, so I don't know how they interact with Elastic IP addresses.