Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is a static IP address permitted on the Amazon Elastic Cloud Computing (EC2) service?

We are planning to have an application run on Amazon's cloud which requires a static IP address for it to work. However it appears from Amazon's documentation that static IP addresses are NOT allowed...

http://aws.amazon.com/ec2/#features --> Elastic IP Addresses

http://developer.amazonwebservices.com/connect/message.jspa?messageID=65389

Allen / Posted: Aug 3, 2007 7:30 AM PDT in response to: Steve Isaacson ...

The machine's external IP address is essentially a static address. You will have it until your instance is terminated or until Amazon needs to renumber its network. This could be months or years from now, which in this day and age, is about as static as it gets.

http://docs.amazonwebservices.com/AmazonEC2/dg/2006-06-26/TechnicalFAQ.html#d0e7741

8.12. Can I use a static IP address in my instances?

No. Your image must be configured as a DHCP client and it will be assigned an IP address.

This however confused me a little bit: http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1346 --> Introduction

Elastic IP addresses are static IP addresses designed for dynamic cloud computing. An Elastic IP address is associated with your account, not a particular instance, and you control that address until you choose to explicitly release it. Unlike traditional static IP addresses, however, Elastic IP addresses allow you to mask instance or availability zone failures by programmatically remapping your public IP addresses to any instance associated with your account. Rather than waiting on a data technician to reconfigure or replace your host, or waiting for DNS to propagate to all of your customers, Amazon EC2 enables you to engineer around problems with your instance or software by programmatically remapping your Elastic IP address to a replacement instance.

Is there a way that a machine instance can have a static IP address linked to it?

like image 871
RubiCon10 Avatar asked Dec 13 '22 20:12

RubiCon10


2 Answers

In AWS-EC2 Console you can associate a Elastic IP. This is a static IP that is dedicated for you. When the Elastic IP is not associate to a instance you pay for it.

No cost for Elastic IP addresses while in use

$0.01 per non-attached Elastic IP address per complete hour

$0.00 per Elastic IP address remap – first 100 remaps / month

$0.10 per Elastic IP address remap – additional remap / month over 100

This IP you can assign to your running EC2 instance.

See setup dialog: alt text

like image 128
amra Avatar answered Jan 22 '23 20:01

amra


Elastic IP is the right thing to do for static IP. Whereas individual instances are configured via DHCP, and could technically be assigned a new IP address, your elastic IP never changes.

The elastic IP address is effectively a second address that you can assign to your instance alongside the one assigned via DHCP. One useful feature of elastic IP is that you can reassign it to a different instance transparently: if one of your instances fails, you can reassign the elastic IP address to a replacement instance with a single command.

like image 44
Tim Robinson Avatar answered Jan 22 '23 18:01

Tim Robinson