Tags are very helpful feature in AWS. You can store information related to your business or resource configuration using tags. It helps us to query for resources based on particular condition.
This lambda function queries for name tag for all instances in particular region in a particular account and returns its value.
You can find script here.