DEV Community

loading...
Cover image for Recommendations to
improve your AWS cost optimization strategy
Microtica

Recommendations to improve your AWS cost optimization strategy

saramiteva profile image Sara Miteva Updated on ・16 min read

You need to take care of the economic model of the architecture while designing applications and workloads on AWS. Compared to on-premises data centers, it is necessary to look beyond the fundamental pricing benefits and explore ways to leverage the infrastructure successfully to lower your AWS charge.

Regardless of whether you’re going to hire a FinOps professional or handle the process within the existing team, here are the best practices for AWS cost optimization.

Apply for AWS credits

aws credits

AWS credits are one of the most common ways to save on your AWS bill. They represent something similar to a coupon code, which can help you cover costs with AWS services. You can use them until you spend them all or until they expire. There are various ways to get AWS credits, and here are some of them:

  • AWS Activate – for startups to set up infrastructure as quickly as possible
  • AWS Activate Founders – for startups that haven’t raised any venture capital, seed, or angel funding
  • Publish Alexa skills – for each Alexa skill you publish, you can apply for $100 AWS promotional credits
  • Attend AWS events and webinars – here you can find many opportunities for AWS credits
  • AWS Educate – educators earn $200 in AWS credits, while students can create a starter account with up to $100 in credits at a member institution
  • AWS for Nonprofits Credit Program – this program provides access to $2,000 for nonprofit organizations
  • AWS EdStart – for education technology startups
  • AWS Free Tier – a program that includes 85 products for businesses to start building on AWS, explained in details in the next section
  • Product Hunt – Product Hunt’s Ship platform allows startups to claim up to $7,500 in AWS credits.
  • Use Secret deals
  • F6S deals
  • Brex – if you use Brex cards, there are many benefits, including up to $5,000 in AWS credits
  • Startup School – if you’re a startup, Startup School can bring you a deal with free AWS credits

Check out our comprehensive guide on creating an AWS cost optimization strategy.

Utilize AWS Free Tier

Cloud platforms provide a number of services for free in the beginning, but even free services have an upper limit. The services become billable as soon as consumers hit the cap. These services are used on a daily basis by people new to cloud computing and before they fully transition to the cloud environment. Many free cloud plans come with an expiry date and the payment period begins as soon as it ends.

For example, Azure offers a free tier plan for a month, giving the possibility to run two small virtual machines with a storage capacity of 800GB. Google Cloud, on the other hand, offers $300 credit for a period of 12 months, when users can use services like Google App Engine or Google Compute Engine. AWS’s free tier plan lasts for 12 months, giving services like EC2, S3, and AWS RDS.

The Free Tier extends to a limited number of AWS offerings and is subjected to a monthly consumption cap. The AWS Free Usage Tier is divided into three pricing models: a 12-month Free Tier, an Always Free offer, and brief trials.

AWS free tier plans

Some of the services available include 750 hours of Amazon EC2 Linux, 750 hours of an Elastic Load Balancer, 750 hours of Amazon RDS Single-AZ Micro DB Instances, 5 GB of Amazon S3 standard storage, 10 Amazon Cloudwatch metrics with 1,000,000 API requests, and others. You can see all the services and limitations here.

For example, the AWS Free Tier model was used at a college to teach students about web frameworks. However, you can use it for much more. This model can allow you to build and maintain a basic web application. This example by AWS can guide you through making an app with AWS Amplify, Amazon API Gateway, AWS Lambda, and Amazon DynamoDB. Moreover, you can connect it to a serverless backend and add interactivity with an API and database.

Choose the right AWS region

When you set up your AWS modules, picking an AWS region is the first choice you have to make. Without picking a region, you can’t start working on the AWS Management Console, SDK or CLI. People usually choose the region according to distance, which is the most obvious choice. However, there are many other factors to consider. Here are some of them:

  • Costs – different regions have different AWS rates, check the cost calculator to count your costs for a particular region
  • Latency – choose a region with a smaller latency to make the app more accessible to your target customers
  • Security – check the regulations of each region before deciding to choose it
  • Service availability – not all services are available to all regions, so make sure you know which ones you need before choosing a region
  • AZ availability – also, not all regions have the same number of availability zones The best solution would be to choose the factor that is the most important for you and use it as a guide to choose your particular AWS region.

Use AWS Savings Plans

The AWS Savings Plan was introduced in November 2019, as a flexible pricing plan that allows consumers to save up to 72% on Amazon EC2 and AWS Fargate in return for a 1 or 3-year contract commitment to a consistent amount of compute use (e.g. $10/hour).

