Whether you’re a cash-strapped startup or an enterprise optimizing spend, it pays to run cost-efficient architectures on AWS. This session reviews a wide range of cost planning, monitoring, and optimization strategies, featuring real-world experience from AWS customers. We’ll cover how you can effectively combine EC2 On-Demand, Reserved, and Spot instances to handle different use cases, leveraging auto scaling to match capacity to workload, choosing the most optimal instance type through load testing, taking advantage of multi-AZ support, and using CloudWatch to monitor usage and automatically shut off resources when not in use. We'll discuss taking advantage of tiered storage and caching, offloading content to Amazon CloudFront to reduce back-end load, and getting rid of your back end entirely, by leveraging AWS high-level services. We will also showcase simple tools to help track and manage costs, including the AWS Cost Explorer, Billing Alerts, and Trusted Advisor. This session will be your pocket guide for running cost effectively in the Amazon cloud.
2. What you’ll get out of this session
• Best practices on how to lower your AWS bill
• Real-world customer examples
• Useful tips to get started
3. Pay as you go
Pay less by using more
Pay less when you reserve
Pay less when AWS grows
No up-front investment
Pay per use
How do customers lower their TCO with AWS
Pricing Principles?
4. Analysts have shown AWS reduces cost over the long term
Source: IDC, Quantifying the Business Value of Amazon Web Services (May, 2015)
5. Saved 52% total cost of ownership
reduction
10’s of millions of $ saved with
first 12 apps migrated to AWS
40% reduction in fixed cost of
launching a software products
82% savings in initial stages of the
startup versus on-premise deployment
70% lower 5 year TCO per app
Source: IDC Whitepaper “ The Business Value of Amazon Web
Services Accelerates Over Time” July 2012
And we’ve heard it from our customers…
8. Even when your bill is going up?
How do you ensure that you’re
realizing those benefits…
9. When does efficiency matter?
0.00
0.50
1.00
1.50
2.00
2.50
$0
$20,000
$40,000
$60,000
$80,000
$100,000
$120,000
$140,000
Oct-14 Jan-15 Apr-15 Jul-15 Oct-15 Jan-16 Apr-16 Jul-16
Usage Total Cost Unit Cost
Develop New Products Grow Scale
10. Best Practice Framework for Architecting on AWS
Performance
Ensure a system delivers maximum
performance for a set of resources.
Cost Optimization
Achieve the lowest price for a workload
taking into account fluctuating needs.
Reliability
Ensuring a given system is architected to
meet operational thresholds during a
specific period of time.
Security
Review definitions and compliance best
practices.
14. The Five Pillars of Cost Optimization
Right-sizing your
instances
Pick the right
pricing model
Increase elasticity
Measuring,
monitoring &
Improve
Match usage to
storage class
15. Pillar 1: Right-Sizing
Right-sizing
• Selecting the cheapest instance available
while meeting performance requirements
• Looking at CPU, RAM, storage, and network
utilization to identify potential instances that
can be downsized
• Deploy EC2 Right Sizing Solution
Rule of thumb: Right size, then reserve.
(But if you’re in a pinch, reserve first and then modify later)
16. EC2 Right Sizing Solution
• Analyze two weeks of utilization
data from CloudWatch
• Provide detailed recommendations
for EC2 right sizing
• Auto deploy by CloudFormation
template
• Download: Cost Optimization: EC2
Right Sizing (EC2 Right Sizing)
solution Implementation Guide
• https://s3.amazonaws.com/solutions-reference/cost-optimization/latest/cost-optimization-ec2-right-sizing.pdf
19. Pillar 2: Increase Elasticity
Turn off non-production instances
• Look for dev/test, non-production instances that
are running always-on and turn them off.
• Lambda + CloudWatch = Automated Scheduling*
Autoscale production
• Decoupled Architecture
• Use Auto Scaling to scale up and down based on
demand and usage (for example, spikes).
* https://aws.amazon.com/premiumsupport/knowledge-center/start-stop-lambda-cloudwatch/
20. Scaling on a Schedule Elastic Load
Balancing
Auto Scaling group
cron-like syntax for
recurring scaling
events
Schedule
individual events
(up to 135 events
per group)
Set min / max / desired capacity
Elastic Load
Balancing
21. Scaling on a Dynamic Policies
Trigger scaling events based on demand:
- Demand is measured based on metrics
- Changes in metrics can be mapped to scaling
policies
Auto Scaling group
Collect metrics
Alarm fires when
threshold is crossed
Auto Scaling
Scaling event is triggered
Elastic Load
Balancing
25. On-Demand
Pay for compute capacity
by the hour with no long-
term commitments
For spiky workloads, or to
define needs
Reserved
Make a 1 or 3 Year
Commitment and receive
a significant discount
over on-demand
For committed or
baseline utilization
Spot
Bid for unused capacity,
charged at a Spot Price
which fluctuates based on
supply and demand
For fault tolerant, time-
insensitive or transient
workloads
AWS EC2 Purchasing Options
27. EC2 Reserved Instances Pricing
Upfront payments to
reduce costs
Steady State Reserved Capacity
28. Reserved Instances for Always-On Instances
Payment Options
• no upfront
• partial upfront
• all upfront
Commitment level
• 1 year
• 3 year
• RI Marketplace
* Dependent on specific AWS service, size/type, and region
Up to 75%+ savings*
(and capacity
reservation)
30. How to take advantage of
Reserved Instances while
maximizing flexibility?
31. Introducing Convertible Reserved Instances
With a Convertible Reserved Instance, you can modify
your existing reservation across:
Instance families
Instance sizes
Operating systems
Tenancy
33. Standard vs. convertible RIs
1 Year, Standard 3 Year, Convertible 3 Year, Standard
No Upfront
31%
$0.164
38%
$0.148
N/A
Partial Upfront
41%
$0.140
47%
$0.126
60%
$0.096
All Upfront
42%
$0.138
48%
$0.124
63%
$0.089
24%
$0.030
28%
$0.035
Price of
flexibility
$306.60/yr
m4.xlarge on-demand pricing: $0.239/hr, $2,093.64/yr
34. Reserved Instances Best Practices
Step 1: Determine Business Priorities:
• Savings, flexibility, capacity
Step 2: Reserved Instance Coverage
• Cover always-on resources with standard or convertible
Reserved Instances
Step 3: Increase Reserved Instance Utilization
• Known architectures: Leverage Standard Reserved
Instance flexibility to increase utilization.
• Growing or changing architectures: Leverage Convertible
Reserved Instances across families, sizes, and OS.
• Regional Benefit: Consolidated billing to share Reserved
Instances benefits
35. EC2 Spot Pricing
Users with urgent
computing needs or
large amounts of
additional capacity
Time or instance
flexible
Experiment and/or
build cost sensitive
businesses
36. Spot Instances
• No need commitment
• Opportunity to save 80-90% cost
• Price based on supply/demand
• You choose your maximum price/hour
• Your instance is started if the Spot price is lower
• Your instance is terminated if
the Spot price is higher, with 2 minutes notice
• But: You did plan for fault tolerance, didn’t you?
90%
Savings!*
* Compared to On Demand price based on specific EC2 instance type, region and availability zone
37. Spot Rules
50% of OD
75% of OD
25% of OD
You pay the market price
87% discount!
• Markets where the price of compute changes based on supply and demand
• You’ll Never Pay More Than Your Bid
38. Consider Spot for Elastic Workloads
• “39 years of drug research re-processed, using over
80,000 cores, in just 9 hours for $4,232”
• “New infrastructure would have cost approximately $40
million to build”
• “Our business would not exist if it weren’t for Spot”
• “Spot let us compete with a billion dollar company
in AdTech”
• “With Amazon EC2 Spot instances, we save 85–90%
in costs. That, in turn, allows us to experiment with less
risk"
46. Object Storage Classes on Amazon S3
Active data Archive dataInfrequently accessed data
Standard
Hot
Standard - Infrequent Access
Warm
Amazon Glacier
Cold
47. Running the Numbers: S3 or S3-IA
Comparing 1 PB of object storage*
1PB Monthly
S3 S3-IA Savings %
$24,117 $14,116 41%
Rule of thumb: Breakeven = 105% Retrieved per Month
Content Accessed
per Month
10%
$24,117 $18,350 24%50%1PB Monthly
$24,117 $23,593 2%100%1PB Monthly
* Based on US-East Prices
60. “AWS has been a great
business partner for Beat
as we've grown rapidly
during the last year.
While the number of
Beat users has grown
rapidly, the total cost of
using AWS has not.
Through continuous cost
optimizations, the cost
per user has decreased
by 97% since we
launched the service.”
-THE BEATPACKING
COMPANY
Su-man Park, CEO-
61. Sounds pretty easy, right?
Not really.
In reality, it is very complex.
• Scale
• Behavioral change
• Visibility
• Ownership
68. And partners have been successful helping
customers monitor, manage and save cost
• Free Cost Optimization Assessment
• Consolidated Billing Discount Program
• Business Support Discount Program
70. AWS Trusted Advisor
Helping customers automate best practices (checks) across
cost optimization, security, fault tolerance, and performance
improvement
Red (action recommended)
Orange (investigation recommended)
Green (no problem detected)
77. Metrics & Targets
% Instances turned off daily
% of Instances Right-Sized
% Always on Resources Covered by RIs
% RI Utilization
What KPI makes sense for this
workload?
✔ ✔
✔ ✔
✘
✘
✘
✘
Set up metrics to define success and track progress
78. Where to Start
Set up a Cloud
Competency Center
Bring in the right
tools
Use metrics to
reinforce behavior
Use partners to
accelerate!
You can react and reap reward rapidly because of the AWS pricing principles. Our pricing principles are designed around the you the customer, understanding and using these will give you confidence AWS has your workload and needs covered. Since its inception AWS has believed that to innovate you need to reduce the barrier to entry and cost of failure. EC2 enables this by enabling no upfront investment, pay as you go but if an innovation is successful you can reserve to pay less. Similarly you can pay less as you increase scale, and as we continue to innovate on behalf of our customers we pass those savings on to customers in the form of over 50 price reductions since 2006.
May 2015, interviewed 10 AWS users
average 4000 staffs, 250 IT staffs
total 1300 EC2
Particularly difficult when you have growing usage levels, are migrating on to the platform, or are launching new products. So how do we know we’re realizing the full economic benefits of the cloud – and realizing all those savings?
The initial lift and shift TCO model doesn’t fully capture the on-going Economic case for the cloud. Cost Optimization overtime continues to drive down costs through ongoing improvements, leveraging managed services, expanding the scope of analysis beyond just EC2 (i.e. RDS, lambda, storage, etc.), etc.
Users that want the low cost and flexibility of Amazon EC2 without any up-front payment or long-term commitment
Applications being developed or tested on Amazon EC2 for the first time
Applications with short term, spiky, or unpredictable workloads that cannot be interrupted
Applications with steady state or predictable usage
Applications that require reserved capacity
Users able to make upfront payments to reduce their total computing costs even further
Applications that have flexible start and end times
Experiments that can only be conducted at very low compute prices (Brookhaven and Fermi – analyzing the origins of our universe). Or business that need extremely low infrastructure costs to achieve profitability such as Adtech.
Users with urgent computing needs or large amounts of additional capacity
Picking just one EC2 consumption model is the wrong way to ask the question.
[click]
Its like picking a single type of food and eating only that for the rest of your life. You should have a balanced meal!
You might be wondering, well which is which? Ask yourself which is your favorite, that is Spot! Pause for laugh.
So having a balanced meal means -
Use Reserved Instances for known/steady-state workloads
Set-up multiple Scaling groups
Scale using Spot, On-Demand or both