First of all, let us look at the cost summary dashboard. This presents the month-to-date costs, last month’s cost for the same time period, total forecasted cost for the current month, and last month’s total cost.
So as you can see, we can quickly establish the following:
– How much have we spent this month?
– Is our month-to-date spend higher or lower than the previous month?
In my AWS work and consulting I use the two questions as the first prompts when discussing with stakeholders. It is important to understand right away what the near future and past shows in terms of AWS spend.
Now if we look further down we can see a cost breakdown. This shows the spend per AWS category, so you can drill down into towards which AWSyour money is going.
Breaking it down into proactive and reactive cost management
Welcome to section 5, breaking it down into proactive and reactive cost management. We have several categories within the AWS cost management section. There are five that I would like to hone in on.
Billing and Payments.
Cost Analysis.
Cost Organization.
Budgets and Planning.
Savings and Commitments.
Proactive cost management – An example process for you to begin with
Let’s continue with one process that you could follow when you work with cost optimisation in your cloud environment in AWS. There are four steps that I suggest here, and you don’t have to follow them rigorously, you can always choose which ones work for your situation and add or remove other steps. First of all, I would like you to look into..
- Start with AWS Cost Explorer to understand where you are spending your money. In there, look into the visualization with graphs, and understand how to compare between time periods. More in detail, you could always zoom out to months, even years, as well as zoom into days and hours.
- Secondly, take a closer look at the AWS Cost and Usage Reports which serve as a great entrypoint for deep dives into your costs. This is very useful so that you avoid overspending on specific AWS services. You could also look at this from a support function, meaning that, let’s say you have noticed that your bill has gone up a lot. Then, using the AWS Cost and Usage Reports, you can drill into where the money is going and quickly isolate which AWS service you need to reconfigure or change in order to limit the costs.
- Thirdly, apply AWS Budgets to set spending limits, configure alerts, and take action when costs and usage deviate from expectations.
- And the fourth and the last step that I suggest is: Use the AWS Cost Anomaly Detection to adress anomalies as they come up. Now, you might think that this sounds very much like step number two, AWS Cost and Usage reports.
Use AWS Cost and Usage Reports to avoid overspending on specific AWS services
Use AWS Cost and Usage Reports to conduct deep dives into your costs with extreme granularity, or to collect raw data to perform further analysis.
Plan ahead with AWS Budgets to set spending limits, configure alerts, and take action
Use AWS Budgets to set spending limits, configure alerts, and take action when costs and usage deviate from expectations.
Use AWS Cost Anomaly Detection with thresholds to be on the lookout for any unexpected costs
Use AWS Cost Anomaly Detection for help detecting and addressing anomalous spending using root cause analysis.
Start with AWS Cost Explorer to look into the visualization with graphs, and understand how to compare between time periods
AWS Cost Explorer is your first stop when you want to analyze your costs and usage within your account. Within the cost explorer you can visualize the costs over time, for examples with histograms. You can choose to visualize costs on different levels, such as AWS accounts or AWS services, or at the AWS resource level, such as EC2 or S3.
Use AWS Cost Explorer to establish cost and usage visibility, and visualize charges with interactive charts.
- To track AWS costs, use cost allocation tags.
- For s3, to automatically transfer infrequently accessed buckets to a more cost-effective class, use S3 Lifecycle Policy.
- To see forecasted costs and current AWS usage, use AWS Cost Explorer.
- To see AWS accounts where you incur most costs
- Select the report: “ Monthly costs by linked account report”.
- Identify the top services that contribute to the costs within the services. Select the report “Monthly costs by service report”. To change the granularity of the report, use the hour and resource level as well as tags.
There are costs, and then there are COSTS
This insight is about focus. For sure, there are many ways to query the AWS cost explorer API or the AWS CLI. But as is the case when you have a lot of options, focus on what matters the most. And in the scope of this cost, we want to minimize cost. Therefore, to give a real example, it might matter very little that you automate queries to the cost explorer API for Route 53 usage, because you are unlikely to grow the Route 53 usage a lot.
When it comes to EC2 or Lambda usage (to name two examples), you can easily see costs grow fast if you have an autoscaling system in place (EC2) or if you haven’t limited the Lambda invocations (remember, you pay per compute time). Okay, those were two concrete examples.
Let’s zoom out and establish the following: For every AWS service that you use, carefully evaluate the pricing model and estimate your a) intended use case, b) the maximum afforded usage to stay within your business revenue model.
Case study – Observing increased costs across regions with Cost Analysis
Welcome to section 7, where we will be looking into costs across regions and applying the cost analysis tool to find out why it’s happening.
We start out by going to the cost explorer with daily granularity and display as stacked bar charts, There we can observe that the daily cost fluctuated but that the cost for VPC had increased by a steady daily amount. Now we ask ourselves why? This takes us to our next tool, the Cost Analysis. There we confirm that the daily cost for the past 14 days for VPCs has been constant. To understand this better, we also apply the region filter for the regions in our AWS account, only for those that have active services in. By doing that, we can see that out of the three regions we are active in, only one (eu-central-1) is incurring VPC charges.
It is time to take action. We go to the AWS dashboard for the eu-central-1 region. There we drill into the VPC overview, also called the “isolated cloud resources”. And on the VPC dashboard has the neat feature that it lists the resources, by region, on the first page. Now this comes very much in handy. From here, we can isolate the VPC resources and how they are configured in our AWS infrastructure. At this point, I would like to ask you, how would you answer the question “do we need these VPC resources?”.