[ec2-beta] Get security group from within instance?
Darren Govoni
darren at ontrenet.com
Tue Jan 27 18:19:39 GMT 2009
Hi,
Thanks for the links. I did review the EC2 tools documentation before,
but so far, none of the tools appear to report the security group for
the instance it is running in, without first knowing the instance id.
I need to know the security group from WITHIN the running instance using
a script/command (e.g. get-my-security-group). I can easily find the
group from outside the instance _after_ it is running. :)
The meta-data link you supplied seems to be dead though.
thank you again!
Darren
On Tue, 2009-01-27 at 15:18 -0200, Andreas Hasenack wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Darren Govoni wrote:
> > Hi guys,
> > Sorry for the bevy of questions as late. Hopefully, they are useful
> > to others lurking.
> >
> > Anyway, I reviewed the amazon tools as best I could to see if I could
> > get the security group of the instance I am running in, but didn't find
> > exactly what I need.
> >
> > Basically, I want to use the security group as a kind of dynamic
> > configuration key. Ergo, once an instance boots, it needs to identify
> > what security group it is in and then it will use that for other things.
> >
> > Is there a way to get the security group of the instance from within
> > itself easily? i.e. without passing anything to the instance.
>
> You can access this URL:
> http://169.254.169.254/2008-02-01/meta-data/security-groups
>
> Check here for other parameters that you can retrieve:
>
> http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/
>
>
> - --
> Andreas Hasenack
> andreas at canonical.com
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkl/QdkACgkQeEJZs/PdwpAZVACfdE9RLWFlUtc5ydPnulf7Ga3h
> xUIAni0BSQWm78rhEDyHJ5+LFSgoLw9q
> =Yy+D
> -----END PGP SIGNATURE-----
More information about the Ec2-beta
mailing list