Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to set up an EC2 spot instance with an elastic IP. Here's the catch: if a spot instance is interrupted and resurrected later,

  1. Is the ip reassociated to the new instance?
  2. Am I billed for the offline period when the ip address was not associated to any machine?
share|improve this question

closed as off topic by music2myear, Daniel Beck, Ƭᴇcʜιᴇ007, random Mar 21 '12 at 16:48

Questions on Super User are expected to relate to computer software or computer hardware within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Is this question perhaps better addressed on the WebApps site? –  music2myear Feb 22 '12 at 18:03
1  
sigh I started at StackOverflow and my question was closed there... can I let it sit here for a while, maybe someone will throw me a bone? –  Dan Feb 22 '12 at 18:08
1  
It should have been moved automatically instead of being closed. I've only voted for it to be moved, which looks like a close, but isn't. It'll take a few more votes to actually move. Just sit tight and we'll get the question where it'll have the best chance of being answered by someone best qualified to do so. –  music2myear Feb 22 '12 at 18:22
    
@Dan: Presumably you are talking about a persistent spot instance request (rather than one-time only)? –  Steffen Opel Feb 22 '12 at 18:29
    
@SteffenOpel indeed. –  Dan Feb 22 '12 at 18:41

2 Answers 2

up vote 2 down vote accepted

The information supplied in bwight's answer is correct (+1) - here are a couple of details to back it up:

There is a respective FAQ at the the end of the Feature Guide: Amazon EC2 Elastic IP Addresses, see If an instance re-starts does the mapping of ElasticIP Address become invalid?:

A reboot or restart of an instance has no impact on the mapping of an Elastic IP to it. However, terminating an instance will remove the mapping and the Elastic IP will then be charged for each full hour it is not mapped to another instance. [emphasis mine]

Spot instances are simply terminated, no different then terminating a regular instance yourself or being terminated by AWS due to a hardware failure, see point 2) in section How Spot Instances Work within Amazon EC2 Spot Instances:

If you’re running Spot Instances and your maximum price no longer exceeds the current Spot Price, your instances will be terminated.

The charge only applies after the first full hour of being unattached, as detailed within the IP Information FAQ, see Will I be charged for the time when my IP address is unattached because my instance failed?:

You are not charged until your Elastic IP address has been unattached for a full hour. As long as you are monitoring your instances, you will have plenty of time to reattach your instance before the charge is metered.

While this applies to a slightly different scenario and instances in general, the following FAQ hints on respectively identical behavior for your spot instance scenario, see Will I be charged if my Spot Instance is terminated by Amazon EC2 before the hour is up?:

No. If the Spot Instance is terminated by Amazon EC2, you will not be charged for a partial hour of usage. However, if you terminate the instance yourself, you will be charged for any hour in which the instance ran.

I'd be surprised if AWS would apply a different pricing model for your scenario specifically, in particular given the comparatively small amount involved as well as the actual intention of pricing being unrelated to cost, see Why am I charged when my Elastic IP address is not associated with an instance?:

In order to help ensure our customers are efficiently using the Elastic IP addresses, we impose the $.01/hr charge for each address when it is not mapped to an instance.

share|improve this answer

The elastic ip is not re associated with the resurrected instance and yes amazon charges a small fee while the ip is not attached to the instance.

share|improve this answer
    
could you please supply an authoritative link? thanks! –  Dan Feb 23 '12 at 8:56
    
aws.amazon.com/ec2 $0.01 per non-attached Elastic IP address per complete hour. Looking to see if they say anywhere in their docs that it will not associate upon launching a new instance. I know this as a fact though as i've seen it happen. –  bwight Feb 23 '12 at 14:21
    
docs.amazonwebservices.com/AWSEC2/latest/UserGuide/… addition, stopping the instance also disassociates the Elastic IP address from it. To ensure our customers are efficiently using Elastic IP addresses, we impose a small hourly charge when these IP addresses are not mapped to an instance. –  bwight Feb 23 '12 at 14:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.