Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Cost optimization - Don't overspend on AWS

1,445 views

Published on

Levers and best practices for cost optimization when running applications on the AWS cloud.

Published in: Technology
  • Be the first to comment

Cost optimization - Don't overspend on AWS

  1. 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Sandeep Cashyap, Head Business Development, Bangalore AWS Startup Day Cost Optimization: Don’t Overspend
  2. 2. AWS Global Infrastructure 16 Regions – 44 Availability Zones – 90 Edge Locations Region & Number of Availability Zones AWS GovCloud (2) EU Ireland (3) US West Frankfurt (2) Oregon (3) London (2) Northern California (3) Asia Pacific US East Singapore (2) N. Virginia (5), Ohio (3) Sydney (3), Tokyo (3), Seoul (2), Mumbai (2) Canada Central (2) China Beijing (2) South America São Paulo (3) Announced Regions Paris, China, Sweden,Bahrain, Hong Kong US Govcloud(US-East)
  3. 3. Account Support Support Managed Services Professional Services Partner Ecosystem Training & Certification Solution Architects Account Management Security & PricingReport s Technical Acct. Mgmt Marketplace Business Applications DevOps Tools Business Intelligence Security Networking Database & Storage SaaS Subscription s Operating Systems Mobile Build, Test, Monitor Apps Push NotificationsBuild, Deploy, Manage APIsDevice Testing Identity Enterprise Application s Document Sharing Email & Calendaring Hosted Desktops Application Streaming Backup Game Developme nt 3D Game Engine Multi-player Backends Mgmt. Tools Monitoring Auditing Service Catalog Server Mgmt Configuratio n Tracking Optimization Resource Templates Automation Analytics Query Large Data Sets Elasticsearch Business Analytics Hadoop/Spar k Real-time Data Streaming Orchestratio n Workflows Managed Search Managed ETL Artificial Intelligence Voice & Text Chatbots Machine Learning Text-to- Speech Image Analysis IoT Rules Engine Local Compute Sync Device Shadows Device Gateway Registry Hybrid Devices & Edge Systems Data Integration Integrated Networking Resource Managemen t VMware on AWS Identity Federation Migration Application Discovery Application Migration Database Migration Server Migration Data Migration Infrastructure Regions Availability Zones Points of Presence Compute Containers Event-driven Computing Virtual Machines Simple Servers Auto Scaling Batch Web Applications Storage Object Storage Archive Block Storage Managed File Storage Exabyte- scale Data Transport Database MariaDB Data Warehousin g NoSQLAurora MySQL Oracle SQL ServerPostgreSQL Application Services Transcoding Step Functions Messaging Security Certificate Managemen t Web App. Firewall Identity & Access Key Storage & Mgmt DDoS Protection Application Analysis Active Directory Dev Tools Private Git Repositories Continuous Delivery Build, Test, and Debug Deployment Networking Isolated Resources Dedicated Connections Load Balancing Scalable DNS Global CDN The AWS Platform
  4. 4. What sets AWS apart? Building and managing cloud since 2006 90+ services to support any cloud workload; rapid customer driven releases 16 regions, 44 availability zones, 90 edge locations Thousands of partners; 3,800+ Marketplace products Experience: 1M+ customers Service Breadth & Depth; pace of innovation Global Footprint Ecosystem Fine-grained controlSecurity Fully integrated in AWSArtificial Intelligence Gartner Magic quadrant recognizing AWS for 7th year Enterprise leader
  5. 5. Introduction to Cloud Economics
  6. 6. Different sides of Cloud Economics Cloud Economics TCO & Business Value Cost Optimization
  7. 7. Continually lowering prices for customers is in our DNA – 62 Done Till Date Reduced Prices More Customers More AWS Usage More Infrastructure Economies of Scale Lower Infrastructure Costs Ecosystem Global Footprint New Features New Services Infrastructure Innovation We pass the savings along to our customers in the form of low prices and continuous reductions
  8. 8. Introduction to Cost Optimization
  9. 9. With the AWS cloud, you only pay for what you use.
  10. 10. So you’re feeling pretty good.
  11. 11. Until your CFO shows up with the bill
  12. 12. Cost optimization is… going from… to… pay for what you provision pay for what you need
  13. 13. Where can you optimise? Technical perspective
  14. 14. “Harder”Easier Rightsizing before migration Rightsizing after migration Instance on-off to meet dev- test-staging work hours Reserved Instances Spot instances Match usage to storage class You can optimise in many areas … Instance scaling to meet external demand Architecting for cost after migration Deleting unused resources Containers to maximize utilisation Consolidated billing Automation and time saving via Cloud Formation Planning/ Architecting for cost before migration
  15. 15. “Harder”Easier Rightsizing before migration Instance on-off to meet dev- test-staging work hours Spot instances Match usage to storage class So how much do these activities save? Instance scaling to meet external demand Architecting for cost after migration Deleting unused resources Containers to maximize utilisation Consolidate billing Planning/ Architecting for cost before migration ~7% 50% + 100 % ~40 % 80% + ~70 % ~80 % ~80 % 80% + ~50 % Rightsizing after migration Reserved Instances Automation and time saving via Cloud Formation ~35 % ?% 50% +
  16. 16. The Five Pillars of Cost Optimization Right-Sizing Your Instances Pick the Right Pricing Model Increase Elasticity Measuring & Monitoring Match usage to storage class
  17. 17. 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 • Leveraging Amazon CloudWatch metrics and setting up custom RAM metrics Rule of thumb: Right size, then reserve. (But if you need to save fast, you can still reserve first)
  18. 18. Pillar 2: Increase Elasticity Turn off non-production instances • Look for dev/test, nonproduction instances that are running always-on and turn them off. • Lambda + CloudWatch = Automated Scheduling* Autoscale production • Use Auto Scaling to scale up and down based on demand and usage (for example, demand spikes). * https://aws.amazon.com/premiumsupport/knowledge-center/start-stop-lambda-cloudwatch/
  19. 19. Released 1st June 2017: Amazon RDS start-stop • For MySQL, MariaDB, PostgreSQL, Oracle and SQL Server • While your database instance is stopped, you are charged for provisioned storage, manual snapshots and automated backup storage, but not for database instance hours. • Can stop for 7 days at a time • Available to database instances running in a Single-AZ deployment which are not part of a Read Replica (both source and replica) configuration • See Amazon RDS Pricing for regional availability.
  20. 20. Tagging is crucial to elasticity and rightsizing bit.ly/co17_tag
  21. 21. Cost Explorer
  22. 22. Pillar 3: Leveraging the Right Pricing Model Reserved Instances Spot Instances On-Demand
  23. 23. 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 EC2 Purchasing Options
  24. 24. Reserved Instances for Always-On Workloads Commitment level 1 year 3 year AWS services offering RIs Amazon EC2 Amazon RDS Amazon Redshift Amazon ElastiCache Amazon DynamoDB (not quite RI) Amazon CloudFront (not quite RI)
  25. 25. Payback on RIs is pretty good * Customers only committing for payback period as it’s like a “free” instance after payback period compared to on-demand • 1 year (approx. 7-8 months payback) • 3 year (approx. 12-18 months payback)
  26. 26. Reserved Instance Payment Options The No Upfront option provides a discount compared to On-Demand (up to 55% off) and does not require an upfront payment. • Low hourly rate for the RI for every hour in the term regardless of usage The Partial Upfront option balances the payments of an RI between upfront and hourly and provides a higher discount (up to 76%) compared to the No Upfront option. • Lower hourly rate for every hour in the term regardless of usage With the All Upfront option you benefit from the highest discount compared to On- Demand (up to 77% off) • Full upfront payment with no additional usage fees for the hours used via the RI during the term
  27. 27. Understanding the different RI types 1 year 3 years Standard Regional (with Size Flex) Regional (with Size Flex) AZ-Specific (with capacity reservation) AZ-Specific (with capacity reservation) Convertible Regional (with Size Flex) AZ-Specific (with capacity reservation) Note: can easily switch between Regional and AZ-Specific at no cost Shaded items affect pricing
  28. 28. Standard Reserved Instances • A Standard RI offers you the most amount of discount when you commit to a 1 year or 3 year term • 3 Year RIs offer a higher discount as compared to a 1 Year RI • You can purchase a Standard RI by specifying the instance type (e.g. m4.xlarge), OS (e.g. Windows), Tenancy (e.g. Default) and AZ (optional) • Instance size flexibility (large, small etc) within a family (M4)
  29. 29. Convertible Reserved Instances With a Convertible RI, you can modify your existing reservation across: Instance families Instance sizes Operating Systems Tenancy
  30. 30. Understanding Convertible Reserved Instances You are committing to: 3 years (no change on conversion) Region EC2 on AWS Spend (convert to equal or greater $)
  31. 31. Impact of May 2017 Reserved Instance Price Drop As AWS scales, we share the savings with our customers. Since 2006 we have dropped our prices over 62 times.
  32. 32. No-upfront discount is now much closer to partial upfront discount New! Available for newer instances m4.large, Linux/Unix, Singapore, Shared
  33. 33. Instance Size flexibility now launched for RDS
  34. 34. • Build it into your auto scaling groups • Batch • Transcoding • EMR • and more… Can be used for production * Compared to On Demand price based on specific EC2 instance type, region, and Availability Zone Spot provides incredible savings for the right workloads (stateless applications)
  35. 35. Spot price vs On-Demand 72% saving from a few lines of code
  36. 36. Strike a Balance Finding balance between pricing options Reserved Instances On Demand Spot
  37. 37. Pillar 4: Leveraging the Right Storage Class Block Storage Object Storage
  38. 38. Use appropriately sized EBS, Modify if needed with zero downtime Note: decreasing volume size is possible, but requires a different process
  39. 39. Object Storage Classes on Amazon S3 Active data Archive dataInfrequently accessed data Standard Hot Standard - Infrequent Access Warm Amazon Glacier Cold
  40. 40. 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
  41. 41. Mechanisms for self-sustained optimisation Management Perspective Pillar 5: Measuring and Monitoring
  42. 42. “Good intentions never work, you need good mechanisms to make anything happen” – Jeff Bezos What do we mean by mechanisms?
  43. 43. Setup Mechanisms for Optimisation $ Leadership Support Cloud Center of Excellence Reporting & Tooling Measures and Targets of Success Tagging & Enforcement of Tagging Stakeholders from the Business Ongoing Education Governance and Controls
  44. 44. Control who can provision resources
  45. 45. AWS Organizations allows definition of policies by Organisational Unit https://aws.amazon.com/organizations/
  46. 46. Measures and Targets of Optimisation: Guiding metrics • % instances turned off daily • % of instances rightsized • % always-on resources covered by RIs • % RI utilization • % Spot usage • % of resources tagged These help you know you’re headlining in the right direction
  47. 47. AWS Cost Explorer is an excellent starting point
  48. 48. Cost Explorer – Track your RI Utilization
  49. 49. AWS Budgets Update – Track Cloud Costs and Usage You can create up to 20,000 budgets per payer account You get notified if the budget criteria you set are reached
  50. 50. AWS Trusted Advisor can point you towards inefficiencies
  51. 51. AWS Cost and Usage Report (CUR) > Redshift / Athena > Quicksight can implement custom reporting logic Cost and Usage Report in S3 Redshift or Athena + SQL https://aws.amazon.com/blogs/aws/new-upload- aws-cost-usage-reports-to-redshift-and-quicksight/ Quicksight
  52. 52. Governance and Controls • What’s your cost review process? • How do you control visibility based on organizational unit and level? • What happens when costs increase unexpectedly? • Who gets to switch on resources? • What happens to resources that are not tagged? • What happens when a business unit nears or exceeds budget? re:Invent 2015 (ISM309) Efficient Innovation: High-Velocity Cost Management at Netflix https://bit.ly/co17_video4
  53. 53. Partners can help you accelerate your initial Reporting & Tooling maturity
  54. 54. Cost Optimisation Video Resources (found on YouTube) • re:Invent 2015 | (ISM402) Cost Optimisation at Scale https://bit.ly/co17_video1 • re:Invent 2016 | (ARC310) Cost Optimising Your Architecture: Practical Design Steps For Savings https://bit.ly/co17_video2 • re:Invent 2014 | (ARC201) Cloud-Native Cost Optimisation https://bit.ly/co17_video3 • AWS Summit Series 2016 | Chicago - Cost Optimization at Scale https://bit.ly/co17_video5
  55. 55. Next Steps 1. Enforce Tagging 2. Check Trusted Advisor Reports 3. Enabling CUR,DBR and cloud watch metrics 4. Working closely with Amazon team 5. Education – Training and well architected framework 6. Keep saving cost 
  56. 56. Thank you!
  57. 57. Q&A

×