You can start using this feature directly from the AWS Cost Explorer control console or using the AWS API/CLI. Here’s how you can pay:

  • On a monthly basis, with no upfront payment
  • On a monthly basis, with paying at least half of the commitment price upfront
  • Upfront, paying the entire commitment with one payment and achieving the highest savings For example, if you commit to a usage of $10/hour, you get discount prices on all your usage up to $10 and any usage beyond this commitment will be charged at regular on-demand rates. There are two types of Savings Plans:

aws savings plans
Analyze AWS’s guides to the Savings Plan and try to choose the best setup for your specific case.

Analyze your AWS bill

aws-bill

Tools like Cost Explorer, Cost & Usage Report, Trusted Advisor, or Cost Optimization Monitor to analyze your AWS bill and see how you are spending your budget. Research all categories of your bill and understand what they mean. Contact AWS Support if you find anything you can’t understand, and they’ll help you find the answer. It will be easier to separate some kinds of expenses from others by using various AWS accounts for AWS entities and centralized billing.

Single billing for all accounts

Getting a single bill is very convenient for tracking expenses and monitoring spending if you have several accounts. This helps you get an overview of all AWS costs accrued across all your accounts with a consolidated view.

There’s no extra charge for this service. In the unified billing family, the Master Account pays the costs that all the other accounts accumulate. You can easily trace the costs from each account, and the expense data can also be accessed in a CSV file.

Create billing alarms

To warn you when your AWS bill exceeds critical stages, generate billing alarms. Be sure you have many warning thresholds: when the bill rises a little bit, when the bill rises a lot, and when the budget is way over the limit.

Use reserved instances optimization

This option checks the usage history of Amazon EC2 computing and estimates an ideal size of partial cumulative reserved instances. Guidelines focus on hour-by-hour use of the preceding calendar month gathered across all combined billing accounts. It is an integral feature of cost optimization that helps you to estimate the number of hours of use you need this month depending on the sum of previous months.

reserved instances

With this option, you commit to purchasing a reservation for one or three years. There are three payment alternatives: full upfront, partial upfront, and no upfront. The last two allow you to pay the remaining balance monthly during the period.

Pay-as-you-go

Pay-as-you-go is a straightforward idea that does not include minimum obligations or long-term contracts. You substitute low operating costs for the upfront capital spending and just compensate for what you need. There is no need to pay for unused space in advance or get fined for wrong estimations. This is one of the key cost optimizations of the service side inherent in AWS’s pricing strategy.

Turn off unused instances by creating schedules

In order to optimize costs, it is crucial to shut down unused instances, particularly at the end of the working day or on weekends and vacations. For non-production instances such as those used for development, staging, monitoring, and QA, it is worth preparing on/off-hours. For example, implementing an “on” mode from 8.00 a.m. to 8.00 p.m. from Monday until Friday until Monday, large expense volumes can be avoided, particularly if production teams work during flexible hours.

Through evaluating usage metrics to decide when the instances are more widely used, you can implement more intense schedules or apply an always-stopped schedule that you can disrupt when you need access to the instances. It is important to figure out that you are already paying for EBS quantities and other elements connected to them while instances are set to be off.

Microtica's Cloud Waste Manager

Reducing cloud waste and reducing cloud costs is very easy with our tool Microtica. You create saving schedules so that resources or environments will turn off in the defined period. This is available for EC2, RDS instances, and auto-scaling groups.

Microtica cloud waste manager

Create schedules for environment resources

When this plan is enabled, all of these services will be labeled to be shut-down at the specified Stop time and “wake-up” at the defined Start time on the chosen days. There is a list of all your schedules with details about the effect of this schedule on the AWS account and the projected saving figures.

saving schedules

Read the whole guide on how to reduce costs in non-production environments.

Monitor and track your spendings

There are many tools that could help you monitor and analyze your instance metrics. You can measure the workloads according to the gathered data and scale up or down the instance size. AWS Cost Explorer resource optimizer and AWS Compute Optimizer are some of these tools.

Compute Optimizer looks at multiple parameters to be able to define some cost optimizations, like CPU, network I/O, disk, and memory. The Cost Explorer EC2 optimizer comes in handy as it considers whether you have reserved instances or not. This means that you will not have any savings as you have committed to pay an amount upfront for the instances. The Computer optimizer fails to do this connection, so it might give you a recommendation regardless of whether you have reserved or not.

Microtica cloud costs dashboard

Microtica’s cost explorer can show you the following data:

  • AWS’s estimated cost for the current month
  • how the month-to-date spending acts
  • a breakdown of last year’s cloud spending with a forecast for the coming year
  • the AWS account that costs you the most
  • the services which receive the most expenditure
  • costs by tag of allocation

