SlideShare a Scribd company logo
1 of 58
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Rotem Yossef
Summer 2017
AWS Startup Day
Cost Optimization: Don’t Overspend
#AWSstartupday
Overview
Benefits of the Cloud
Right-Sizing, Reservations & More
Development Environments
Compute Density
Containers
Serverless
Cost Benefits of the Cloud
“Friends Don’t Let
Friends Build Data
Centers”
(Charles Phillips, Infor, CEO)
Cost Benefits of the Cloud
Let’s establish why financially cloud is the right way to go
1. Move from a forecast-procurement model to a consumption model
2. Flexibility - Continuously reevaluate design choices
3. Benefit from the AWS economies of scale – price reductions over time
4. Use managed services for bigger reduction of total cost of ownership
5. Transparently attribute expenditure
Pareto Principle
Know where to target when cost optimizing
The Pareto principle (also known as the
80/20 rule, the law of the vital few, or the
principle of factor sparsity) states that, for
many events, roughly 80% of the effects
come from 20% of the causes.
80%
Spend
EC2
Amazon RDS
Transfer
Amazon SNS
Amazon SQS
Support
AmazonR53
VPNS3/S3IA
EC2 is typically the biggest line item in your
Bill with S3 coming 2nd
70-90%
By being smart about Storage & Compute
you can have a major impact on your spend
Tips
EC2 Tips
Four easy ways to help reduce EC2 spend
Spot Instances
Bid on Spot instances to significantly reduce the cost of running your applications and
lower your operating costs by up to 90% compared to On-Demand.
EC2 Scheduler
AWS offers the EC2 Scheduler, a simple solution that allows you to create custom start
and stop schedules for your Amazon EC2
EC2 Auto-scaling
Easily and automatically scale up and down clusters to meet demand based on metrics or
schedule.
Reserved Instances
With Reserved Instances, you commit to a certain term of usage to receive a significant
discount.
EC2 Tips
Four easy ways to help reduce EC2 spend
Spot Instances
Bid on Spot instances to significantly reduce the cost of running your applications and
lower your operating costs by up to 90% compared to On-Demand.
EC2 Scheduler
AWS offers the EC2 Scheduler, a simple solution that allows you to create custom start
and stop schedules for your Amazon EC2
EC2 Auto-scaling
Easily and automatically scale up and down clusters to meet demand based on metrics or
schedule.
Reserved Instances
With Reserved Instances, you commit to a certain term of usage to receive a significant
discount.
For advanced users:
Lambda + CloudWatch = Automated
Scheduling*
(Don’t forget to tag! – Check )
* https://aws.amazon.com/premiumsupport/knowledge-center/start-stop-lambda-cloudwatch/
Cost Awareness & Education
Increase visibility of spend to your teams
Treat your cost as a counterweight to performance and find the right balance.
Leverage tagging, budgets, and alerts you can notify teams of how much their
service is costing.
A simple measure of resource waste is idle resources. Identify unused CPU,
Memory, Storage. Empower your teams to pay attention to these metrics.
CostBot: Hey @rotem yesterday your services cost $28.33 which is 8%
more than the week prior.
500
1230
2873
3827
4817
6827
7819
8928
9817
1200 1400
1850
2300 2450
2800 3092 3193
4283
Jan Feb Mar Apr Jun Jul Aug Sep Oct
Users Spend
500 Users, $2.4 per
9,817 Users, $0.44 per
Cost Per User
Easy metric to track your spend
Advanced Users - Build Your Own Dashboard
Track performance and savings over time
Metric Tracking
Savings
Spend & Metrics
by Account
EC2 Usage by
Purchase Option
Right-sizing
Right-sizing
Different applications require different resources
Memory
CPU
NetworkInstances come pre-optimized for
these types of workloads:
M = Balanced
C = Compute
R/X = Memory
I/D = Storage
T = Bursting (Balanced)
P/G = GPU
Simply adding more instances without
understanding your workload can be costly.
Right-sizing
Different applications require different resources
Horizontally scaling an entire application
because you only need more CPU means
you’re potentially wasting unused resources
with memory, storage, and networking.
Understanding your workloads enables you to
optimize instance type and scale horizontally
only after you leveraged all of the currently
used resources.
Identify resource intensive components of your
application and isolate them to optimize your
utilization.
Memory
CPU
Network
EC2 Rightsizing
Am I using the most cost-effective instances?
AWS offers the Cost Optimization: EC2
Right Sizing solution, which uses
managed services to perform a right-
sizing analysis and offer detailed
recommendations for more cost-effective
instances.
Trusted Advisor
Trusted Advisor
Open Source Load Testing Tools
Over 50+ available
Siege, nGrinder, k-hawk, D-ITG, postal, mstone, iperf, loadUI, GrinderStone,
Ostinato, ContiPerf, Multi-Mechanize, Allmon, Raw Load Tester, MessAdmin,
benerator, Pylot, Hammerora, Lobo, p-unit, Faban, WebLOAD, Valgrind, httperf,
Seagull, Jchav, Tsung, Sipp, JCrawler, NTime, http_load, Web Polygraph,
Apache JMeter, and more..
http://www.opensourcetesting.org/category/performance/
You can automate this into your CI/CD pipeline to trend performance
Reserved Instances
Reserved Instances for Always-On Instances
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
Convertible RIs
Consider where flexibility is required
With a Convertible Reserved Instance, you can modify
your existing reservation across:
Instance families
Instance sizes
Operating Systems
Tenancy
Standard and Convertible Reserved Instances
Payment Attributes
Characteristic Standard Convertible
Terms (avg. discount off On-Demand) 1yr (40%),
3yr (60%)
3yr (45%)
Change Availability Zone, instance size (for Linux OS),
networking type
Yes Yes
Change instance families, operating system, tenancy, and
payment option
No Yes
Storage
Object Storage Classes on Amazon S3
Selecting the right storage class can increase savings
Active data Archive dataInfrequently accessed data
Standard
Hot
Standard - Infrequent Access
Warm
Amazon Glacier
Cold
Standard-Infrequent Access (SIA)
Comparing S3-IA to S3 Standard
What’s the Same?
Access:
Almost identical to S3 standard with
same buckets and URLs
Durability:
11 “9’s” of durability
Performance:
Same characteristics as S3
Standard, low latency, high
throughput.
What’s Different?
Availability:
Designed for 99.9% availability, vs.
99.99% availability of S3.
Cost:
Lower Capacity fees, plus retrieval
fees. Minimum object size and
retention.
Running the Numbers: S3 or S3-IA
Comparing 1 PB of object storage*
S3 S3-IA Savings %
Rule of thumb: Breakeven ≈ 100% Retrieved per Month
Content Accessed
per Month
1PB Monthly $24,117 $14,116 41%10%
$24,117 $18,350 24%50%1PB Monthly
$24,117 $23,593 2%100%1PB Monthly
* Based on US-East Prices
Managed Services
Services: Build vs Buy
Hiring experts as you scale becomes expensive
Self Built
1Musers
Managed
Service
Self Built Managed
Service
1Musers
10Musers
Services: Build vs Buy
Hiring experts as you scale becomes expensive
Self Built Managed
Service
Self Built Managed
Service
50Musers
Services: Build vs Buy
Hiring experts as you scale becomes expensive
Self Built Managed
Service
1Musers
10Musers
Self Built Managed
Service
Density
Density
Understanding how Containers help
Utilization:
Density
Understanding how Containers help
Ec2 Container Service
Container
Container
Container
Container
Container
Bins,
Libs
App
Bins,
Libs
App
Bins,
Libs
App
Bins,
Libs
App
Bins,
Libs
App
EC2EC2EC2
Reduced five instances
To three instances (-40%)
83% 78% 91%
EC2 Container Service
Highly scalable, high performance container management service
Easily Manage Clusters for Any Scale
Secure
Flexible Container Placement
Designed for Use with Other AWS Services
Extensible
Performance at Scale
Development
(And any other non-production workload)
Have Good Measurements
Percentage idle: A graph showing wasted money
Dev Workloads
Graphing Out Development Hours
0
2
4
6
8
10
12
14
16
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Dev Workloads
Graphing Out Development Hours
Power On Power Off
0
2
4
6
8
10
12
14
16
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
EC2 Scheduler
Easily Stop & Start your instances in AWS
EC2 Scheduler
Easily Stop & Start your instances in AWS
Plan for exceptions and account for different schedules and usage scenarios.
A one-size-fits-all approach is seldom realistic, even within the same team.
Choose flexible and customizable tools that can accommodate your needs.
Implement a resource-identification system, such as tags for Amazon EC2
instances.
This helps to ensure that automated actions are targeted to the correct
resource, and also allows for easier filtering, modification, and troubleshooting
according to categories that you define. You can then implement policies like
“Stop all @7 pm unless tagged otherwise”
Grant least-privilege access to individuals or systems that perform automated
actions on resources.
Autoscaling
Types of Scaling
Scaling by Schedule
- Date, time, min and max of Auto Scaling Group Size
- You can create up to 125 actions, scheduled up to 31 days into the future, for
each of your auto scaling groups. This gives you the ability to scale up to four
times a day for a month.
Scaling by Policy
- Scaling up policy – Double the group size
- Scaling down policy – Decrement by 1
- When coupled with ELB connection draining is handled for you
aws autoscaling put-scheduled-update-group-action --scheduled-action-name
scaleup-schedule-year --auto-scaling-group-name my-asg --recurrence "30 0 1
1,6,12 0" --desired-capacity 3
Dev Workloads
Use ChatOps To Power On Instances
[Rotem 2:18PM] @mrbot instances status
[MrBot 2:18 PM] rotem-dev-outerspace-b1 powered off for 2h18m
[MrBot 2:18 PM] rotem-dev-brickred-d1 powered off for 1h32m
[Rotem 2:18PM] @mrbot start dev
[MrBot 2:18 PM] Powering on rotem-dev-outerspace-b1
[MrBot 2:19 PM] Powering on rotem-dev-brickred-d1
1. Trivial to enable developers to see status of their dev instances and control start/stopping
2. Use a CloudWatch alarm to stop idle instances and send alert to tagged owner
3. Great if the developer goes on vacation or an extended holiday
Dev Workloads
T2s can handle most of your dev work
T2 Instances are incredibly cost efficient for standard development environments including RDS
Deploy Pipelines
Set thresholds to drive improvements into your processes
Source Code CI Server
Test &
Scan
Artifacts Deploy Monitoring
“Our deploys should not take longer than 2 minutes.”
Cost optimization is more than just resource optimization. It’s optimizing
your processes so your team can produce faster. Faster development = less
cost.
8s 1m 18s 21s 6s 24s 0s
Build Servers
The always on beasts of the CI/CD pipeline
Source Code CI Server
Test &
Scan
Artifacts Deploy Monitoring
12 Features Deployed
8 Core Machine
Maxed Out
- Your build server can be a blocker when a large number of simultaneous jobs are kicked off
- As a result, many people over-provision their build server to handle these situations
- Powering this off at night is helpful, but we can solve this in a more efficient way.
Source Code CI Server
Test &
Scan
Artifacts Deploy Monitoring
Build Servers
Jenkins Spot Instances Plugin
12 Features Deployed
Jenkins SpotFleet plugin
This plugin uses Spot Fleet to launch instances instead of directly
launching them by itself. Amazon EC2 attempts to maintain your Spot
fleet's target capacity as Spot prices change to maintain the fleet within the
specified price range.
Spot Spot Spot Spot
Spot Spot Spot Spot
Spot Spot Spot Spot
Using Spot
A marketplace for AWS’s excess compute capacity
• Be Fault Tolerant
• Workloads should be Stateless
• Loosely Coupled workloads preferred
• If possible, deploy to Multiple AZs
• Instance Flexibility is king
• Take advantage of the 2 minutes warning
• There is always Spot capacity available
¢
Save up to 90% compared to On-Demand¢
Build Servers
AWS CodeBuild
Fully Managed Build Service
Eliminates need to set up, patch, update,
and manage your own build servers.
Extensible
Use your own build tools and programming
Runtimes by creative custom build environments.
Continuous Scaling
Automatically scales to meet your volume. Can
Run separate builds concurrently.
Pay as You Go
Charged by the minute. No longer
billed for idle compute.
Enables CI/CD
Part of the Code* family. Integrates
Into existing CI/CD workflows including
Jenkins.
Secure
Artifacts are encrypted with keys
managed by KMS. Integrates with
IAM for granular permissions.
Serverless Architecture
Focus on your product, not your servers.
Serverless
Benefits of Serverless Architecture
Continuous ScalingNo Servers to Manage
AWS Lambda automatically
scales your application by
running code in response to each
trigger. Your code runs in parallel
and processes each trigger
individually, scaling precisely with
the size of the workload.
Subsecond Metering
With AWS Lambda, you are
charged for every 100ms your
code executes and the number of
times your code is triggered. You
don't pay anything when your
code isn't running.
AWS Lambda automatically runs
your code without requiring you to
provision or manage servers. Just
write the code and upload it to
Lambda.
Serverless
Simple serverless architecture example
Amazon
API
Gateway
AWS
Lambda
Amazon
DynamoDB
API call from
client app
Request/Response CRUD Operations
No servers to manage, update, or scale.
Summary
Reviewing Key Takeaways
The cloud helps you focus on your product and not having to manage day
to day infrastructure.
Pay for what you need - Understand your workloads and tune your
resources to match
Leverage containers and serverless architecture to reduce spend, and
simplify day to day operations.
Additional Resources
Optimize your costs when using AWS
https://aws.amazon.com/pricing/cost-optimization
AWS TCO Calculator
https://aws.amazon.com/tco-calculator
EC2 Rightsizing
https://aws.amazon.com/answers/account-management/cost-optimization-ec2-right-sizing
AWS Serverless
https://aws.amazon.com/serverless
AWS EC2 Container Service
https://aws.amazon.com/ecs
Cost Optimization Best Practices: Rotem Yosef

