Cost saving is one of the most vital pillars of public cloud computing, regardless of the size of the business using it. But many companies, as up to 80% of them, according to a Gartner study, are unaware that their mistakes will cost them in overspending, as much as 20%-50% through 2024.

 

AWS provides a free pricing calculator to explore AWS services based on use cases and creates a rough cost estimate. Before building solutions, teams can find the available instance types contract terms, which can lead to more informed decisions.

 

The following figure shows a sample TCO result from the pricing calculator.

                                            Figure 1: AWS TCO Calculator

 

Some of the most common areas in which enterprises suffer cost leakages in cloud adoption are:

  • Elastic IP(s)
  • Selecting incorrect cloud instance families and types for the targeted workload
  • Scaling capacity
  • Database migrations and options
  • S3 storage class and S3 data transfer
  • Amazon CloudFront
  • Amazon VPC
  • CI/CD tools, security tools, serverless tools

 

Efficient cost management becomes critical to address these challenges in AWS. This generally can be done in stages:

  1. Planning
  2. Optimization
  3. Remediation

 

  1. Planning: There are new services that come in AWS and there is a need to make plans on how to roll out those changes in the environment. At the time of planning, we should consider a variety of factors, including:

 

  • Anticipated workload:
    • What is the frequency of the workload, such as. on-demand or steady state?
    • What is the traffic volume?
    • How often does the workload spike, or is it a static workload?
    • Is the workload compute intense?
    • Is there a need for a cloud front distribution?

 

  • Lower cost AMI: Is it possible to utilize free/open source AMIs to lower compute costs?

 

  • Data

             o What is the best option to store data out of the available alternatives such DynamoDB, S3, etc.?

             o What is the best flow (service for users and service to service) for the data, and how should it work to optimize data-transfer costs?

             o What are the policies for data retention?

 

  • Application Architecture: Can these applications be run in serverless and/or containerless environments?

 

  • Savings plans and reserved instances: The AWS calculator can be leveraged for getting an estimate on savings plans with unused capacity, or reserved instances to cover new workloads.

 

  • Setting up budgets correctly: Setting up a budget for a specific workload using mechanisms like tagging with the objective that the service will have a fixed amount per month or cap an account’s overall budget. While adding a service, the budget should be increased to prevent false alerts.

 

  1. Optimization: This is a continuous process as workloads change. Tools such as Trusted Advisor or CloudWatch can be leveraged to identify areas that need optimization. The answers to some of the following questions can also be beneficial:

 

  • Are there any idle or oversized EC2 instances? It is recommended to look at 60 days to up to a year of data to understand monthly or quarterly patterns and align it to the optimal EC2 instance. However, it is never recommended to compromise performance for cost savings.
  • Are the reserved instances and savings plans optimal?
  • Are there any idle elastic IP addresses?
  • Are there any spend anomalies in AWS cost or usage reports?
  • Has the optimal S3 storage class been selected by analysing the data access patterns?
  • Is there any chance to reduce the data API costs and data transfer costs by using cloud front distributions?
  • Are there any orphaned EBS volumes and old or idle EBS snapshots?
  • Are Redshift cluster nodes being paused during off-hours?
  • Are there any idle/ unattached load balancers?
  • Are there any incomplete S3 transfers?
  • Are there any idle RDS instances?

 

  1. Remediation: Remediation is done when unexpected bills are received. However, there could be various reasons for this such as:

 

  • Auto-renewal of reserved instances or savings plans
  • Right-sizing issues
  • Need for application re-architecture

 

In such a scenario, we can leverage the cost explorer to view and analyse costs and usage. The Cost Explorer cost and usage reports, or the Cost Explorer RI report can help us identify top-dollar items, which is to say products or engineering teams that dominate costs. We can then drill down to the details of each service and find the root cause that is bloating the cost.

 

Best Practices for cost optimization:

 

Some best practices can be followed for optimizing costs in the AWS environment:

  • Leveraging AWS Budgets: AWS Budgets allows teams to set custom budgets to track costs and usage. It has options to be alerted when actual or forecasted cost and usage exceeds the budget threshold, or when actual RI and savings plan utilization or coverage drops below the desired threshold. Using AWS Budget Actions, specific actions can be configured to respond to cost and usage status.
  • Continually reviewing the AWS environment: This ensures there are no stray costs and helps adhere to the goal of keeping costs down.
  • Prioritize dealing with less complex issues: Issues like unused elastic IPs have no impact and can save a lot of money.
  • Setting up calendar reminders for renewals: Calendar reminders help us stay aware of upcoming renewals, and as a result, subscribers are more conscious about their subscriptions.
  • Keeping abreast of changes in AWS pricing: AWS pricing changes happen regularly. Understanding new pricing models and structures helps optimize costs.

 

References:

https://www.gartner.com/smarterwithgartner/4-lessons-learned-from-cloud-infrastructure-adopters/

A Beginner’s Guide to AWS Cost Management | AWS Cost Management (amazon.com)

https://aws.amazon.com/blogs/aws/check-it-out-new-aws-pricing-calculator-for-ec2-and-ebs/

https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/ce-what-is.html

https://aws.amazon.com/aws-cost-management/aws-budgets/#:~:text=With%20AWS%20Budgets%2C%20you%20can,drops%20below%20your%20desired%20threshold.

Amritanko Banerjee

Amritanko Banerjee

Lead Consultant, APMEA Middle East, Wipro Limited

Amritanko has nearly 15 years of IT experience across different industries. He has diverse experience in Enterprise Architecture, Application Portfolio Rationalization, Cloud Computing, and Java/ Java EE technologies. He has a BTech in Computer Science and Engineering and a full-time MBA from SP Jain Institute of Management & Research, Mumbai.

What you’ve read here? Tip of the iceberg. Are you ready to be part of the excitement?