Determining whether a compute resource is cost-effective can be difficult without metrics. The AWS Compute Optimizer performs metric checks on AWS compute resources and generates recommendations that are designed to help you reduce your AWS costs. Figure 14.4 shows the types of resources on which Compute Optimizer can perform metric analysis.
FIGURE 14.4 Compute Optimizer metrics
Compute Optimizer is available at no additional charge; however, it does run on Compute resources that can result in a charge, and it requires Amazon CloudWatch monitoring, which may also result in a charge. As a result, Compute Optimizer is not enabled by default.
The metrics that are analyzed by Compute Optimizer depend on the resource. For example, the EBS volume metrics include the following:
VolumeReadBytes
VolumeWriteBytes
VolumeReadOps
VolumeWriteOps
The list of EC2 instance metrics that Compute Optimizer analyzes is larger and includes standard CloudWatch metrics like CPUutilization, NetworkIn, and NetworkOut. The analyzed metrics can also include memory utilization; however, recall that in order for CloudWatch to gather these metrics, a CloudWatch agent must be installed on the EC2 instance.
One of the biggest benefits of Compute Optimizer is that it provides recommendations. For example, the recommendations that Compute Optimizer creates for EC2 instances include a column called Finding, as shown in Figure 14.5.
FIGURE 14.5 Recommendations for EC2 instances
The Finding value can be one of the following:
Under-provisioned: If one or more metrics do not meet your performance requirements, the EC2 instance is labeled as Under-provisioned.
Over-provisioned: If one or more metrics indicate that a component of the EC2 instance can be downsized and still meet performance requirements, it is labeled as Over-provisioned.
Optimized: All metrics meet performance requirements.
You can also see recommendations regarding rightsizing of your EC2 instances by going to the AWS Cost Management service and choosing Rightsizing Recommendations.
AWS Cost Explorer is a tool that allows you to view your AWS costs by service in an easy-to-see graphic. The display can show usage by Service, Instance Type, Region, and other breakdowns. See Figure 14.6 for an example.
FIGURE 14.6 AWS Cost Explorer
By default, the costs are displayed per month. You can change this view to display costs per hour to gain a higher granular view of your costs.
One of the concerns your organization may have is that an individual or group may use too many resources, resulting in a high bill. You can use AWS Budgets to prevent this from happening. This tool provides a wizard in which you can create a budget. The first step of this tool is to create a budget type (Cost Budget is the most commonly used type), as shown in Figure 14.7.
FIGURE 14.7 AWS budget type selection
The next step is to set up your budget. The exact questions depend on the budget type that you choose. For example, for Cost Budget, you would select period of the budget (monthly, quarterly, or yearly), if this is a recurring budget or it stops at a specific time, and the amount of the budget.