More Related Content

What's hot

AWS Compute Overview: Servers, Containers, Serverless, and Batch | AWS Public...
AWS Compute Overview: Servers, Containers, Serverless, and Batch | AWS Public...AWS Compute Overview: Servers, Containers, Serverless, and Batch | AWS Public...
AWS Compute Overview: Servers, Containers, Serverless, and Batch | AWS Public...Amazon Web Services
 
AWS Office Hours: Disaster Recovery
AWS Office Hours: Disaster RecoveryAWS Office Hours: Disaster Recovery
AWS Office Hours: Disaster RecoveryAmazon Web Services
 
Journey Through the AWS Cloud; Disaster Recovery
 Journey Through the AWS Cloud; Disaster Recovery Journey Through the AWS Cloud; Disaster Recovery
Journey Through the AWS Cloud; Disaster RecoveryAmazon Web Services
 
Disaster Recovery, Continuity of Operations, Backup, and Archive on AWS | AWS...
Disaster Recovery, Continuity of Operations, Backup, and Archive on AWS | AWS...Disaster Recovery, Continuity of Operations, Backup, and Archive on AWS | AWS...
Disaster Recovery, Continuity of Operations, Backup, and Archive on AWS | AWS...Amazon Web Services
 
Assessing Disaster Recovery Options for Business Continuity
Assessing Disaster Recovery Options for Business ContinuityAssessing Disaster Recovery Options for Business Continuity
Assessing Disaster Recovery Options for Business ContinuityAmazon Web Services
 
