Computer scienceSystem administration and DevOpsAmazon Web ServicesAWS Basics

AWS cost management tools

6 minutes read

Let's talk about costs. In a traditional setup, you buy computing hardware before you use it. This is known as capital expenditure (CapEx). On the other hand, in a cloud computing setup, you only pay for what you use. This is called operational expenditure (OpEx). With OpEx, there's no need to invest in buying or managing physical infrastructure. You avoid upfront fees and only pay for the resources you need.

Even though there are no upfront costs, cloud services still cost money. If you don't keep an eye on them, these services can end up costing a lot. Luckily, there are many tools to help you keep track of costs and create reports. AWS can even alert you when your usage hits a certain level. Let's look at some of these tools to make sure you don't pay more than necessary for AWS services.

The AWS free tier

When you open an account on AWS, you get free access to AWS services for 12 months. This is part of the AWS free tier. It allows you to learn and experiment with AWS without incurring any costs. However, there's a limit on the services and service types you can access. Don't expect to start up a high-performance, Bitcoin-mining virtual machine for free. You can track your free tier usage from the Free Tier section of the billing dashboard:

Screenshot showing the AWS Free Tier window.

As you can see, this section shows you the services you are using, their free tier limits, your current usage, and forecasted usage. This way, you will understand how you are using the free tier. The free tier also includes services that are always free and free trials of select services. Some offerings on the AWS Free Tier include:

  • Amazon EC2: 750 hours of t2.micro or t3.micro instances monthly for the first year;
  • Amazon S3: 5 GB of storage plus 20,000 GET and 2,000 PUT requests monthly for the first year;
  • AWS Lambda: 1 million requests and 400,000 GB-seconds of compute time monthly, always free;
  • Amazon DynamoDB: 25 GB of storage, 25 WCU and 25 RCU, and 2.5 million Streams read requests monthly, always free;
  • Amazon RDS: 750 hours of db.t2.micro or db.t3.micro instances and 20 GB of storage monthly for the first year;
  • Amazon Macie: a 30-day free trial for 1 GB of data processed;

You can view all the details in the documentation. All practical tasks and projects in this course will make sure you stay within the free tier limits. You'll also be reminded to shut down resources when you are done with the tasks.

Monitoring cloud spend

The AWS Cost Explorer is the first tool you can use to view your usage. You can find this tool in the Billing and Cost Management console. Cost Explorer is a graphical tool that lets you view your costs and create reports. You can use it to:

  • View historical cost and usage data;
  • Forecast up to 12 months of future spending;
  • Identify detailed service usage statistics for individual services, linked accounts, AZs, and more;

When you go to the Cost Explorer dashboard, you'll see a chart with your usage information. On the right, you can apply filters such as time range, service, account, and more:

Screenshot showing the AWS Cost Explorer dashboard.

If you want to create a report, you can do that in the Data Exports section of the billing dashboard. You can also check the Cost Optimization Hub to get recommendations on where to cut costs.

Creating budgets

If you want to be alerted when your usage hits a certain level, AWS Budgets can help. For instance, you want to be alerted when your costs go over $100. AWS Budgets will notify you via email when you reach that amount. You can also link it with AWS services like Amazon SNS to get push, email, or SMS notifications to your chosen contacts.

When you're starting with AWS, setting up a "Zero-spend budget" is a smart move. This sends you an alert if your usage exceeds $0.01. To make one, go to the AWS Budgets console and choose "Create budget." Stick with the default choices like "Use a template" and "Zero spend budget":

Screenshot showing the AWS Budgets window.

Name your budget something clear, add email addresses for alerts, and then click "Create budget." That's it; now, you'll get an email if your spending exceeds $0.01. Try making more detailed budgets for your specific needs. Remember, creating a budget doesn't stop services from continuing to run and incur more costs. You have to take action by yourself or set up automated actions with other AWS services.

The calculator

What if you need to figure out how much cloud services might cost before using them? For instance, you want to move a web server to AWS. This web server will be hosted on EC2 instances and a PostgreSQL database on Amazon RDS. To estimate the cost of this setup, you can utilize the AWS Pricing Calculator. This tool is free and you don't need an AWS account to use it.

When you go to the calculator, click on "Create estimate". You'll see a window where you can add and set up services. For example, you can choose an EC2 instance and decide on the type, memory, and network utilization you expect your app to use. After that, you can add other services or check your estimate, which will look something like this:

Screenshot showing the AWS Pricing Calculator estimate.

For a simple web server on Amazon EC2 and Amazon RDS with basic settings, it could cost about $24.72 per month. By using the AWS Pricing Calculator, you or your company can work out the costs of switching to the AWS cloud. This helps you plan, make budgets, and decide wisely before moving to the cloud.

Conclusion

Understanding your usage and creating budgets is very crucial as you utilize cloud services. If you leave a service running, it can easily accumulate hundreds of dollars that you have to pay for. Therefore, it's important to use the free tier when learning about AWS. You should also set up budgets and take immediate action when these limits are reached; this way, you won't receive a surprise bill at the end of the month.

If you want to track your AWS usage, you can use the AWS Cost Explorer. This tool lets you view charts and generate reports to better understand your spending. Finally, you can use the free AWS Pricing Calculator to estimate how much it will cost to run AWS services. This can help you make smart decisions about moving your applications to AWS.

5 learners liked this piece of theory. 0 didn't like it. What about you?
Report a typo