You can also get an overview of the accumulated estimated savings for the month. The data is based on the current active saving schedules and daily utilization hours.

Check out how we helped one tech company achieve 68% in AWS cost savings.

Choose the right storage class

Amazon S3 provides six storage classes, each built for specific use cases and available at differing rates.

  • S3 Standard: for frequently accessed data with low latency and high throughput performance.
  • S3 Standard-Infrequent Access: for infrequently accessed data that needs rapid access at times.
  • S3 One Zone-Infrequent Access: the difference between this class and S3 Standard-IA is that it stores data in a single AZ at a 20% lower cost, instead of a minimum of three AZs.
  • S3 Intelligent-Tiering: transfers data to the most cost-effective access rate immediately without overhead control.
  • S3 Glacier: long-term data archiving.
  • S3 Glacier Deep Archive: long-term data archiving with access once or twice a year. The choice depends on your data needs and requirements, as well as your budget. Consider introducing object lifecycle management that moves data between the storage classes dynamically to optimize the cost of your data storage.

Intelligent tiering

S3 Intelligent Tiering was created for teams that want to automatically adjust costs when data access patterns change, eliminating the risk of performance bottlenecks and overspending. The model automatically delivers cost savings by storing objects in two access tiers: frequent access and infrequent access.

S3 Intelligent-Tiering tracks access habits and transfers objects that have not been accessed for 30 days to the infrequent access tier for a small monthly tracking and automation charge per object. In S3 Intelligent-Tiering, there are no retrieval costs. When an object from the infrequent access tier is accessed again, it is immediately transferred to the frequent access tier. As items are transferred between access levels within the S3 Intelligent-Tiering storage class, there are no additional tiering costs.

intelligent tiering

Specify expiration dates

AWS S3 allows you to define expiration dates for S3 objects, as well as rules to move objects to cheaper storage tiers. When the object reaches the expiration date, it has reached the end of its lifetime, so it’s removed asynchronously. This is known as the lifecycle expiration rule. As S3 doesn’t charge for the storage time of objects that have expired, this is a great way to eliminate some spendings that you don’t need.

There are some rules though:

  • For S3 Intelligent-Tiering, S3 Standard-IA, or S3 One Zone-IA storage the minimum expiration limit is 30 days, so if you define an expiration of less than 30 days you are still charged for 30 days.
  • For S3 Glacier storage the minimum is 90 days, so if you define it for less than 90 days to expire, you are still charged for 90 days.
  • For S3 Glacier Deep Archive storage if you define expiration for less than 180 days, you are charged for 180 days.

Choose the right instance type

Because multiple types of instances can cost varying amounts, it is essential to make sure that your team is using the most cost-effective ones. You have to try to pick the instance that fits the workload of the program best.

When deciding variables such as the type of processing unit and the storage space required, remember your particular use case to optimize your workloads while reducing your spending. Configure the instance resource that produces price efficiency for the value being delivered. Review your choice of instances every few months to confirm they reflect the reality of your workload.

To be able to pick the right size for a resource there is a combination of AWS tools you can use. AWS Cost Explorer resource optimizer and AWS Compute Optimizer are services that can help implement a right-sizing plan.

The tools will observe your workload performance and capacity, like CPU and memory utilization and suggest instance types and sizes according to those parameters.

EC2 instance types

Consider that development resources don’t need to be the same size as production instances. So here you could save significantly, by downsizing the non-production environments, but not having impact on the performance you need to get the job done.

Categorizing your instance with tags can be a good solution too. It is possible to track the cost per hour of operating systems in real-time, measure them using tags, and these outcomes will motivate the production team to reduce costs.

Check out our comprehensive guide on creating an AWS cost optimization strategy.

A partnership between finance and technology teams

This requires a cultural shift that will make finance and tech teams collaborate better. Cross-functional teams should work together to promote smoother implementation while gaining greater financial and corporate leverage at the same time.

This partnership should remove barriers between the two teams, providing a better overview of finances for the tech team. On the other hand, the financial department should get a clear image of how the tech team allocates its resources.

Engineering teams can more easily create better features, applications, and migrations. It also provides for a cross-functional debate of whether to invest and when. Often a company may expect to cut back on expenditures, while sometimes it chooses to invest more. Yet, teams have to know why the decisions are made.

To establish a closer relationship between the finance and technology departments, some companies adopt FinOps. FinOps manages cloud finances, with the goal to add more financial transparency to the variable expenditure model used by the company. This provides more balance between speed, costs, and software quality for teams.

FinOps enables all operating teams to access real-time data that they need to influence their spending and make wise decisions that ultimately lead to efficient optimization of cloud costs without impacting the final product’s performance, speed, and efficiency.

