A cost allocation tag starts as a regular resource tag. Typically, these tags can be assigned when creating a resource or after the resource has already been created. For example, Figure 14.1 demonstrates tags being assigned to an EC2 resource as it is being created, whereas Figure 14.2 demonstrates tags being assigned to an existing EC2 resource.
FIGURE 14.1 Applying tags while creating an EC2 resource
FIGURE 14.2 Applying tags to an existing EC2 instance
After you have applied tags to resources, you can generate cost allocation tags. This can be done in the Billing & Cost Management Dashboard by enabling the Detailed Billing Reports [Legacy] option located under the Billing Preferences section, as shown in Figure 14.3. Note that this feature requires an S3 bucket to save the cost allocation reports.
FIGURE 14.3 Enabling cost allocation reports
Cost allocation tags require the collection of billing data. This operation is available if Cost Explorer is enabled, so one reason you might not see any cost allocation tags is that Cost Explorer hasn’t been enabled.
The cost allocation report is stored in a CVS-formatted file in the S3 bucket that you specify. The report denotes the costs associated with each cost allocation tag.
Chapter 9, “Security and Compliance,” introduced Trusted Advisor. This tool performs checks on your AWS account for five categories. One of those categories is cost optimization (although this is not one of the free categories).
Depending on your support plan, you may have up to 17 different cost optimization checks available for your account. These checks review a variety of different resources, including AWS Lambda functions, database services (RDS, Redshift, ElastiCache), and EC2 instances. For example, EC2 checks include the following:
Low Utilization of Amazon EC2 Instances: This check looks at CPU utilization to determine which EC2 instances appear to be not operating in a cost-effective manner.
Amazon EC2 Reserved Instance Lease Expiration: This check provides a report about EC2 Reserved Instances that have expired recently (within the last 30 days) or are expiring soon.
Amazon EC2 Reserved Instance Optimization: This check is designed to provide information regarding your EC2 Reserved Instance versus your EC2 On-Demand instance.
For the exam, you should be familiar with the cost optimization checks that are available with Trusted Advisor. Table 14.1 provides a list beyond the EC2 checks.
TABLE 14.1 Trusted Advisor Cost Optimization Checks
Database | Performance | Miscellaneous |
RDS Idle DB Instances | Idle Load Balancers | Underutilized EBS Volumes |
Underutilized Redshift Clusters | OpenSearch Service Reserved Instance Optimization | Unassociated Elastic IP Addresses |
ElasticCache Reserved Node Optimization | Lambda Functions and Excessive Timeouts | Route 53 Latency Resource Record Sets |
Redshift Reserved Node Optimization | Lambda Functions with High Error Rates | Savings Plan |
RDS Reserved Instance Optimization | Amazon Comprehend Underutilized Endpoints |