title: Solution for local ip changes of AWS EC2 instances
body: <p>Amazon only gives you a certain number of static ip address and the local (private) ips of each EC2 instance can change when the machine is restarted. This makes creating a stable platform where EC2 instances depend on each other ridiculously hard to use as far as I can tell.</p>
  
  <p>I've search online a lot about various solutions and so far have found nothing reasonable outside of assigning an elastic ip address on ever EC2 even if its not public facing. Does anyone have any other good ideas that is actually easy to execute on?</p>
  
  <p>Thanks!</p>
  
  <p>See the AWS team's response to question <a href="https://forums.aws.amazon.com/thread.jspa?messageID=207526" rel="noreferrer">Static local IP</a>:</p>
  
  <blockquote>
    <p>The internal IP address of EC2 instances is allocated via DHCP. On
    instance shutdown, or when the DHCP lease expires, the IP address is
    returned to the general EC2 DHCP pool of addresses available for other
    instances.</p>
    
    <p>There is no way to guarantee that you will obtain the same DHCP
    address across reboots.</p>
  </blockquote>
  
  <p><strong>Edit:</strong> The answer is to use Amazon VPC. There is no downside except a trivial amount of extra setup because now you control the router. It's a world apart from plain old EC2 instance on AWS. It's so necessary in fact that VPC will be enabled for all future AWS setups by default. See this post for more information: <a href="http://www.reddit.com/r/aws/comments/1a3n0r/ec2_update_virtual_private_clouds_for_everyone/" rel="noreferrer">http://www.reddit.com/r/aws/comments/1a3n0r/ec2_update_virtual_private_clouds_for_everyone/</a></p>