Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way for a running instance, via the meta-data facility to find out the ec2 account name that the instance is running under?

Looking up the meta-data service yields the following items we can query:


None of which satisfy this - any ideas?

share|improve this question
up vote 1 down vote accepted

Pass the EC2 account data you need as user data to the instance. You can retrieve the user data passed to an instance by running curl on the instance.

share|improve this answer
yeah already using that - but would be nice if it was automatic - but user data works fine. – Michael Neale Jul 16 '10 at 5:19
is userdata only settable when you create the instance? (I haven't found a way to tweak it after booting) – Joel K Nov 5 '10 at 6:19
EC2 user data is set as a boot parameter and read-only afterwards. – earl Nov 6 '10 at 5:09

Your Answer


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.