Question

I'm trying to get the "name" tag from the AWS instance via their internal browser method. In my batch/script I have the following:

.\wget.exe -O - http://169.254.169.254/latest/meta-data/instance-id > c:\instance.id

Is there a way to get custom tags you create when you spin-up the instance? I wanted to save off some information that I push when I create the instance via boto. I can essentially match up the instance.id with the attribute that I create, in this case, a "name" tag. But there doesn't seem to be a way to get that name tag from within the instance itself.

The above code represents an operation that I run within a batch to grab the instance.id, I want to do the same for a custom "tag".

Was it helpful?

Solution

No, you cannot access the tags using the meta-data provided to the instance. What i recommend is using the user_data property of run_instances. Any data you save in the user_data property you can retrieve by downloading the file http://169.254.169.254/latest/user-data.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top