An advantage of using Amazon Elastic Compute Cloud (EC2) is the ability to start, stop, create, and terminate instances at any time. However, this flexibility creates a potential challenge with IP addresses. Restarting a stopped instance (or re-creating an instance after another instance is terminated) results in a new IP address. How do you successfully reference a machine when the IP address is constantly changing?
In response to this problem, Amazon offers the ability to allocate an Elastic IP address. An Elastic IP provides you a single IP address that you can associate with different EC2 instances over time. If your EC2 instance has an Elastic IP and that instance is ever stopped or terminated, you can immediately associate a new EC2 instance with the Elastic IP. Your existing applications will not break because the applications see the IP address they were expecting, even though the back-end EC2 instance has changed.
If you're building your own site manually, you should associate an Elastic IP with your enterprise geodatabase instance if you have the geodatabase on its own dedicated instance. Optionally, you can also associate an Elastic IP with your ArcGIS Server instance if you are not already using an Amazon Load Balancer.
If you use ArcGIS Server Cloud Builder on Amazon Web Services to build your site, no Elastic IPs are created. If you want to use SSH or Remote Desktop Connection to connect to instances within your site, you need to create an Elastic IP and assign one to each instance.
If you ever need to stop an instance, you should reassociate it with its Elastic IP after you start the instance again. You can even associate the Elastic IP with a backup instance while the other instance is down. If you don't have an Elastic IP, users' connections to your machines will permanently break if you ever have to stop the instance.
An Elastic IP is not the same as an Amazon Load Balancer. An Amazon Load Balancer helps you scale out your site by associating many EC2 instances at the same time under one web address. An Elastic IP, on the other hand, can only be associated with one EC2 instance at a time.
To allocate an Elastic IP and associate it with an Amazon Web Services (AWS) instance, do the following:
- Open the AWS Management Console, click the EC2 link, and display the page associated with your region.
- Click the Elastic IPs link in the EC2 Dashboard.
- Click Allocate New Address and choose VPC or EC2 from the drop-down list, depending whether you're going to associate this IP with an instance in Amazon EC2-Virtual Private Cloud (VPC) or Amazon EC2-Classic, respectively. Click Yes, Allocate to confirm your choice.
- Right-click the newly created Elastic IP and choose Associate Address.
- Choose your desired EC2 instance from the drop-down list of running instances and click Associate.