More Related Content Similar to Cost Optimization on AWS (20) More from Amazon Web Services (20) Cost Optimization on AWS1. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Cost Optimization on AWS
Praveen Jayakumar
Head – Cloud Financial Management, AISPL
Siva S
CEO, PowerupCloud
2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Five Cost Optimization Levers5
3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Cloud Financial Management Framework
Measurement
and
Accountability
• Account strategy
• Cost visibility
• Metric tracking
• Tagging strategy
Cost
Optimization
• Architecture, design & service
selection
• Match supply with demand
• Pricing models
• Resource types & sizing
Planning
and
Forecasting
• Budgeting
• Business Planning
• Cost forecasting
• Usage forecasting
Cloud Financial Operations
• Automation & tooling
• Build the cloud team
• Establish culture of cost
accountability
• Governance & controls
• Procurement strategy
• Training
4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
The First Step: Cost Visibility
5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Pick the tool that provides the commercial visibility and speed to
insight that you need
Simple, Static, Small
environment
Complex, Dynamic,
Large environment
1. Monthly AWS Invoice
2. AWS Billing
console
3. AWS Cost Explorer
and AWS Budgets
4. AWS Billing File Analysis,
DIY dashboards, and
3rd party tools
6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AWS Cost Explorer
7. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AWS Budgets
• Set custom budgets
that alert you when you
exceed your budgeted
thresholds
• First two budgets are
free ($0.02/day
thereafter)
• API, CLI and SDK
support
• Creation via
CloudFormation
templates
• Ability to view historic
budgets and variances
8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Cost and Usage Report (CUR)
• Cost and Usage Report
• The authoritative (& most fine grained) data source for cost and
usage data
• Detailed billing artifact (stored in an Amazon S3 bucket*)
• CSV, Apache Parquet Formats (compressed columnar)
• Ability to overwrite existing CUR file
• Prior: Many files (1M row chunking factor**)
• Updates occur continuously ~3X a day (hourly/daily billing
granularity)
9. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Cost Optimization Levers
Right Size &
Decommission
unused Resources
Increase
Elasticity
Match Storage
to Need
Design for
Cost
EC2 Pricing
Model
10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Method 1: Right Size your resources
Right Sizing is about
• Selecting the cheapest instance (size
and family) while meeting
performance needs
• Most commonly based on CPU, RAM,
storage, and network needs
• Doing this before/during migration via
discovery tools reduces overall effort
11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
87%
Saving
Right Sizing example
m4.4xlarge
$1.72 per hr
m4.large
$0.215 per hr
2. Check (CPU,
RAM, network, disc)
1.
Migrate/provision
& Run
3. Right
Size
5. Save!4. Review Performance
12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Choose the right (EC2) instance Family from the start
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html
Right Sizing: https://aws.amazon.com/solutions/cost-optimization-ec2-right-sizing/
Workload type EC2 Instance Family
Burstable / intermittent compute T2,T3, T3a
Compute Optimised ~1vCPU-2GB C3, C4, C5
Memory Optimised ~1vCPU-8GB R3, R4, R5,X1, X1e
Compute-Memory balanced ~1vCPU-4GB M3, M4, M5, M5a
Storage/throughput Optimised D2, H1, I2, I3,I3en
Accelerated Computing F1 (FPGA), P2, P3, G2, G3
13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Decommission Unused Resources
• Unattached Elastic IPs
• Unattached EBS
• Idle / unattached load balancers
• Incomplete S3 transfers
• Idle EC2, RDS, Redshift instances
• Clearing old snapshots
14. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Method 2: Increase Elasticity to Eliminate Waste
Before we had to peer 3-5 years into the future
AWS allows you to meet demand to the second!
15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Reduce non-prod spend by 70% or more via scheduling
Fun fact: RDS
can be turned
off too
Maximise savings via automatically turning off resources at night with
manual turn-on in the morning
16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
AWS Auto Scaling helps you match resources to demand
24 x 24 hours m5.2xlarge @
$0.48/hr. on Linux in Sydney
= $8,432.64 / month
Autoscaling 80 m5.large instances
@ $0.12/hr. on Linux in Sydney
= $4,396.80 / month (48% saving)
Demand
$
17. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
the second
Method 3: Amazon EC2 purchase options
savings of up to 90%significant discount
18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Method 3: What are Reserved Instances (RIs)?
• RIs are a commitment in exchange for discount
• They behave like discount coupon booklets
• Each hourly RI coupon in the booklet tries to match to a running
instance, if matched it provides its full discount, if not it expires
• RIs are a financial construct/layer on top of your AWS infrastructure
RI Coupon Booklet
19. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
RIs are most often used for always-on instances
(can still be used to save for non-always on)
Commitment level
1 year (approx. payback 7-10 months)
3 year (approx. payback 10-20 months)
AWS services offering RIs
Amazon EC2 & EC2 Hosts
Amazon RDS
Amazon Redshift
Amazon ElastiCache
Amazon Elasticsearch
Amazon DynamoDB*
*Discount for commitment, but not an RI
20. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Why Spot Instances?
Up to 90% discount over
On-Demand prices
Due to the operating scale of
AWS, Spot Instances offer the
scale and cost savings to run
hyper-scale workloads.
Launch through AWS services
(ex. ECS, EKS, Batch, EMR)
or integrated third-parties
Unused Amazon EC2 capacity at discount over On-Demand prices
21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
S3 Deep archive
Method 4: Match Storage Class to Business Need
Elastic Block Store
(EBS)
Elastic File System
(EFS)
Simple Storage
Service (S3)
S3 Standard is $0.023 per GB-month in US East,
approx. 4x cheaper than GP2.
S3 deep archive approx. $1 per TB-month,
23x cheaper than S3 standard (excl. retrieval costs)
A typical EBS option (GP2) is $0.1 per GB-month
in US East. EBS GP2 is typically the 2nd highest
spend after Compute for a typical customer.
22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Automatic Cost Optimization for Amazon S3 via
Intelligent Tiering
https://aws.amazon.com/blogs/aws/new-automatic-
cost-optimization-for-amazon-s3-via-intelligent-tiering/
Once enabled, you save money even
under changing access patterns, with no
performance impact, no operational
overhead, and no retrieval fees.
23. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Method 5: Design for Cost Efficiency to both optimise existing
spend and avoid unnecessary spend before it occurs
Containerisation (staff productivity
and compute utilisation)
Consolidated billing (RI and
volume discount benefits)
Automation & CloudFormation
(save time, reduce error)
Serverless &
AWS Lambda
Using Application Load
Balancers
Offloading and Caching
(lower compute need)
Open source platforms & databases
(reduced licensing cost)
Low cost security monitoring via
AWS GuardDuty
Running resources in a
cheaper region
Static Web Hosting on S3
and using S3 Select
24. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
There is a 30x cost difference between a cost
unaware architecture/workload and a highly cost
optimised one
Can this run on CentOS/Linux?
$1000
Turn off outside of work hours?
Right size down by 1 size? $118
$236
$787
Can this run on EC2 Spot? $30
Starting non-prod workload
25. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.S U M M I T
Summary
On-Premises Re-host Instance
Right Sizing
Improved
Elasticity
Correct
Purchasing
Model
Storage
Optimization
Serverless
Architecture
Managed
Services
True AWS
Optimized...
+ MORE!
Traditional TCO Comparisons
26. Thank you!
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
pjk@amazon.com