How Tagging AWS Resources Can Reduce Your AWS Bill

Amazon AWS has revolutionized everything from simple file storage to complex data processing tasks. From students to Fortune 100 companies, anyone can tap virtually limitless storage and processing power in just minutes.

But with great power comes great responsibility: The pay-as-you-go pricing structure makes it just as easy to rack up enormous bills. It’s easy for companies to ‘set and forget’ their AWS infrastructure until it grows out of control.

Fortunately, there are simple tools and strategies that you can put in place to manage your costs. The key is recognizing the need to monitor costs early on and putting the right processes in place to ensure everyone is kept up-to-date.

Let’s take a look at why AWS tags are the best starting point for cost management and how you can get started with them.

Amazon AWS has made it possible to provision resources in minutes — but it’s just as easy to rack up large bills without the right cost monitoring in place.

Read also: AWS Tagging Best Practices Guide: Part 1 of 3

What is AWS tagging?

Amazon AWS enables users to assign metadata to their resources in the form of tags — or simple labels that consist of a key and optional value. You can use AWS tags to manage, search for, and filter resources, which makes it much easier to manage them.

There are two different types of cost allocation tags:

User-defined AWS Tags : These tags can include anything that you’d like to track, ranging from projects to cost centers. Just don’t include any sensitive information in them! The easiest way to add them is by using the AWS Tag Editor.

: These tags can include anything that you’d like to track, ranging from projects to cost centers. Just don’t include any sensitive information in them! The easiest way to add them is by using the AWS Tag Editor. AWS-generated Tags: These are “createdBy” tags that are automatically created by AWS. You can activate these tags in the AWS Management Console in the Billing and Cost Management console under Cost Allocation Tags.

AWS Cost Explorer and Cost and Usage Report files (CUR) can break down AWS costs using these tags. You can easily see what business units, projects, customers, or cost centers are generating the highest expenses and address them before they become a problem.

For example, the following report shows tags in each column and costs in each row, demonstrating how you can drill down into resource usage:

Cost Allocation Report Example - Source: Amazon AWS Docs

Cost allocation reports are generated as a comma-separated value (CSV) file that can be easily analyzed by third-party reporting tools or turned into visualizations.

It’s important to note that cost allocation tags can take up to 24 hours to appear in the Billing and Cost Management console, but you can speed up the process with a manual refresh.

The best way to get started with AWS tags is to come up with a standardized set of AWS resource tags to use throughout your organization. For instance, do you want to track costs by project, department or other metrics? What is the name of these AWS tags?

If you have existing AWS tags, you can identify and programmatically standardize them using tools like the Resource Groups Tagging API, AWS Config Rules, custom scripts, or by manually using the AWS Tag Editor and billing reports. This is known as reactive governance.

Download our free Sample AWS Tagging Structure to use as an example when creating your own standardized set of resource tags:

Example of Rule Parameters - Source: Amazon AWS Docs

The example above shows a series of required tags specified in an AWS Config Rule. If the “Value” is missing, that means that the tag is optional, while specific values mean that the tag must include one of the values in order to be valid.

You can check for invalid tags on resources by setting up custom rules. In the example below, the rule checks EC2 instances to ensure that they contain required tags and flag any instances that don’t adhere to the standard.

Example of Required Tags on EC2 - Source: Amazon AWS Docs

If you already use standardized AWS tags or are starting from scratch, you can move straight to tools like AWS CloudFormation, AWS Service Catalog, or IAM resource-level permissions to enforce standardized AWS tags during resource creation. This is known as proactive governance.

Tag Library Workflow - Source: Amazon AWS Docs

The AWS Service Catalog TagOption Library is one of the easiest ways to create tag templates. By associating TagOptions for different products, the tool aggregates the associated product TagOptions and applies them to each newly provisioned product.

AWS Cost Explorer provides a way to break out costs that you can filter by tags, but it’s challenging to find the right views, enter the right filters for tags, pull the right reports, and be proactive about monitoring costs for their project.

Download our free Sample AWS Tagging Structure to use as an example when creating your own standardized set of resource tags:

If you want to receive alerts, Billing Alarms can be configured to automatically send alerts when certain resources have surpassed predefined cost thresholds. The problem is that these reports are not very flexible when it comes to breaking down costs by tags.

CloudForecast makes it easy to create customized spend alerts for specific projects, regions or tags. These alerts can be sent via email, Slack, PagerDuty and Opsgenie to ensure that they reach the right person or team. You can understand your billing situation in just minutes!

CloudForecast Custom Cost Report Builder - Source: CloudForecast

The example above shows how easy it is to create a custom cost report that searches for all tags or specific tags (in the AWS Tags section). In addition to this basic functionality, you can configure thresholds for warnings and where to send alerts.

Daily AWS reports can be configured for engineers to find anomalies or search for cost savings, while monthly Excel financial reports are easy to generate for finance and C-level executive that require a higher-level look at the numbers.

It’s easy for everyone to stay on the same page and keep costs under control.

Sign up for a free 30-day trial to get started today!

The Bottom Line

It’s easy for AWS costs to spin out of control over time, but fortunately, tagging can help you monitor and proactively address these rising costs. While AWS Cost Explorer provides a way to slice and dice the numbers, CloudForecast simplifies the process with customizable reports delivered via email, Slack, PagerDuty or Opsgenie to get it in the right hands.

Tracking AWS costs can help you save thousands or tens of thousands of dollars over time by cutting waste and streamlining usage. It’s important to implement these efforts with the support of both engineers and management and ensure smooth communication.