These days organisations have started utilising Amazon Web Services (AWS) to deliver the IT infrastructure in order to develop and expand their capabilities without any massive capital investment. Since, they only pay for the resources they require & utilise. But an adverse side to this approach is that petty expenses are often overlooked initially but can add up over time, resulting in massive bills.  

Whether you wish to reduce the extra expenses or you want to boost fiscal position, the below given seven approaches will certainly help you to reduce your AWS bills.  

  1. Delete Unattached EBS Volumes

 The Elastic Block Storage service delivers the storage space for the Elastic Cloud Compute. An essential benefit of separating the storage resource from the compute is that one can disconnect the storage volume & fix it to a new instance if there is any requirement. Since terminating an EC2 case will not delete associated EBS volumes automatically, it is common for accounts to contain unattached volumes. Finding & deleting the unnecessary volumes reduces spending.  

Once can access the various EBS volumes one has in use for every region by logging into the AWS account & viewing the EC2 dashboard. If you need to access the content for future use then you can create an EBS snapshot & swiftly restore it whenever required. Huge firms can take advantage from setting up automated processes to search for & delete unattached volumes. Hence, these approaches confirm that the volume has no activity determined period before they are deleted.  

  1. Eliminate Unused Capacity

you can run your applications or service on a large and powerful instance type but you might be spending additional amount of money on unused capacity, and the instance type might not be the best fit for the performance profile of your application. 

AWS offers you instances across a variety of EC2 instance types, from normal-purpose computing to memory and storage-optimised instances. Within each family, different types and generations offers you different configurations to meet the needs of your application. By understanding the performance needs of your application, you can match and compare it with a more specialised instance type that is a better fit, which means you will get better performance, productivity and high reliability at a lower cost per hour. 

  1. Reserve the Right Instances

AWS offer its customer the flexibility to prepay for EC2 Reserved Instances (RI) and offers good discounts relative to their On-Demand pricing. Some of the discounts may be as much as 75% off to regular price. Reserved instances purchase comes with commitment and wants research and planning before you commit. You will want to avoid getting into a commitment that costs you more over the long term. 

Depending upon how many RIs you need, how flexible you wish the reservations to be, and whether your instances need to be available round the clock or only in definite time windows, AWS offers different RI types with flexible discounts and terms. 

New Reserved instances (RI) requests can now be applied to different-sized instance types within the same type, which helps offset some of the risks if you need a change. Reservations can also be made against Relational Database Services (RDS), data transfer bandwidth, and provisioned read and write capacity on Dynamo DB tables. 

  1. Strategic Use of Spot Instances

Spot Instances permits AWS to allocate its unused capacity to users at lower prices, with conditions surrounding their continued availability. Users of Spot Instances can access computed resources at a discount rate of up to 90% off regular prices. This discount can give you access to higher capacity than your budget. Spot Instances can be terminate with two minutes of notification and returned to AWS as the capacity is needed. 

Applications and services built considering the cloud in mind are designed to be fault-tolerant. This fault-tolerance allows systems to self-heal as instances are terminated and to continue their tasks on new instances as they become available. If your systems involve the use of containerised systems like Docker, stateless web servers or any other high-performance or Big Data systems, then Spot Instances may help to reduce your costs. AWS offers a series of presentation on Spot Best Practices which are helpful to review if you would like to learn more about using Spot Instances. You might also want to investigate AWS Spot fleet. Spot fleet will allow you to define a capacity pool which can include Spot and On-Demand capacity. Different options will allow you to always select the lowest-priced instances, or you can choose more capacity based on weighted preference. 

  1. Automate Down-Scaling During Off-Hours

We already talked about identifying unused capacity within instances, but what happen when the instances themselves are not in use at all? Your company may have EC2 instances which support applications that need to be accessible during business hours. Likewise, you might have dependency on Amazon’s Relational Database Service (RDS) which only exist at specific times during the workday. 

AWS Instance Scheduler will allows you to create a schedule on which to start and stop EC2 and RDS instances. Even when your applications and data sources are required to run around the clock, there may be time-periods during the day and over weekends with dramatically reduced demand. You can also schedule down-scaling for these off-hours to reduce the costs of maintaining a full complement of infrastructure resources. Development infrastructure like CI/CD resources and test environment are best candidates for automated scaling solutions. 

Components of the AWS Instance Scaler Solution. 

As shown above, the Instance scaler solution involves creating an AWS Lambda which is triggered by timer events arising from Amazon CloudWatch.  Amazon DynamoDB is the source for scaling configurations, and the Lambda function then scales your EC2 and RDS infrastructure based on same. 

  1. Tune Your Scaling

Once you’ve automated the scaling-down of your infrastructures during off-hours, if your applications and services have been running for more than a week, you can use the usage history to locate usage patterns and identify areas for additional tuning if needed. There are different approaches you can follow, depending on whether you scale your infrastructure horizontally by adding additional instances of the same service, or vertically by increasing the size of the instance running your application. 

For horizontal scaling, there are lots of options to choose from. AWS offers scheduled & dynamic scaling, which can scale your Auto Scaling Group (ASG) in response to a schedule or in response to traffic and resource usage. Third-party solutions are also available readily if you require more specialised scaling needs. Online retailers like Ticketmaster, for example, can anticipate an increase in demand due to the scheduled release of tickets for popular events, and employ custom solutions to scale your infrastructure out ahead of the demand. 

For vertical scaling, an AWS CloudFormation template can also be used to automate the process of stopping an application and restarting it on a different instance size to handle an increase or decrease in demand. While this process might take a few minutes to execute, it also allows you to automate the change, and execute on a schedule when needed. CloudFormation is AWS solution for Infrastructure as code and provide users with a common language for defining & describing infrastructure, which will then executed to affect the infrastructure change. The CloudFormation template also contains the details of an infrastructure “stack” and can be stored along with the codes in a code repository, allowing the changes to be versioned and deployment information packaged alongside the code. 

  1. Identify Changes to the Cost When They Happen

In final way you can control and reduce your AWS bill. Understanding what changes are happening in your environment & connecting those changes to those who are financially responsible helps you identify changes early and reduce the chances of a big surprise in bill at the end of the month. The utmost & hardest part is identifying all deployed resources and identifying who is responsible for them. 

 Once your infrastructure is called appropriately, you can further use AWS Cost Explorer to view costs and arrange them from high to low for each tagging group. Additional tools allow you to identify changes to the infrastructure relative to the previous month easily, and alerting about thresholds allow you to configure when to receive notifications about changes which affect cost by a certain percentage or monetary amount. 

Bringing It Together 

Some of the practices mentioned above can be implemented in a few minutes, while others might take some research and resource planning as well. As you implement these, you might identify additional cost-saving measures specific to your organisation and benefiting you directly. Vigilance and visibility into the infrastructure are your best weapons and companion in the battle to optimise your applications and services and ensure you protect your organisation’s which is the utmost priority for every firm. 

TAGS:

Leave a Comment