Creating Cost Allocation Tags – Ensuring Cost Optimization – SAP-C02 Study Guide

Creating Cost Allocation Tags

Once the tags are activated and enabled, you can visualize them using AWS Cost and Usage Reports, or various other tools such as Cost Explorer, AWS Budgets, and so on.

AWS also offers different options when it comes to creating tags for your resources, such as the AWS Management Console, AWS APIs, and, quite recently, AWS Tag Editor. In this section, you will explore AWS Tag Editor at a high level and understand some common best practices and considerations to keep in mind when it comes to creating cost allocation tags.

Note

You, as a user/administrator, cannot edit AWS-generated cost allocation tags, their keys, or their values.

AWS Tag Editor is perhaps the simplest way of tagging and managing resources using the AWS Management Console:

  1. To get started with AWS Tag Editor, simply log in to the AWS Management Console and select the Search option at the top of the page.
  2. Next, type in the tag editor keywords and select the Resource Groups & Tag Editor option to launch the service.
  3. This will open up the AWS Resource Groups dashboard. From here, select the Tag Editor option from the navigation pane on the left, as demonstrated in the following figure:

Figure 4.2: AWS Tag Editor dashboard

  • Now select the Regions and the specific AWS resource types that you wish to find and tag based on your requirements using the appropriate drop-down options provided. Once completed, select the Search resources option to view the final list of resources.
  • In order to apply tags to the newly discovered resource, select it from the Resource search results pane, and select the Manage tags of selected resource option to continue.
  • On the Manage tags page, add subsequent tags to your resource using the Add tag option. Once done, simply select Review and apply tag changes for the changes to come into effect, as shown in Figure 4.3:

Figure 4.3: Applying tags to resources

Now that was simple, wasn’t it? You can follow the same steps to tag other AWS resources, such as databases, ENIs, Cloud9 environments, CloudTrail trails, CloudWatch alarms, and much more! For a full list of supported AWS services along with their resource types, please take a look at the documentation provided here: https://packt.link/wkiSF.

Tagging Strategies and Considerations

The following are some key tagging strategies and considerations to keep in mind when considering cost-optimization exercises:

  • Governance is always a key factor when it comes to enforcing tagging strategies across enterprise organizations, and the best way to do this is by creating a cross-functional team that is solely responsible for defining, maintaining, and enforcing tagging requirements for all workloads on the cloud. These requirements can essentially be documented as a standard to be used across the entire organization.
  • Once the team is created, start by defining consistent tagging values to be used across all workloads on the cloud. These values can be based on factors such as the following:
    • Owner of the resource: Identifying who is responsible for the resource
    • Deployment stack: Describing an environment such as development or staging
    • Cost center: Identifying, tracking, and charging back the department that is utilizing the resources
    • Project/application: Describing and grouping the resources required to run a particular project or application
    • Compliance: An optional but important value that can help identify workloads based on security compliance requirements such as the Health Insurance Portability and Accountability Act (HIPAA) for healthcare data, and Payment Card Industry Data Security Standard (PCI-DSS) for handling credit card information
  • Enforce a mix of both AWS-generated as well as user-defined tags using AWS Organizations Service Control Policies (SCPs).
  • Keep the tags consistent and up to date with the help of automation such as AWS CloudFormation templates or AWS Systems Manager Automation.
  • Tag all resources wherever and whenever possible.
  • If a resource is not tagged, enforce remediation.
  • Propagate tags across related resources whenever possible, for example, tagging an EC2 instance and propagating those tags to the underlying EBS volume, and so on.
  • Create monthly reports of untagged resources and follow up with the resource owners for remediation.
  • Analyze costs and usage on a monthly basis with the help of tools such as AWS Cost Explorer.

With this, you now have a good understanding of tags as well as tagging strategies and considerations. In the next section of this chapter, you will go through a few simple mechanisms using which you can set up proactive alerts, notifications, and reports for monitoring and optimizing your AWS costs.

Note

Tagging the cost center helps track and allocate costs within an organization. It associates cloud resources with specific departments or projects. For instance, if the marketing team uses certain VMs, tagging those resources with the marketing department’s cost center ensures accurate billing.