You are on page 1of 4

Show Me the Money!

When building applications and workloads on AWS, you need to take control over the economic
model of your architecture. It’s important to think beyond the basic pricing advantages compared to
on-premises data centers, and investigate how to effectively use the services to lower your AWS
bill.
There are seven ways to optimize your AWS costs:
#1: Shutdown Unused AWS Resources
To optimize cost, it’s critical to shut down unused instances — especially in development
environments at the end of each working day and weekends. Services such as AWS OpWorks and
Elastic Beanstalk allow developers to quickly deploy and redeploy applications with consistency,
without worrying about the configuration of the underlying infrastructure.
By using AWS CloudFormation to define your infrastructure as code, it’s very easy for developers
to create resource templates of your AWS resources to quickly build and rebuild your environments.
This approach to cloud computing enables the core concept of ephemeral workloads, making it
possible to shutdown and delete unused AWS resources without concern.
#2: Use the Appropriate Storage Class
The are 5 tiers of Amazon S3 object storage available, and it’s important to know why and when to
use each class to optimize your costs. For each tier, the cost is broken down into the the actual
storage amount, the number of HTTP PUT requests, the number of the HTTP GET requests, and
volume of data transferred.
 Amazon S3 Standard is for general purpose usage for frequently accessed data, and is used
for a variety of use cases. As part of the AWS Free Usage Tier, customers receive 5 GB of
Amazon S3 storage, 20,000 Get Requests, 2,000 Put Requests, and 15 GB of data transfer
out each month.
 Amazon S3 Standard-Infrequent Access (IA) is for data that is used less frequently,
requires the same resiliency as the standard storage class, but can be retrieved rapidly when
needed. While the S3-IA pricing is lower than the standard S3 tier, you are charged a
retrieval fee of $0.01 per GB.
 Amazon S3 One Zone-Infrequent Access is similar to S3-IA, but is even less expensive
since the data is only stored in a single availability zone with less resiliency. As a result,
One-Zone IA is a great option for storing secondary backups.
 Amazon Glacier is designed for data that is retained for more than 90 days, such as backups
or cold data. Glacier is just as durable as Standard S3, but the tradeoff is that it takes 3–5
hours with standard retrievals to restore data. AWS recently introduce two new options for
retrievals data from Glacier — including slower and cheaper bulk retrievals (5–12 hours),
plus faster and more expensive expedited retrievals (1–5 minutes).
To optimize the cost of you data storage, consider implementing object lifecycle management that
automatically transitions data between the storage classes. For instance, you can automatically
move your data from S3 Standard to IA after 30 days, archive data to Glacier after 90 days, or setup
a delete policy to expire specific objects after 180 days.
#3. Select the Right Instance Type
Since different instance families cost different amounts, it’s important to ensure that you are using
the most cost-effective instances . Be sure to select the instance that best suits your application
workload.
To maximize your workloads while minimizing your spend, consider your specific use case when
determining factors like the type of processing unit and and amount of memory required. Optimize
the instance resource that results in the delivery of price performance for the price. At least twice a
year, assess your choice of instances to ensure they match the reality of your workload.
Tagging your instance is also an imperative best practice. The cost per hour of running systems can
be monitored in real time, calculated using tags, and these results can drive the development team to
optimize costs. To enforce discipline on tagging in your organization, you can set up a “No tags? No
instance” policy using tools like open source tools like Cloud Custodian where instances without a
tag are stopped.
#4: Monitor, Track, and Analyze your Services Usage
Trusted Advisor and CloudWatch are monitoring and management tools to access your instance
metrics. Based on the data collected, you can assess your workloads and scale your instance size up
or down.
Trusted Advisor is an excellent tool since it identifies idle resources by running configuration
checks. The services also provides real time guidance to help you provision your resources
following AWS best practices — providing weekly updates to increase security and performance
and reduce your overall costs.
Amazon Cloudwatch is a helpful service to set alarms, collect & monitor log files, and
automatically react to changes in your resources that may contribute to waste. With Cloudwatch,
you can also monitor custom metrics generated by your own applications via a simple API by
sending and storing metrics that are important to your application’s performance — and then take
action to manage inefficient or wasteful workloads.
#5: Use Auto Scaling
One of the key benefits of cloud computing is the ability to align your resources with customer
demand. To handle variable demand or sudden traffic spikes, you can design dynamically for
capacity by using Auto Scaling — adding additional resources only when required and turning them
off when they are no longer needed.
The benefit of applying Auto Scaling to your application’s architecture isn’t just limited to better
cost management. The services also enables you to detect when an instance is unhealthy, and then
automatically terminate the instance and relaunch a new version.
Setting up Auto Scaling very straightforward:
 Define launch configuration that describes the resources that will be created when adding
