Reputation: 110482
Is it possible to get the actual name of the ec2 instance, for example:
I've been able to grab some of the lower-level data by doing stuff like:
$ curl http://169.254.169.254/1.0/meta-data/hostname
But is it possible to get the name (or tags) anywhere without using some sort of aws
, ec2
, or boto
command?
Upvotes: 0
Views: 1865
Reputation: 3889
Tags data is not available through instance metadata, you would need aws-cli for that.
As of today, this is what's available:
$ curl http://169.254.169.254/latest/meta-data/ ami-id ami-launch-index ami-manifest-path block-device-mapping/ events/ hostname identity-credentials/ instance-action instance-id instance-type local-hostname local-ipv4 mac metrics/ network/ placement/ profile public-hostname public-ipv4 public-keys/ reservation-id security-groups
Fun fact: this feature request was suggested almost a decade ago
Upvotes: 4