开发者

How to list my EC2 instances and get their private ip's

I'm starting to use EC2 with a lot of SPOT instances (>100), I'm trying to f开发者_Python百科ind a way to retrieve all my IC2 instances private ip's in order to use them later to deploy binaries and so on.

Can anyone help me to do it?

Thanks in advance.


Since you didn't list a framework or language:

  1. Use the AWS Console.
  2. Use ElasticFox.
  3. Use the commandline tools.
  4. Use the .NET SDK.
  5. Use the Java SDK.


Amazon will start and stop spot instances without your involvement but based on your spot instance request parameters. Because of this, the list of spot instance IP addresses you query at time A might not be accurate at time B.

Problem 1: You think IP address A is one of your spot instances, but in the interim Amazon has terminated your spot instance and started somebody else's instance using the same private IP address. You'll want to make sure that an instance you are contacting is really yours before you pass it anything sensitive or trust any answers it gives you.

Problem 2: In the time since you got the query results, Amazon has started new spot instances for you based on the spot price. When you go to "deploy binaries and so on" you could miss some of the instances leaving them in unstable or out-of-date states.

You might consider having the spot instances configure and update themselves when they start up, and perhaps on regular intervals.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