In this video, Jeff Winesett introduces some tools AWS provides to help predict spending and to track spending. Simply monthly calculator, detailed billing reports, and billing alarms are all tools to help stay on top of cloud costs.
- [Narrator] Becoming aware and staying aware of expenses, when using cloud services, is critical to being able to optimize for cost. Optimizing for cost entails thinking about ways to model spending to help forecast what you should be spending in the first place. To appropriately track spending, and to use the right tools to analyze how actual usage is aligning with the plan. One tool AWS provides to help with a spending model is a Simply Monthly Calculator.
This is a tool that will help in building a model to forecast expected spend. Let's take a look at this tool which is located at the URL here. On the left are all of the AWS services available in the calculator. First you pick a service. Let's pick RDS. Then we pick a region into which we want to launch the service. Let's choose US West 2 Oregon. Then you specify all of the details that are specific to that particular service that play a role in the cost.
I could specify whether or not I want to use on-demand db instances, which means I'm going to be paying for these instances by the hour. So let's say we're gonna do one instance 100% utilized. Using my sequel, I'll just keep with these defaults for now. I'll go ahead and use a instance type of an R3 2X large. I'll choose provision iops because I want my database to have a consistent performance profile. I can continue to add new rows as needed.
Backup types, standard backup type is fine. Reserved instances, I'm going with on-demand for the moment so I don't need to add any additional reserve instances. And I can also specify data transfer information as well. As you can see, as you hover over most of these input fields there are great tool tips that pop up to help you understand what each field might mean and how it might go into the calculation. Also as we can see, as we've been making choices we get an estimate of our monthly bill over here in this next tab.
This estimate will provide a baseline against which to measure actual spending. With an estimate in hand, the next step is to determine how actual spending is tracking toward the estimate. One tool AWS provides for this is Detailed Billing Reports. These reports provide detailed information about resource usage, along with estimated costs for that usage. The reports are capable of breaking down these costs by the month, day, or hour, or by AWS account.
Or by the types of services and products being used. Tags can also be used as a way to filter spending by resource. Tags are metadata in the form of name value pairs, available to be associated with AWS resources. Tags can add a lot of information when it comes to billing. For example, a tag can be used to track the cost center for every instance or resource used in an organization. These tags can then be used as labels for nearly every line in the detailed billing report.
As there are additional costs related to detailed billing reports, they must be explicitly turned on within an account. Doing so results in AWS delivering the reports in CSV format to a specified Amazon S3 bucket. These reports can be viewed in applications that can read CSV files, such as Excel. Once the detailed billing is turned on, another tool called Cost Explorer becomes available. Cost Explorer is a tool that provides an interactive graphical user interface for viewing reports, designed to make it easier to view and analyze historical spend on AWS.
The data behind these reports is updated daily, allowing access to the most up-to-date spending information. Having to remember to log in and view spending reports frequently in order to avoid any billing surprises can be challenging and consistently checking may prove to be unnecessary in most cases. Billing Alarms are another tool offered by AWS to help in this regard and reduce the likelihood of receiving a surprise bill at the end of the month.
Two AWS services, Cloudwatch and Amazon Simple Notification Service combine to provide billing notifications. These notifications send out warnings when certain spending limits are reached. It's as simple as setting up a billing amount threshold, and the email to which notifications should be sent. There is also a feature in AWS called Budgets, which allows for the creation of custom budgets that will automatically send alerts when AWS costs are exceeded, or are forecasted to exceed the threshold set.
This is similar to setting up a billing alert, but the budgets tool has many more features and certainly something to be aware of. A final thing to mention when thinking about controlling and keeping tabs on resource usage is using IAM to control who can even spin up instances at all. By setting up roles in groups with different permissions, the creation of resources can be forced to funnel through various departments or groups in an organization. This can help prevent unnecessary creation of resources in the first place, and also help to prevent the situation where forgotten and no longer needed instances remain running for long periods of time, continuing to incur costs.
The cost savings of preventing instances or other resources from being started altogether is 100%. So putting some of these controls in place can really ensure cost optimization when using AWS. Optimize for Cost: Lesson #1 Become familiar with the available tools for monitoring cloud expenses, and take the time to setup billing or budget alerts to stay aware of all billing activity.
- Benefits of cloud services
- Making architectures scalable
- Examining cloud constraints
- Virtual servers, EC2, and Elastic IP
- Using the Amazon machine image
- Elastic load balancing
- Using CloudWatch for monitoring
- Security Models
- Elastic block storage
- S3, CloudFront, and Elastic Beanstalk
- Handling queues, workflows, and notifications
- Caching options and services
- Identity and access management
- Creating a custom server image
- Application deployment strategies
- Serverless architectures