more instances.
 Set the maximum and minimum size of the group to automatically scale the number of
instances, and define which availability zones.
 Define the policy with parameters for triggering Auto Scaling in response to an event, and
configure a cool-down period to prevent additional capacity to be provisioned when scaling
down.
#6: Consolidated Billing
If you have multiple accounts, getting a single bill is very helpful for managing costs and
controlling spend. Consolidated Billing enables you to see a combined view of all your AWS
charges incurred across all of your accounts.
The service is available at no additional charge — one of your accounts is designated the Master
Account. The Master Account pays the charges that are accumulated by all the other accounts in the
consolidated billing family. The charges from each account can be easily tracked, and the cost data
can also be downloaded in a CSV format.
A cost saving example:
Let’s consider 2 AWS accounts named Alice and Eve.
 The master account is owned by Alice
 Alice’s consolidated bill consists of Eve’s account and her own account.
 Alice transfers 8TB of data and Eve transfers 6TB.
 The first 10TB costs $1945.60 ($0.19 per GB)
 The next 4TB costs $$614.40 ($0.15 per GB)
 The Master account is charged $2560 for 14TB of data transferred
Without the benefit of Consolidated Billing, AWS would have charged Alice and Eve individually
for their usage, and the volume discount for data transfer would not have been applied — for a total
$2726.50. By simple simply using Consolidated Billing, the total cost savings is $166.50!
#7: Use Reserved and Spot Instances
Unlike on-demand instances, a Reserved Instance is a 1 or 3-year commitment to purchasing a
reservation of capacity in exchange for a significantly lower hourly rate. By using Reserved
Instances, you can save up to 75% over equivalent on-demand capacity. And don’t worry — if you
buy a RI and you don’t need it, you can sell it back or buy a shorter duration version in the reserved
instance marketplace.
Reservations are available with three different payment options: Full Upfront, Partial Upfront, and
No Upfront. With partial and no upfront, you pay the remaining balance monthly over the term. In
addition to Reserved Instances, Amazon RDS, Dynamo DB, Redshift and ElastiCache are other
services where you can take advantage of reserved capacity at lower cost.
Spot Instances are a another phenomenal way to save money for non-stateful workloads — simply
bid on EC2 capacity which is not currently in use. Spot Instances are ideal for workloads where you
need access to large amount of compute capacity but you are not concerned about an interruption
assuming you have a mechanism for dealing with the interruption. The prices of Spot Instances vary
on the basis of current demand.

Summary of Optimizing Your AWS Costs


1. Shutdown unused instances
2. Select the right instance size for your workload
3. Select the appropriate S3 storage class
4. Use Cloudwatch and Trusted Advisor to monitor costs
5. Use Auto Scaling to align your resources with demand
6. Consolidated Billing provides cost savings
7. Take advantage of Reserved and Spot Instances
Once you’ve mastered the basics, there are a lot of additional AWS tools to help manage and control
your spend including Cost Explorer, Billing Dashboard, and Detailed Billing Report.
By using these tools and services correctly, AWS can drastically change your economic model and
reap the financial benefits of cloud computing.

You might also like