Elastic Compute Cloud Service
The next service that we will look at is specific to EC2. As you will see, the responses of the different services aren't as consistent as we would like them to be.
The describeInstances endpoint
The describeInstances
endpoint sounds promising. Based on the documentation, it seems that we can give it a list of instance IDs, and it will give us back the following response:
{"Reservations" [{"Instances" [{"InstanceId" "EC2123", "Tags" [{"Key" "StackType", "Value" "Dev"} {"Key" "junkTag", "Value" "should not be included"} {"Key" "aws:cloudformation:logical-id", "Value" "theDude"}], "State" {"Name" "running"}} {"InstanceId" "EC2456", "Tags" [{"Key" "StackType", "Value" "Dev"} {"Key" "junkTag", "Value" "should not be included"} {"Key" "aws:cloudformation:logical-id", "Value" "theDude"}], "State" {"Name" "running"}} {"InstanceId" "EC2789", "Tags" ...