Use AWS License Manager

Companies seeking for an appropriate and constructive license management plan to remain consistent with license conditions, prevent costly over-provisioning, and make licensing true-ups and audits simpler by using existing software licenses. The AWS License Manager allows users to easily manage licenses in AWS and on-premise servers from various software providers.

AWS License Manager gives administrators a consolidated view of license use so they can figure out how many permits they need and avoid buying more than they use. You will also monitor overpayments and escape license audit fines with this increased visibility. AWS License Manager is simple to use and saves time and money when it comes to monitoring and handling licenses.

How much impact do these recommendations have on your AWS cost optimization strategy?

After elaborating on the recommendations, we want to see how much impact some of them could have. Moreover, we also estimated their complexity. This way, you can decide which recommendations to choose based on how much time you’ll have to spend incorporating them and the effect you’ll have from them.

Simple and fast with low impact can be S3 intelligent tiering. This takes around 10-15 mins to turn on. This monitors your object data access and automatically figures out whether the storage should be in regular S3 (which costs more) or in infrequent access (which costs less).

Another simple but more impactful recommendation to do can be Savings Plan.

aws recommendations impact

Unfortunately, companies aren’t utilizing savings opportunities enough. For example, the Flexera 2021 State of the Cloud Report discovers that 52% of users use AWS Reserved Instances, while only 37% use AWS Spot Instances. However, they are quickly adopting AWS Savings Plan (30% in 2020). Organizations have to move quicker and more efficiently to achieve more savings and reduce their cloud waste.

Discount types

Conclusion

Every year, cloud usage is on the rise because of the advantages of cloud computing. In addition, for enterprises, the impacts on cooperation, security, development, and revenue are evident. However, additional actions companies take can significantly boost cost-savings.

Start by creating an AWS cost optimization strategy. To do this effectively, you first need to identify your existing costs. Highlight those that are necessary and try cutting the rest. Then, define your cost optimization goals. Conduct extensive research and study on the company and the objectives you wish to accomplish. Set targets for yourself on a weekly, quarterly, or annual basis, or on a specific date that works for you.

After you’ve defined your goals, it’s time to take some action. Choose the activities you’re going to take and prioritize them. Here is the list of the AWS cost optimization suggestions we mentioned in this article:

  • Apply for AWS credits
  • Utilize AWS Free Tier
  • Choose the right AWS region
  • Use AWS Savings Plans
  • Analyze your AWS bill
  • Single billing for all accounts
  • Create billing alarms
  • Use reserved instances optimization
  • Pay-as-you-go
  • Turn off unused instances by creating schedules
  • Monitor and track your spendings
  • Choose the right storage class
  • Intelligent tiering
  • Specify expiration dates
  • Choose the right instance type
  • A partnership between finance and technology
  • Use AWS License Manager

Finally, monitor and measure your achievements. To be able to track your results with your specified metrics, implement tools and dashboards. Create a system for evaluating and improving your plan by comparing the outcomes to your established objectives.

And, don’t forget to iterate. Not everything that works for others will work for you. Modify and adjust your actions until you get the perfect formula of what saves you from paying enormous cloud bills.

You will realize long-term financial gains by taking measures to handle your cloud savings efficiently. This will help your business improve growth, repurpose more money for market research and development, and finally, for creating more user-oriented products and services.

We hope these tips will help you create a smart and efficient AWS cost optimization strategy. Happy saving!

Discussion (1)

Collapse
devgraph profile image
DevGraph • Edited

io1/io2 EBS volumes are frequently used by AWS application workloads that require high-throughput IOPS and/or low-latency. You can upgrade provisioned volumes to gp3 and minimise your cloud expenditure in the majority of use cases, similar to the savings achieved when converting general purpose EBS volumes.

You must be aware that last year AWS had announced the gp3 general purpose SSD volumes, which are the latest generation of general purpose SSD volumes. These quantities are more cost-effective without compromising performance. At 1,000 MiB/s, the peak throughput of gp3 surpassed that of io1/io2.

You can upgrade your io1/io2 volumes manually or use an automation solution. I use an automation solution called CloudFix. This tool does a fabulous job in automating the process at scale across my enterprise.

The reason I mentioned CloudFix is that this tool monitors your account automatically, discovers migration opportunities, and (safely) updates volumes with a single click, if that’s what you are looking for. What more, it also takes a backup snapshot before the move.

Yes, you can significantly reduce your Cloud cost and improve your AWS cost optimization with this strategy - devgraph.com/2021/05/06/reduce-you...

Forem Open with the Forem app