Replacing Tape Backup with Cloud-Enabled Solutions by Index Engines
Replacing Tape Backup with Cloud-Enabled Solutions by Index EnginesReplacing Tape Backup with Cloud-Enabled Solutions by Index Engines
Replacing Tape Backup with Cloud-Enabled Solutions by Index EnginesAmazon Web Services
 
Real-world High Performance & High Throughput Computing on AWS - AWS PS Summi...
Real-world High Performance & High Throughput Computing on AWS - AWS PS Summi...Real-world High Performance & High Throughput Computing on AWS - AWS PS Summi...
Real-world High Performance & High Throughput Computing on AWS - AWS PS Summi...Amazon Web Services
 
AWS re:Invent 2016: Case Study: How Atlassian Uses Amazon EFS with JIRA to Cu...
AWS re:Invent 2016: Case Study: How Atlassian Uses Amazon EFS with JIRA to Cu...AWS re:Invent 2016: Case Study: How Atlassian Uses Amazon EFS with JIRA to Cu...
AWS re:Invent 2016: Case Study: How Atlassian Uses Amazon EFS with JIRA to Cu...Amazon Web Services
 
AWS Summit Benelux 2013 - Enterprise Applications on AWS
AWS Summit Benelux 2013 - Enterprise Applications on AWSAWS Summit Benelux 2013 - Enterprise Applications on AWS
AWS Summit Benelux 2013 - Enterprise Applications on AWSAmazon Web Services
 
Disaster Recovery with AWS: Tiered Approaches to Balance Cost with Recovery O...
Disaster Recovery with AWS: Tiered Approaches to Balance Cost with Recovery O...Disaster Recovery with AWS: Tiered Approaches to Balance Cost with Recovery O...
Disaster Recovery with AWS: Tiered Approaches to Balance Cost with Recovery O...Amazon Web Services
 
AWS re:Invent 2016: Disaster Recovery and Business Continuity for Systemicall...
AWS re:Invent 2016: Disaster Recovery and Business Continuity for Systemicall...AWS re:Invent 2016: Disaster Recovery and Business Continuity for Systemicall...
AWS re:Invent 2016: Disaster Recovery and Business Continuity for Systemicall...Amazon Web Services
 
