Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We're using amazon EC2 and we want to keep track of instaces. Is the Amazon EC2 instance-id unique forever? i.e. If a VM has an instance id of i-12345678 is there a guarantee that when that instance terminates, that instance id won't ever be used again?

share|improve this question
add comment

3 Answers

up vote 13 down vote accepted

I asked Amazon, and this was their answer:

"Instance ids are unique. You'll never receive a duplicate id. However, the current format of the instance id is an implementation detail that is subject to change. If you use the instance id as a string, you should be fine."

It's important to note that you will never receive the same ID twice. However, since you can't connect to other people's instances, this will probably be sufficient.

share|improve this answer
    
And if you get a duplicate instance ID, it is a bug and you should report it to Amazon immediately. –  jtimberman Sep 9 '09 at 7:21
add comment

I think @jedberg's answer is the right one. However, I would also point you to this article: http://www.jackofallclouds.com/2009/09/anatomy-of-an-amazon-ec2-resource-id/

which has a very in-depth analysis (albeit with some guesswork) of how Amazon ID's are constructed. The guy who wrote it doesn't work for Amazon, but you can tell he did his homework :-). IMO it's worth the read just for informational purposes.

share|improve this answer
add comment

I couldn't find anything online, but I wouldn't count on guaranteed uniqueness, even if the current format would accommodate >4 billion IDs.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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