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.

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:

ami-id
ami-launch-index
ami-manifest-path
hostname
instance-id
local-ipv4
public-keys/
reservation-id
security-groups

None of which satisfy this - any ideas?

share|improve this question
add comment

1 Answer

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 http://169.254.169.254/1.0/user-data 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
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.