AWS Webcast - Discover Disaster Recovery Solutions in the Cloud
AWS Webcast - Discover Disaster Recovery Solutions in the CloudAWS Webcast - Discover Disaster Recovery Solutions in the Cloud
AWS Webcast - Discover Disaster Recovery Solutions in the CloudAmazon Web Services
 
Seamless Migration of Public Sector Data and Workloads to the AWS Cloud - AWS...
Seamless Migration of Public Sector Data and Workloads to the AWS Cloud - AWS...Seamless Migration of Public Sector Data and Workloads to the AWS Cloud - AWS...
Seamless Migration of Public Sector Data and Workloads to the AWS Cloud - AWS...Amazon Web Services
 
Relational Databases Utilising Amazon RDS - Technical 201
Relational Databases Utilising Amazon RDS - Technical 201Relational Databases Utilising Amazon RDS - Technical 201
Relational Databases Utilising Amazon RDS - Technical 201Amazon Web Services
 
AWS Summit 2013 | Auckland - Understanding AWS Storage Options
AWS Summit 2013 | Auckland - Understanding AWS Storage OptionsAWS Summit 2013 | Auckland - Understanding AWS Storage Options
AWS Summit 2013 | Auckland - Understanding AWS Storage OptionsAmazon Web Services
 
AWS re:Invent 2016: Develop Your Migration Toolkit (ENT312)
AWS re:Invent 2016: Develop Your Migration Toolkit (ENT312)AWS re:Invent 2016: Develop Your Migration Toolkit (ENT312)
AWS re:Invent 2016: Develop Your Migration Toolkit (ENT312)Amazon Web Services
 
Improving Backup & DR – AWS Storage Gateway - AWS Online Tech Talks
Improving Backup & DR – AWS Storage Gateway - AWS Online Tech TalksImproving Backup & DR – AWS Storage Gateway - AWS Online Tech Talks
Improving Backup & DR – AWS Storage Gateway - AWS Online Tech TalksAmazon Web Services
 

What's hot (20)

AWS Compute Overview: Servers, Containers, Serverless, and Batch | AWS Public...
AWS Compute Overview: Servers, Containers, Serverless, and Batch | AWS Public...AWS Compute Overview: Servers, Containers, Serverless, and Batch | AWS Public...
AWS Compute Overview: Servers, Containers, Serverless, and Batch | AWS Public...
 
AWS for Backup and Recovery
AWS for Backup and RecoveryAWS for Backup and Recovery
AWS for Backup and Recovery
 
AWS Office Hours: Disaster Recovery
AWS Office Hours: Disaster RecoveryAWS Office Hours: Disaster Recovery
AWS Office Hours: Disaster Recovery
 
Journey Through the AWS Cloud; Disaster Recovery
 Journey Through the AWS Cloud; Disaster Recovery Journey Through the AWS Cloud; Disaster Recovery
Journey Through the AWS Cloud; Disaster Recovery
 
State of the Union: Storage
State of the Union: StorageState of the Union: Storage
State of the Union: Storage
 
Disaster Recovery, Continuity of Operations, Backup, and Archive on AWS | AWS...
Disaster Recovery, Continuity of Operations, Backup, and Archive on AWS | AWS...Disaster Recovery, Continuity of Operations, Backup, and Archive on AWS | AWS...
Disaster Recovery, Continuity of Operations, Backup, and Archive on AWS | AWS...
 
Assessing Disaster Recovery Options for Business Continuity
Assessing Disaster Recovery Options for Business ContinuityAssessing Disaster Recovery Options for Business Continuity
Assessing Disaster Recovery Options for Business Continuity
 
Replacing Tape Backup with Cloud-Enabled Solutions by Index Engines
Replacing Tape Backup with Cloud-Enabled Solutions by Index EnginesReplacing Tape Backup with Cloud-Enabled Solutions by Index Engines
Replacing Tape Backup with Cloud-Enabled Solutions by Index Engines
 
Real-world High Performance & High Throughput Computing on AWS - AWS PS Summi...
Real-world High Performance & High Throughput Computing on AWS - AWS PS Summi...Real-world High Performance & High Throughput Computing on AWS - AWS PS Summi...
Real-world High Performance & High Throughput Computing on AWS - AWS PS Summi...
 
AWS re:Invent 2016: Case Study: How Atlassian Uses Amazon EFS with JIRA to Cu...
AWS re:Invent 2016: Case Study: How Atlassian Uses Amazon EFS with JIRA to Cu...AWS re:Invent 2016: Case Study: How Atlassian Uses Amazon EFS with JIRA to Cu...
AWS re:Invent 2016: Case Study: How Atlassian Uses Amazon EFS with JIRA to Cu...
 
AWS Summit Benelux 2013 - Enterprise Applications on AWS
AWS Summit Benelux 2013 - Enterprise Applications on AWSAWS Summit Benelux 2013 - Enterprise Applications on AWS
AWS Summit Benelux 2013 - Enterprise Applications on AWS
 
Disaster Recovery with AWS: Tiered Approaches to Balance Cost with Recovery O...
Disaster Recovery with AWS: Tiered Approaches to Balance Cost with Recovery O...Disaster Recovery with AWS: Tiered Approaches to Balance Cost with Recovery O...
Disaster Recovery with AWS: Tiered Approaches to Balance Cost with Recovery O...
 
AWS re:Invent 2016: Disaster Recovery and Business Continuity for Systemicall...
AWS re:Invent 2016: Disaster Recovery and Business Continuity for Systemicall...AWS re:Invent 2016: Disaster Recovery and Business Continuity for Systemicall...
AWS re:Invent 2016: Disaster Recovery and Business Continuity for Systemicall...
 
Cost Optimisation on AWS
Cost Optimisation on AWS Cost Optimisation on AWS
Cost Optimisation on AWS
 
AWS Webcast - Discover Disaster Recovery Solutions in the Cloud
AWS Webcast - Discover Disaster Recovery Solutions in the CloudAWS Webcast - Discover Disaster Recovery Solutions in the Cloud
AWS Webcast - Discover Disaster Recovery Solutions in the Cloud
 
