1

On AWS console, after clicking an instance, I can use Connect to see what user the instance can be connected with (although this may not be accurate).

For rough estimation, I want to know if I can get this using boto or not (I know I can guess the username based on the popular image/OS).

1 Answer 1

4

There is no direct way to do this. There is no API from EC2 that provides this information. I suppose you could come up with some heuristics based on the underlying AMI that would be right most of the time. For example, lookup the image_id associated with an instance and then look at the name, location, and description values and compare to some table of data and make a guess. As far as I know, nothing like that exists right now.

Sign up to request clarification or add additional context in comments.

3 Comments

Yeah :( wish they would expose this even at the guess level. Thanks.
Its one of many, many bits of metadata that I wish I could get programmatically from AWS. Maybe one of these days.
you can use tags, example: i usually create all instances by tag user = ec2-user by default , exceptionally i rename the user if required.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.