Right-Sizing Your AWS Resources
Resource recommendations for EC2 instances, auto scaling groups, Lambda functions and EBS volumes might improve your overall performance and save money.
AWS Compute Optimizer recommends optimal AWS resources for your workloads to reduce costs and improve performance by using machine learning to analyze historical utilization metrics, detecting resource over-provisioning and under-provisioning so you can get right-sized.
Begin the process by launching the AWS Compute Optimizer service. You can find it in the Management and Governance section within the list of services. Once the service opens, click the Get Started button.
At this point, you will be taken to the Opt In screen, which you can see in Figure 1. The process of opting in simply gives the AWS Compute Optimizer permission to access the resources that it needs in order to be able to make recommendations.
The most important thing to know about the opt-in screen is that it gives you a choice between using only the account that you are logged in with, or using all member accounts across the entire organization. Selecting the Only This Account option will cause AWS to only examine the resources that are tied to your account, whereas choosing the All Member Accounts of this Organization option will cause AWS Compute Optimizer to look at the resources that are tied to all of your accounts. Which option you should choose really just depends on which resources you are interested in receiving recommendations for.
Click the Opt In button and you will be taken to the AWS Compute Optimizer Dashboard. This dashboard displays optimization data based on your usage over the last 14 days. However, this does not mean that you have to wait for 14 days to get any data. As you can see in Figure 2, it generally takes about 12 hours to start receiving recommendations, but the actual amount of time required depends on the total number of AWS resources that you are analyzing. The recommendations will appear on the dashboard as they become available.
In most cases, analyzing your AWS resources with Compute Optimizer is an effortless process. However, there are two things that you need to know. First, AWS Compute Optimizer bases its recommendations on CloudWatch metrics. However, this doesn't mean that you have to set up CloudWatch to monitor your resources. AWS performs all of the necessary actions silently, behind the scenes. The CloudWatch metrics shown in Figure 3 for example, were collected without me having to do anything.
The other thing that you need to know about Compute Optimizer is that even though Compute Optimizer is region agnostic, it does make use of filters. When I used AWS Compute Optimizer, I found that even after 24 hours, it had not provided any recommendations. I quickly realized however, that I needed to clear the Region filter (which you can see in Figure 2) in order for the Compute Optimizer to provide the recommendations that I was expecting. You can see what the Compute Optimizer recommendations look like in Figure 4.
As you can see in the figure, the recommendations are presented in the form of color-coded bar charts. Red indicates that resources are under provisioned and need additional resources in order to perform optimally. Green indicates that a resource is provisioned in the optimal manner, while orange indicates that a resource is over provisioned and has been allocated more resources than it really needs. In the case of Figure 4 for example, I have one EC2 instance that is under provisioned and one EBS volume that is optimally provisioned.
In this particular case, interpreting the chart is easy because I only have one instance running. In the real world however, you will likely need to click on the View Recommendations link to access more detailed information.
When you click on the View Recommendations link, AWS Compute Optimizer will do more than just tell you which resources are under or over provisioned. It will actually tell you what you need to do to fix the problem and what fixing the problem will cost you (or how much you will save). In Figure 5 for instance, you can see that an instance is currently running as a T2.micro instance, and AWS recommends that the instance be reconfigured as C5.large. The interface also indicates that making the recommended change will result in a cost increase of about sixteen cents per hour.
AWS makes sizing recommendations and reports the anticipated impact on cost.
As it stands right now, the AWS Compute Optimizer cannot provide sizing recommendations for every type of resources, but it can help with EC2 instances, auto scaling groups, Lambda functions and EBS volumes. It's worth taking the time to examine AWS' recommendations for these various resources because you may be able to improve your overall performance or save a bit of money.
Brien Posey is a 22-time Microsoft MVP with decades of IT experience. As a freelance writer, Posey has written thousands of articles and contributed to several dozen books on a wide variety of IT topics. Prior to going freelance, Posey was a CIO for a national chain of hospitals and health care facilities. He has also served as a network administrator for some of the country's largest insurance companies and for the Department of Defense at Fort Knox. In addition to his continued work in IT, Posey has spent the last several years actively training as a commercial scientist-astronaut candidate in preparation to fly on a mission to study polar mesospheric clouds from space. You can follow his spaceflight training on his Web site.