Seamless Migration of Public Sector Data and Workloads to the AWS Cloud - AWS...
Seamless Migration of Public Sector Data and Workloads to the AWS Cloud - AWS...Seamless Migration of Public Sector Data and Workloads to the AWS Cloud - AWS...
Seamless Migration of Public Sector Data and Workloads to the AWS Cloud - AWS...
 
Relational Databases Utilising Amazon RDS - Technical 201
Relational Databases Utilising Amazon RDS - Technical 201Relational Databases Utilising Amazon RDS - Technical 201
Relational Databases Utilising Amazon RDS - Technical 201
 
AWS Summit 2013 | Auckland - Understanding AWS Storage Options
AWS Summit 2013 | Auckland - Understanding AWS Storage OptionsAWS Summit 2013 | Auckland - Understanding AWS Storage Options
AWS Summit 2013 | Auckland - Understanding AWS Storage Options
 
AWS re:Invent 2016: Develop Your Migration Toolkit (ENT312)
AWS re:Invent 2016: Develop Your Migration Toolkit (ENT312)AWS re:Invent 2016: Develop Your Migration Toolkit (ENT312)
AWS re:Invent 2016: Develop Your Migration Toolkit (ENT312)
 
Improving Backup & DR – AWS Storage Gateway - AWS Online Tech Talks
Improving Backup & DR – AWS Storage Gateway - AWS Online Tech TalksImproving Backup & DR – AWS Storage Gateway - AWS Online Tech Talks
Improving Backup & DR – AWS Storage Gateway - AWS Online Tech Talks
 

Similar to Cost Optimization Best Practices: Rotem Yosef

Start Up Austin 2017: Don't Overspend! Cost Optimization Best Practices to Re...
Start Up Austin 2017: Don't Overspend! Cost Optimization Best Practices to Re...Start Up Austin 2017: Don't Overspend! Cost Optimization Best Practices to Re...
Start Up Austin 2017: Don't Overspend! Cost Optimization Best Practices to Re...Amazon Web Services
 
Running Lean Architectures: How to Optimize for Cost Efficiency
Running Lean Architectures: How to Optimize for Cost Efficiency Running Lean Architectures: How to Optimize for Cost Efficiency
Running Lean Architectures: How to Optimize for Cost Efficiency Amazon Web Services
 
Operations: Cost Optimization - Don't Overspend on Infrastructure
Operations: Cost Optimization - Don't Overspend on Infrastructure Operations: Cost Optimization - Don't Overspend on Infrastructure
Operations: Cost Optimization - Don't Overspend on Infrastructure Amazon Web Services
 
AWS Cloud Cost Optimization
AWS Cloud Cost OptimizationAWS Cloud Cost Optimization
AWS Cloud Cost OptimizationTonyStark452635
 
Cloud Economics; How to Quantify the Benefits of Moving to the Cloud - Transf...
Cloud Economics; How to Quantify the Benefits of Moving to the Cloud - Transf...Cloud Economics; How to Quantify the Benefits of Moving to the Cloud - Transf...
Cloud Economics; How to Quantify the Benefits of Moving to the Cloud - Transf...Amazon Web Services
 
Achieving Your Department Objectives: Providing Better Citizen Services at Lo...
Achieving Your Department Objectives: Providing Better Citizen Services at Lo...Achieving Your Department Objectives: Providing Better Citizen Services at Lo...
Achieving Your Department Objectives: Providing Better Citizen Services at Lo...Amazon Web Services
 
AWS Summit Tel Aviv - Enterprise Track - Cost Optimization & TCO
AWS Summit Tel Aviv - Enterprise Track - Cost Optimization & TCOAWS Summit Tel Aviv - Enterprise Track - Cost Optimization & TCO
AWS Summit Tel Aviv - Enterprise Track - Cost Optimization & TCOAmazon Web Services
 
Advanced cost management strategies in AWS
Advanced cost management strategies in AWSAdvanced cost management strategies in AWS
Advanced cost management strategies in AWSAWS User Group Bengaluru
 
AWS re:Invent re:Cap - 비용 최적화 - 모범사례와 아키텍처 설계 심화편 - 이원일
AWS re:Invent re:Cap - 비용 최적화 - 모범사례와 아키텍처 설계 심화편 - 이원일AWS re:Invent re:Cap - 비용 최적화 - 모범사례와 아키텍처 설계 심화편 - 이원일
AWS re:Invent re:Cap - 비용 최적화 - 모범사례와 아키텍처 설계 심화편 - 이원일Amazon Web Services Korea
 
Journey Through the AWS Cloud: Cost Optimisation
Journey Through the AWS Cloud: Cost OptimisationJourney Through the AWS Cloud: Cost Optimisation
Journey Through the AWS Cloud: Cost OptimisationAmazon Web Services
 
AWS re:Invent 2016: Cost Optimization at Scale (ENT209)
AWS re:Invent 2016: Cost Optimization at Scale (ENT209)AWS re:Invent 2016: Cost Optimization at Scale (ENT209)
AWS re:Invent 2016: Cost Optimization at Scale (ENT209)Amazon Web Services
 
Optimizing Costs and Efficiency of AWS Services
Optimizing Costs and Efficiency of AWS Services Optimizing Costs and Efficiency of AWS Services
Optimizing Costs and Efficiency of AWS Services Amazon Web Services
 
How To Reduce Cost In AWS
How To Reduce Cost In AWSHow To Reduce Cost In AWS
How To Reduce Cost In AWSWillSmith622206
 
AWS Cost Optimization: Strategies for Maximizing Cloud Efficiency
AWS Cost Optimization: Strategies for Maximizing Cloud EfficiencyAWS Cost Optimization: Strategies for Maximizing Cloud Efficiency
AWS Cost Optimization: Strategies for Maximizing Cloud EfficiencyLucy Zeniffer
 

Similar to Cost Optimization Best Practices: Rotem Yosef (20)

