Reduce VM Sprawl with AWS Tags

Virtualization of servers solved many of the problems that were caused by physical hardware limitations, but it also introduced new problems.
Virtual machine (VM) sprawl is one of the most prevalent of these problems. It was so simple to deploy new servers, that many organizations found that their VMs outnumbered the physical servers they used previously.
Hypervisors such as Microsoft Hyper-V or VMware’s ESXi are often discussed in relation to VM sprawl. However, VM spread can also occur in cloud environments.
There is no perfect solution to VM sprawl. An administrator should keep track of who created each VM and when. This is one of the best ways to prevent sprawl. Although it won’t stop sprawl happening, having this information will make it easier for you to clean up the mess when it happens.
Amazon Web Services (AWS), allows customers to apply this type data to VM instances by using tags. Figure 1 shows the Tags tab.
[Click on the image to see a larger view.] Figure 1: AWS allows you to use tags to track your VMs. A tag in Amazon EC2 is nothing more than a key/value combination that you can use for tracking VM instances. You can give tags almost any name you like, and you can assign values to them. Strategically creating tags makes it easier to identify and categorize VM instances.
In Figure 2, for example, you will see that I have created three tags: Owner, Purpose, and Created. The Owner tag is used for identifying the creator of the instance. The Purpose tag describes the purpose of the instance. The Created tag documents when the instance was created. Remember that the names Owner, Purpose, and Created are just names I have used. You can call your tags whatever you like.
[Click on the image to see a larger view.] Figure 2: You can use tags to help you document your VM instances. Tags can be applied to VM instances as soon as they are created or later. Figure 3 shows the Tags tab of the selected VM instance. The console allows you to add or modify tags.
[Click on the image to see a larger view.] Figure 3: VM instances can have tags assigned to them. It is easy to create and use tags. There are some things you need to know before you use tags.
First and foremost, it is important to plan ahead for tag usage. There are at most two good reasons to do this. Unplanned tagging can cause confusion. Let’s say that the IT staff of an organization agrees to use tags for identifying the person who created an instance. Let’s say one staff member calls the tag Owner and another staff member calls the tag Creator. Perhaps a third employee calls their tags Name. Let’s say that the tag Owner is called and the owner of the tag decides to query the Owner tag on each VM instance. It will be obvious that many instances are not tagged because IT staff did not use consistent naming conventions.
Another reason it is important to plan tags is that there is an limit to how many tags can be applied to an object. AWS documentation states that a maximum of 10 tags may be applied to an object. The EC2 interface suggests that this limit could have been increased to 50. In either case, there is an upper limit on the number of tags that can apply to an object. It is important to determine which tags are most useful upfront.
You will also need to follow some basic tagging guidelines. You can enter up to 127 characters for your tag name and upto 255 characters for your value in EC2. Tags are case sensitive

Author: Kody