Instance ID uniqueness

0

I would like to get some clarifications on the uniqueness of Instance IDs. From the docs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html) it says: "we assign each resource a unique resource ID."

I just want to clarify the following:

  • If an instance is terminated, can that Instance ID be used again in the same AWS account?
  • Are Instance IDs unique across all regions in the same AWS account?
idris
已提問 1 年前檢視次數 794 次
1 個回答
0
已接受的答案

Instance IDs are uniquely generated globally, which means for every region and for every account, and are unable to be reused again. So to answer your questions specifically:

  1. No, that same ID cannot be used again.
  2. Yes, and even across all accounts.
profile pictureAWS
已回答 1 年前
profile pictureAWS
專家
已審閱 1 年前
  • Great, thank you for clarifying

  • Just curious. How does the service(Not just for Instances and not just EC2) manage to create a globally unique IDs every single time?

    Lets say there's a small service somewhere doing this job of generating IDs that are unique. Does this service have to look at all the previously used IDs before returning a new one? If Yes, how does it do this so fast? OR Does it simply apply some transformations to a set of known values such as [AccountID, Region, CreationTimestamp, etc.] and hope for the output to be globally unique? OR Is there some other magic happening. (PS: I have no experience with development)

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南