Start Up Austin 2017: Don't Overspend! Cost Optimization Best Practices to Re...
Start Up Austin 2017: Don't Overspend! Cost Optimization Best Practices to Re...Start Up Austin 2017: Don't Overspend! Cost Optimization Best Practices to Re...
Start Up Austin 2017: Don't Overspend! Cost Optimization Best Practices to Re...
 
Running Lean Architectures: How to Optimize for Cost Efficiency
Running Lean Architectures: How to Optimize for Cost Efficiency Running Lean Architectures: How to Optimize for Cost Efficiency
Running Lean Architectures: How to Optimize for Cost Efficiency
 
Operations: Cost Optimization - Don't Overspend on Infrastructure
Operations: Cost Optimization - Don't Overspend on Infrastructure Operations: Cost Optimization - Don't Overspend on Infrastructure
Operations: Cost Optimization - Don't Overspend on Infrastructure
 
AWS Cloud Cost Optimization
AWS Cloud Cost OptimizationAWS Cloud Cost Optimization
AWS Cloud Cost Optimization
 
Cloud Economics; How to Quantify the Benefits of Moving to the Cloud - Transf...
Cloud Economics; How to Quantify the Benefits of Moving to the Cloud - Transf...Cloud Economics; How to Quantify the Benefits of Moving to the Cloud - Transf...
Cloud Economics; How to Quantify the Benefits of Moving to the Cloud - Transf...
 
Cloud Economics
Cloud EconomicsCloud Economics
Cloud Economics
 
Achieving Your Department Objectives: Providing Better Citizen Services at Lo...
Achieving Your Department Objectives: Providing Better Citizen Services at Lo...Achieving Your Department Objectives: Providing Better Citizen Services at Lo...
Achieving Your Department Objectives: Providing Better Citizen Services at Lo...
 
AWS Summit Tel Aviv - Enterprise Track - Cost Optimization & TCO
AWS Summit Tel Aviv - Enterprise Track - Cost Optimization & TCOAWS Summit Tel Aviv - Enterprise Track - Cost Optimization & TCO
AWS Summit Tel Aviv - Enterprise Track - Cost Optimization & TCO
 
Cost Optimization at Scale
Cost Optimization at ScaleCost Optimization at Scale
Cost Optimization at Scale
 
Advanced cost management strategies in AWS
Advanced cost management strategies in AWSAdvanced cost management strategies in AWS
Advanced cost management strategies in AWS
 
AWS re:Invent re:Cap - 비용 최적화 - 모범사례와 아키텍처 설계 심화편 - 이원일
AWS re:Invent re:Cap - 비용 최적화 - 모범사례와 아키텍처 설계 심화편 - 이원일AWS re:Invent re:Cap - 비용 최적화 - 모범사례와 아키텍처 설계 심화편 - 이원일
AWS re:Invent re:Cap - 비용 최적화 - 모범사례와 아키텍처 설계 심화편 - 이원일
 
Cost Optimization at Scale
 Cost Optimization at Scale Cost Optimization at Scale
Cost Optimization at Scale
 
Journey Through the AWS Cloud: Cost Optimisation
Journey Through the AWS Cloud: Cost OptimisationJourney Through the AWS Cloud: Cost Optimisation
Journey Through the AWS Cloud: Cost Optimisation
 
Cost Optimization at Scale
Cost Optimization at ScaleCost Optimization at Scale
Cost Optimization at Scale
 
Cloudonomics
CloudonomicsCloudonomics
Cloudonomics
 
AWS re:Invent 2016: Cost Optimization at Scale (ENT209)
AWS re:Invent 2016: Cost Optimization at Scale (ENT209)AWS re:Invent 2016: Cost Optimization at Scale (ENT209)
AWS re:Invent 2016: Cost Optimization at Scale (ENT209)
 
Optimizing Costs and Efficiency of AWS Services
Optimizing Costs and Efficiency of AWS Services Optimizing Costs and Efficiency of AWS Services
Optimizing Costs and Efficiency of AWS Services
 
Cost Optimization at Scale
Cost Optimization at ScaleCost Optimization at Scale
Cost Optimization at Scale
 
How To Reduce Cost In AWS
How To Reduce Cost In AWSHow To Reduce Cost In AWS
How To Reduce Cost In AWS
 
AWS Cost Optimization: Strategies for Maximizing Cloud Efficiency
AWS Cost Optimization: Strategies for Maximizing Cloud EfficiencyAWS Cost Optimization: Strategies for Maximizing Cloud Efficiency
AWS Cost Optimization: Strategies for Maximizing Cloud Efficiency
 

More from Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

