This session is a deep dive into techniques used by successful customers who optimized their use of AWS. Learn tricks and hear tips you can implement right away to reduce waste, choose the most efficient instance, and fine-tune your spending; often with improved performance and a better end-customer experience. We showcase innovative approaches and demonstrate easily applicable methods to save you time and money with Amazon EC2, Amazon S3, and a host of other services.
14. By Employing Tags…
• Key (Attribute): 127 Unicode
characters
• Value (Detail/Description): 255
Unicode characters
• Tags per resource: 10 tags
Jane_Doe
15. …And Using The Different Types of Tags
Appropriately
Resource Tags
• Provide the ability to organize and search within and across resources
• Filterable and Searchable
• Do not appear in Detail Billing Report
Cost Allocation Tags
• Provide the ability to map AWS charges to organizational attributes for accounting
purposes
• Information presented in Detailed Billing Report and Cost Explorer (must be explicitly
selected)
• Only available on certain services or limited to components within a service (e.g. S3
bucket but not objects)
27. Customer Example – Kellogg
“CloudWatch helps our people make
better decisions around the capacity
they need, so that they can avoid
waste…”
“We were never able to do that with
our on-premises infrastructure. AWS
breaks down usage and cost to such
a granular level that we can identify
which costs come from which
department, like a toll model.”
28. Best Practice: Manage How Resources are
Provisioned and Monitored
• Only allow specific groups or teams to deploy (certain) AWS
resources
• Create different environment (e.g. Dev/Test vs. Production) with
different policies for each
• Require tags in order to instantiate resources
• Monitor and send alerts or shut down instances improperly tagged
• Use CloudWatch to send alerts when billing thresholds are met
• Analyze your spend using AWS or Partner tools
30. 4. Design for Elasticity Rather Than Deploy for
Peak…
31. By Picking the Right Instance Type…
Instance
Type
vCPU Mem
(GiB)
Monthly
Cost (OD)*
Ideal use case
m3.medium 1 3.75 $48.24 Always available, balanced
m4.large 2 8 $90.72 Latest generation, always
available, balanced
c4.large 2 8 $79.20 Always available, compute
r3.large 2 15 $126.00 Always available, memory
g2.xlarge 8 15 $468.00 Always available, GPU
d2.xlarge 4 30.5 $496.80 Always available, storage
t2.medium 2 4 $37.44 Bursty workloads
* Assumes Amazon Linux Instances in US-East at 720 hours per month
32. …And Determine if Bursting Works For You
• 2vCPU, 4 GiB RAM
• Baseline performance: 40% (of a single core)
• Bursts beyond this based on CPU credits
• Less than $40 per month
• Use Cases: Web servers, dev, small
databases
• Additional Details: http://amzn.to/1sl2bKa
t2.medium
33. Customer Example – Nomura Research
For Nomura Research, the t2
instance provides enough
performance for a development
environment, remote desktop of
evaluation environment requiring
occasional CPU bursting
34. Customer Example – Kaplan
We quickly converted a hefty
percentage of our systems to run
under this EC2 Instance type,
and have seen major cost
reductions without affecting
performance whatsoever.
For all instances built for Kaplan
moving forward, the T2 is going to
be the preferred option unless
measured or load-tested
computing needs demand
otherwise.
35. Using Autoscaling….
Automatic resizing of compute clusters
based on demand
Trigger autoscaling policy
Feature Details
Control Define minimum and maximum instance pool
sizes and when scaling and cool down
occurs.
Integrated to
Amazon
CloudWatch
Use metrics gathered by CloudWatch to drive
scaling.
Instance types Run Auto Scaling for On-Demand and Spot
Instances.
AWS autoscaling create-autoscaling-group
— Auto Scaling-group-name MyGroup
— Launch-configuration-name MyConfig
— Min size 4
— Max size 200
— Availability Zones us-west-2c
36. …And Adjusting for Utilization and
Granularity
More smaller instances vs. less larger instances
29 m4.large @ $0.126/hr
$2,630.88 / mo*
59 t2.medium @ $0.052/hr
$2,203.20 / mo*
*Assumes Linux instances in US-East at 720 hours per month
42. Customer Example – Samsung
We are using AWS Trusted
Advisor to improve cost
efficiency and to audit the
configurations of service
platforms
43. Best Practice: Match Your Usage and
Capacity
Start
Choose an instance
that best meets your
basic requirements
Start with memory & then
choose closest virtual
cores
Look for peak IOPS
storage requirements
Tune
Use CloudWatch and
Trusted Advisor to assess
Change instance size up
or down based upon
monitoring
Expand
Run multiple instances
in multiple Availability
Zones
Use Autoscaling to scale
up and down based on
demand and usage (e.g.
spikes)
45. Select Reserved Instances for Steady
State Workloads…
Commitment Level
• 1 Year
• 3 Year
AWS Services Offering RIs
• Amazon EC2
• Amazon RDS
• Amazon DynamoDB
• Amazon Redshift
• Amazon ElastiCache
* Dependent on specific AWS Service, size/type and Region
46. Or Spot Instances for Non-Stateful (Time
Insensitive or Fault Tolerant) Workloads…
Minimum Commitment
• Commit to 1 hour
Tradeoff
• Potential for interruption
* Compared to On Demand price based on specific EC2 instance type, region and availability zone
47. …Or A Combination of All Three
1. Start by using RIs for known/
steady-state workloads
2. Set-up multiple autoscaling
groups
3. Autoscale first using Spot first
4. If Spot instances are
unavailable (or priced too
high), use On-Demand
0
2
4
6
8
10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
/Spot
Instances
On Demand
Spot
Reserved Instance
48. And When You Have Excess RIs…
Use the Amazon
EC2 Reserved
Instance
Marketplace
http://amzn.to/1FkzUZp
49. Customer Example – Novartis
Goal:
Screen 10 million compounds against a
common cancer target in < 1 week
Set Up:
10,600 AWS Instances
(39 drug design years in 11 hours)
Result:
3 promising compounds
Cost: $4,232
50. Leverage The Right Storage Classes…
AWS Cloud
Amazon
Glacier
Gateway Appliance/
AWS Storage Gateway
Amazon
S3
Block File
On-premises Data Center
Archive Backup Disaster
Recovery
Amazon
EBS
• Amazon S3 Reduced Redundancy
‒ 99.99% durability vs. 99.999999999%
‒ Up to 20% savings
‒ Great for everything that is easy to
reproduce
• Amazon Glacier
‒ Same durability as S3
‒ 3 to 5 hours restore time
‒ Up to 65% savings
‒ Great for archiving, long-term backups
and old dataAmazon EFS
(Preview)
51. …Alongside AWS Managed or Application
Services…
Elastic Load
Balancing
(ELB)
Amazon Relational
Database Service
(RDS)
Amazon
ElastiCache
Amazon
DynamoDB
Amazon Simple
Queue Service
(SQS)
Amazon Simple
Email Service
(SES)
Amazon
Lambda
Amazon Elastic
MapReduce
(EMR)
Amazon Simple
Notification Service
(SNS)
Amazon
Kinesis
Amazon
Route 53
Amazon
Redshift
52. To Offload Your Architecture…
+
Standard Setup
• 4 x Medium Instances
$193
• AWS Data Transfer 1 TB
$92
• Total = $285
Optimized
• 1 x Medium Instance
$48
• CloudFront Data 1 TB
$87
• CloudFront Requests (10M)
$7.5
• Total = $142.5
50%
6X
Cheaper
Faster
53. Customer Example – Infospace
• Chooses the right instance types
(using Cloudwatch)
• Uses Reserved Instances (reduced
monthly costs by 28%)
• Monitors and turns off unused
instances (own tool – Junkyard Dog)
• Offloads architecture by moving to
Cloudfront
• Leverages App services: ELB, SNS,
SES
• Uses Trusted Advisor
• Moves Data warehouse to Redshift
56. Including…
• New Instance Types/
Families (e.g. m4s)
• New Technologies (e.g.
Amazon RDS for Aurora,
AWS Service Catalog)
New
Prices
57. …And Remember to Use Consolidated
Billing
• Receive a single bill for all
charges incurred across all
linked accounts
‒ Share RI discounts
‒ Combine tiering benefits /
Volume discounts
• View & manage linked accounts
• Add additional accounts
58. Best Practice: Pull all Levers Available
When Architecting Your Solution
• Utilize On-Demand, Reserved and Spot Instances
• Use the Amazon EC2 RI Marketplace when you have excess Ris
• Use the appropriate storage class based on your requirements (not
on what you use today)
• Use micro services where possible in your architecture
• Review your architecture when new services or technologies are
announced
• Use consolidated billing to take advantage of tiered pricing
60. Frameworks
ü Limit Resource Provisioning
ü Understand What is Deployed and
What it Costs
ü Proactively Monitor Your Account
Billing Usage
ü Design for Elasticity Rather Than
Deploy for Peak
ü Identify Idle Resources and Turn
Off Unused Instances
ü Architect Your Workloads with
Cost in Mind
ü Be Cognizant of Technology
Lifecycle Updates