More from Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Cost Optimization Best Practices: Rotem Yosef

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Rotem Yossef Summer 2017 AWS Startup Day Cost Optimization: Don’t Overspend #AWSstartupday
  • 2. Overview Benefits of the Cloud Right-Sizing, Reservations & More Development Environments Compute Density Containers Serverless
  • 3. Cost Benefits of the Cloud
  • 4. “Friends Don’t Let Friends Build Data Centers” (Charles Phillips, Infor, CEO)
  • 5. Cost Benefits of the Cloud Let’s establish why financially cloud is the right way to go 1. Move from a forecast-procurement model to a consumption model 2. Flexibility - Continuously reevaluate design choices 3. Benefit from the AWS economies of scale – price reductions over time 4. Use managed services for bigger reduction of total cost of ownership 5. Transparently attribute expenditure
  • 6. Pareto Principle Know where to target when cost optimizing The Pareto principle (also known as the 80/20 rule, the law of the vital few, or the principle of factor sparsity) states that, for many events, roughly 80% of the effects come from 20% of the causes. 80% Spend
  • 7. EC2 Amazon RDS Transfer Amazon SNS Amazon SQS Support AmazonR53 VPNS3/S3IA EC2 is typically the biggest line item in your Bill with S3 coming 2nd 70-90%
  • 8. By being smart about Storage & Compute you can have a major impact on your spend
  • 10. EC2 Tips Four easy ways to help reduce EC2 spend Spot Instances Bid on Spot instances to significantly reduce the cost of running your applications and lower your operating costs by up to 90% compared to On-Demand. EC2 Scheduler AWS offers the EC2 Scheduler, a simple solution that allows you to create custom start and stop schedules for your Amazon EC2 EC2 Auto-scaling Easily and automatically scale up and down clusters to meet demand based on metrics or schedule. Reserved Instances With Reserved Instances, you commit to a certain term of usage to receive a significant discount.
  • 11. EC2 Tips Four easy ways to help reduce EC2 spend Spot Instances Bid on Spot instances to significantly reduce the cost of running your applications and lower your operating costs by up to 90% compared to On-Demand. EC2 Scheduler AWS offers the EC2 Scheduler, a simple solution that allows you to create custom start and stop schedules for your Amazon EC2 EC2 Auto-scaling Easily and automatically scale up and down clusters to meet demand based on metrics or schedule. Reserved Instances With Reserved Instances, you commit to a certain term of usage to receive a significant discount. For advanced users: Lambda + CloudWatch = Automated Scheduling* (Don’t forget to tag! – Check ) * https://aws.amazon.com/premiumsupport/knowledge-center/start-stop-lambda-cloudwatch/
  • 12. Cost Awareness & Education Increase visibility of spend to your teams Treat your cost as a counterweight to performance and find the right balance. Leverage tagging, budgets, and alerts you can notify teams of how much their service is costing. A simple measure of resource waste is idle resources. Identify unused CPU, Memory, Storage. Empower your teams to pay attention to these metrics. CostBot: Hey @rotem yesterday your services cost $28.33 which is 8% more than the week prior.
  • 13. 500 1230 2873 3827 4817 6827 7819 8928 9817 1200 1400 1850 2300 2450 2800 3092 3193 4283 Jan Feb Mar Apr Jun Jul Aug Sep Oct Users Spend 500 Users, $2.4 per 9,817 Users, $0.44 per Cost Per User Easy metric to track your spend
  • 14. Advanced Users - Build Your Own Dashboard Track performance and savings over time Metric Tracking Savings Spend & Metrics by Account EC2 Usage by Purchase Option
  • 16. Right-sizing Different applications require different resources Memory CPU NetworkInstances come pre-optimized for these types of workloads: M = Balanced C = Compute R/X = Memory I/D = Storage T = Bursting (Balanced) P/G = GPU Simply adding more instances without understanding your workload can be costly.
  • 17. Right-sizing Different applications require different resources Horizontally scaling an entire application because you only need more CPU means you’re potentially wasting unused resources with memory, storage, and networking. Understanding your workloads enables you to optimize instance type and scale horizontally only after you leveraged all of the currently used resources. Identify resource intensive components of your application and isolate them to optimize your utilization. Memory CPU Network
  • 18. EC2 Rightsizing Am I using the most cost-effective instances? AWS offers the Cost Optimization: EC2 Right Sizing solution, which uses managed services to perform a right- sizing analysis and offer detailed recommendations for more cost-effective instances.
  • 21. Open Source Load Testing Tools Over 50+ available Siege, nGrinder, k-hawk, D-ITG, postal, mstone, iperf, loadUI, GrinderStone, Ostinato, ContiPerf, Multi-Mechanize, Allmon, Raw Load Tester, MessAdmin, benerator, Pylot, Hammerora, Lobo, p-unit, Faban, WebLOAD, Valgrind, httperf, Seagull, Jchav, Tsung, Sipp, JCrawler, NTime, http_load, Web Polygraph, Apache JMeter, and more.. http://www.opensourcetesting.org/category/performance/ You can automate this into your CI/CD pipeline to trend performance
  • 23. Reserved Instances for Always-On Instances 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
  • 24. Convertible RIs Consider where flexibility is required With a Convertible Reserved Instance, you can modify your existing reservation across: Instance families Instance sizes Operating Systems Tenancy
  • 25. Standard and Convertible Reserved Instances Payment Attributes Characteristic Standard Convertible Terms (avg. discount off On-Demand) 1yr (40%), 3yr (60%) 3yr (45%) Change Availability Zone, instance size (for Linux OS), networking type Yes Yes Change instance families, operating system, tenancy, and payment option No Yes
  • 27. Object Storage Classes on Amazon S3 Selecting the right storage class can increase savings Active data Archive dataInfrequently accessed data Standard Hot Standard - Infrequent Access Warm Amazon Glacier Cold
  • 28. Standard-Infrequent Access (SIA) Comparing S3-IA to S3 Standard What’s the Same? Access: Almost identical to S3 standard with same buckets and URLs Durability: 11 “9’s” of durability Performance: Same characteristics as S3 Standard, low latency, high throughput. What’s Different? Availability: Designed for 99.9% availability, vs. 99.99% availability of S3. Cost: Lower Capacity fees, plus retrieval fees. Minimum object size and retention.
  • 29. Running the Numbers: S3 or S3-IA Comparing 1 PB of object storage* S3 S3-IA Savings % Rule of thumb: Breakeven ≈ 100% Retrieved per Month Content Accessed per Month 1PB Monthly $24,117 $14,116 41%10% $24,117 $18,350 24%50%1PB Monthly $24,117 $23,593 2%100%1PB Monthly * Based on US-East Prices
  • 31. Services: Build vs Buy Hiring experts as you scale becomes expensive Self Built 1Musers Managed Service
  • 32. Self Built Managed Service 1Musers 10Musers Services: Build vs Buy Hiring experts as you scale becomes expensive Self Built Managed Service
  • 33. Self Built Managed Service 50Musers Services: Build vs Buy Hiring experts as you scale becomes expensive Self Built Managed Service 1Musers 10Musers Self Built Managed Service
  • 36. Density Understanding how Containers help Ec2 Container Service Container Container Container Container Container Bins, Libs App Bins, Libs App Bins, Libs App Bins, Libs App Bins, Libs App EC2EC2EC2 Reduced five instances To three instances (-40%) 83% 78% 91%
  • 37. EC2 Container Service Highly scalable, high performance container management service Easily Manage Clusters for Any Scale Secure Flexible Container Placement Designed for Use with Other AWS Services Extensible Performance at Scale
  • 38. Development (And any other non-production workload)
  • 39. Have Good Measurements Percentage idle: A graph showing wasted money
  • 40. Dev Workloads Graphing Out Development Hours 0 2 4 6 8 10 12 14 16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
  • 41. Dev Workloads Graphing Out Development Hours Power On Power Off 0 2 4 6 8 10 12 14 16 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
  • 42. EC2 Scheduler Easily Stop & Start your instances in AWS
  • 43. EC2 Scheduler Easily Stop & Start your instances in AWS Plan for exceptions and account for different schedules and usage scenarios. A one-size-fits-all approach is seldom realistic, even within the same team. Choose flexible and customizable tools that can accommodate your needs. Implement a resource-identification system, such as tags for Amazon EC2 instances. This helps to ensure that automated actions are targeted to the correct resource, and also allows for easier filtering, modification, and troubleshooting according to categories that you define. You can then implement policies like “Stop all @7 pm unless tagged otherwise” Grant least-privilege access to individuals or systems that perform automated actions on resources.
  • 44. Autoscaling Types of Scaling Scaling by Schedule - Date, time, min and max of Auto Scaling Group Size - You can create up to 125 actions, scheduled up to 31 days into the future, for each of your auto scaling groups. This gives you the ability to scale up to four times a day for a month. Scaling by Policy - Scaling up policy – Double the group size - Scaling down policy – Decrement by 1 - When coupled with ELB connection draining is handled for you aws autoscaling put-scheduled-update-group-action --scheduled-action-name scaleup-schedule-year --auto-scaling-group-name my-asg --recurrence "30 0 1 1,6,12 0" --desired-capacity 3
  • 45. Dev Workloads Use ChatOps To Power On Instances [Rotem 2:18PM] @mrbot instances status [MrBot 2:18 PM] rotem-dev-outerspace-b1 powered off for 2h18m [MrBot 2:18 PM] rotem-dev-brickred-d1 powered off for 1h32m [Rotem 2:18PM] @mrbot start dev [MrBot 2:18 PM] Powering on rotem-dev-outerspace-b1 [MrBot 2:19 PM] Powering on rotem-dev-brickred-d1 1. Trivial to enable developers to see status of their dev instances and control start/stopping 2. Use a CloudWatch alarm to stop idle instances and send alert to tagged owner 3. Great if the developer goes on vacation or an extended holiday
  • 46. Dev Workloads T2s can handle most of your dev work T2 Instances are incredibly cost efficient for standard development environments including RDS
  • 47. Deploy Pipelines Set thresholds to drive improvements into your processes Source Code CI Server Test & Scan Artifacts Deploy Monitoring “Our deploys should not take longer than 2 minutes.” Cost optimization is more than just resource optimization. It’s optimizing your processes so your team can produce faster. Faster development = less cost. 8s 1m 18s 21s 6s 24s 0s
  • 48. Build Servers The always on beasts of the CI/CD pipeline Source Code CI Server Test & Scan Artifacts Deploy Monitoring 12 Features Deployed 8 Core Machine Maxed Out - Your build server can be a blocker when a large number of simultaneous jobs are kicked off - As a result, many people over-provision their build server to handle these situations - Powering this off at night is helpful, but we can solve this in a more efficient way.
  • 49. Source Code CI Server Test & Scan Artifacts Deploy Monitoring Build Servers Jenkins Spot Instances Plugin 12 Features Deployed Jenkins SpotFleet plugin This plugin uses Spot Fleet to launch instances instead of directly launching them by itself. Amazon EC2 attempts to maintain your Spot fleet's target capacity as Spot prices change to maintain the fleet within the specified price range. Spot Spot Spot Spot Spot Spot Spot Spot Spot Spot Spot Spot
  • 50. Using Spot A marketplace for AWS’s excess compute capacity • Be Fault Tolerant • Workloads should be Stateless • Loosely Coupled workloads preferred • If possible, deploy to Multiple AZs • Instance Flexibility is king • Take advantage of the 2 minutes warning • There is always Spot capacity available ¢ Save up to 90% compared to On-Demand¢
  • 51. Build Servers AWS CodeBuild Fully Managed Build Service Eliminates need to set up, patch, update, and manage your own build servers. Extensible Use your own build tools and programming Runtimes by creative custom build environments. Continuous Scaling Automatically scales to meet your volume. Can Run separate builds concurrently. Pay as You Go Charged by the minute. No longer billed for idle compute. Enables CI/CD Part of the Code* family. Integrates Into existing CI/CD workflows including Jenkins. Secure Artifacts are encrypted with keys managed by KMS. Integrates with IAM for granular permissions.
  • 53. Focus on your product, not your servers.
  • 54. Serverless Benefits of Serverless Architecture Continuous ScalingNo Servers to Manage AWS Lambda automatically scales your application by running code in response to each trigger. Your code runs in parallel and processes each trigger individually, scaling precisely with the size of the workload. Subsecond Metering With AWS Lambda, you are charged for every 100ms your code executes and the number of times your code is triggered. You don't pay anything when your code isn't running. AWS Lambda automatically runs your code without requiring you to provision or manage servers. Just write the code and upload it to Lambda.
  • 55. Serverless Simple serverless architecture example Amazon API Gateway AWS Lambda Amazon DynamoDB API call from client app Request/Response CRUD Operations No servers to manage, update, or scale.
  • 56. Summary Reviewing Key Takeaways The cloud helps you focus on your product and not having to manage day to day infrastructure. Pay for what you need - Understand your workloads and tune your resources to match Leverage containers and serverless architecture to reduce spend, and simplify day to day operations.
  • 57. Additional Resources Optimize your costs when using AWS https://aws.amazon.com/pricing/cost-optimization AWS TCO Calculator https://aws.amazon.com/tco-calculator EC2 Rightsizing https://aws.amazon.com/answers/account-management/cost-optimization-ec2-right-sizing AWS Serverless https://aws.amazon.com/serverless AWS EC2 Container Service https://aws.amazon.com/ecs