SlideShare a Scribd company logo
1 of 29
Download to read offline
AWS Bills and How a Tester CAN Help Reduce Them
About Me
Jet Liu:
● Career Tester
● Passionate about quality and people
Why Should I Care?
Credit: Theresa Neate
Quality for Cloud Based Apps:
● Reliability + - good architecture, design, implementation, monitoring etc
● Performance + - sufficient computing resources
● Security + - auditing, regular pen-tests, alerting etc
● Resilience + - good design, multi AZ/region redundancies, backups, DR
● Compliance + - data retention, traceability, privacy etc
● Etc.
= COST
AWS Pricing
AWS offers you a pay-as-you-go approach for pricing for over 70
cloud services. With AWS you pay only for the individual services you
need, for as long as you use them, and without requiring long-term
contracts or complex licensing.
You only pay for the services you consume, and once you stop using
them, there are no additional costs or termination fees.
Source: https://aws.amazon.com/pricing/
The Bill:
Context
● Example system on AWS
○ Microservices, distributed system
○ Immutable AMI
○ Prefixed stacks
○ Dev, QA, Staging, Production
● Uses ~30 different AWS services
● AWS costs can be expensive, across
multiple accounts
EC2
Tip #1: Use the right EC2 type
1. Experiment with EC2 types and create a consistent, repeatable way of measuring performance
2. Use reserved, on-demand, spot instances appropriately
● Lots of instances: ~1500 instances on prod + non-prod
● On Demand vs Reserved vs Spot
● Ts vs Ms vs Cs vs Xs vs Rs vs Is etc.
● T2 “Burstable Performance” - watch out for CPU credits
● Can you use the cheapest in non-prod environments?
Auto Scaling Group
Tool Example #1:
Instance Churn Detector
Load Balancers
● Included in EC2 cost
● CLB (ELB) vs ALB vs NLB
https://jackiechen.org/2018/01/10/aws-elb-clb-vs-alb-vs-nlb/
Tip #2:
Migrate away from CLB to ALB/NLB where appropriate and consolidate
multiple stacks/applications to share ALB/NLB.
Note, some limits may apply, eg. # of rules, # of certificates, # of listeners
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html
Data Transfer
Tip #3: Be mindful of data transfer
Compression of data may help eg. JSON payloads, stack traces
RDS
Tip #4: RDS still requires good architecture, design & implementation:
● Proper application design can lead to cheaper instance sizes being required
● Choices of engine may be important eg. Mysql vs SQLServer vs Postgres vs Aurora
● Performance test with consistent approach and right tooling in anticipation of change
Ideas:
● Use EC2/Containers rather than RDS eg. db.t2.small vs. t2.small (1VCPU, 2GB RAM): $0.052 vs $0.0292
● Consolidate databases eg. 1 RDS instance with multiple DBs vs Many RDS instances each with a single DB
DynamoDB
Tip #5: use DynamoDB efficiently
● Create the correct indexes
● Enable TTL where appropriate
● Enable autoscaling where appropriate
● Reserve capacity where appropriate
Tool Example #2: DynamoDb throughput checker
Note. throughput not guaranteed due to partitioning. Autoscaling may not be “quick” enough..
ElastiCache
Tip #6: Use ElastiCache efficiently
● Cache != Database
● Capacity plan and set TTL for data
● Pre-warm cache, to enable use of smaller instances
Idea:
Use EC2/Containers rather than ElastiCache eg. cache.t2.small vs t2.small (1.5GB vs. 2GB) $0.052
vs $0.0292
Cloudwatch
Tip #7:
Disable detailed
metrics when not
needed
Tip #8: “Sleep” resources when not needed:
Tool Example #3: aws-sleeper
● Shutdown all EC2s in a stack
● Set throughputs for Dynamodb tables to 0
● Stop RDS
● Triggered by cron job or on demand
Note: Will still pay for load balancers, storage, cache, etc
Tool Example #4: stack-tinkerer
Disable workers selectively when not needed by
setting desired instance value in ASG
Idea:
Auto shutdown workers by default - create on demand
triggered by eg. New items in a queue
AWS Lambda
Tip #9: Replace EC2 with lambda functions where appropriate (but
calculate likely production costs first)
Cost:
● Number of executions
● Duration of each execution
● Memory allocation
● Data transfer
Note. Beware of potential “cold starts” and logging challenges.
Tip #10: Tag resources
10 Tips Recap
1. Choose the right EC2 type
2. Migrate from CLB to ALB/NLB
3. Be mindful of data transfer
4. RDS is no replacement for good RDMS best practices
5. Use Dynamodb efficiently
6. Use ElastiCache efficiently
7. Disable detailed Cloudwatch metrics when not needed
8. Sleep resources when not needed
9. Replace EC2 wth AWS lambda functions where appropriate
10. Tag resources
Other Tips
● Check out official AWS docs for ‘Pricing’ and ‘Limits’
● Make use of free tier eg. 1st million requests free for AWS Lambda p.m.
● Use other AWS regions eg. db.t2.small
○ 0.034 (Oregon) vs. 0.038 (London) vs. 0.044 (California) vs. v0.049
(Mumbai) vs 0.052 (Sydney)
● Engage AWS professional services to review architecture and choice of services
● Think critically about need for redundancy, backups
● Find defects in AWS and get service credits (and sign NDA)
● Foreign entities may not need to pay GST
Lessons
● Continuous improvement vs. once-off exercise
○ Testers should ask critical questions. Eg. is this the right service, what is the likely cost in prod?
● Improve reproducibility by regularly recreating environments/stacks (eg. before Easter/Christmas)
and improving tooling eg. Tools to backup/restore data in ElastiCache, DynamoDb, RDS
○ Testers can help by creating/improving tooling - fill the gaps and experiment POC
● Create visibility, communicate changes and celebrate success
○ Tell people what you have done and quantify the benefits
● Team responsibility but need owners
○ Advocate for efficiency and drive for changes, stay up-to-date with AWS changes
● Human costs vs AWS costs
○ Be persistent and pragmatic, look out for new features that solve old problems
Aws bills and how a tester can help reduce them
Aws bills and how a tester can help reduce them

More Related Content

What's hot

Aws architecture problems while being fancy
Aws architecture problems while being fancyAws architecture problems while being fancy
Aws architecture problems while being fancyGoran Kopevski
 
AWS Webcast - Explore the AWS Cloud
AWS Webcast - Explore the AWS CloudAWS Webcast - Explore the AWS Cloud
AWS Webcast - Explore the AWS CloudAmazon Web Services
 
Cloud Overview
Cloud OverviewCloud Overview
Cloud Overviewiasaglobal
 
Amazon Web Services lection 6
Amazon Web Services lection 6  Amazon Web Services lection 6
Amazon Web Services lection 6 Binary Studio
 
AWS Cost Optimisation - November 2018
AWS Cost Optimisation - November 2018AWS Cost Optimisation - November 2018
AWS Cost Optimisation - November 2018James Bromberger
 
Amazon Web Services lection 5
Amazon Web Services lection 5  Amazon Web Services lection 5
Amazon Web Services lection 5 Binary Studio
 
Autoscale DynamoDB with Dynamic DynamoDB
Autoscale DynamoDB with Dynamic DynamoDBAutoscale DynamoDB with Dynamic DynamoDB
Autoscale DynamoDB with Dynamic DynamoDBSebastian Dahlgren
 
LatJUG Amazon Web Services
LatJUG Amazon Web ServicesLatJUG Amazon Web Services
LatJUG Amazon Web ServicesDmitry Buzdin
 
Big Data Day LA 2015 - Lessons learned from scaling Big Data in the Cloud by...
Big Data Day LA 2015 -  Lessons learned from scaling Big Data in the Cloud by...Big Data Day LA 2015 -  Lessons learned from scaling Big Data in the Cloud by...
Big Data Day LA 2015 - Lessons learned from scaling Big Data in the Cloud by...Data Con LA
 
Cost Optimization as Major Architectural Consideration for Cloud Application
Cost Optimization as Major Architectural Consideration for Cloud ApplicationCost Optimization as Major Architectural Consideration for Cloud Application
Cost Optimization as Major Architectural Consideration for Cloud ApplicationUdayan Banerjee
 
Batchly v Azure batch
Batchly v Azure batchBatchly v Azure batch
Batchly v Azure batchCMPUTE
 
Advanced Autoscaling for Kubernetes & Amazon ECS - DEM05 - Anaheim AWS Summit
Advanced Autoscaling for Kubernetes & Amazon ECS - DEM05 - Anaheim AWS SummitAdvanced Autoscaling for Kubernetes & Amazon ECS - DEM05 - Anaheim AWS Summit
Advanced Autoscaling for Kubernetes & Amazon ECS - DEM05 - Anaheim AWS SummitAmazon Web Services
 
Amazon Web Services lection 2
Amazon Web Services lection 2Amazon Web Services lection 2
Amazon Web Services lection 2Binary Studio
 
AWS EMR (Elastic Map Reduce) explained
AWS EMR (Elastic Map Reduce) explainedAWS EMR (Elastic Map Reduce) explained
AWS EMR (Elastic Map Reduce) explainedHarsha KM
 
AWS Customer Presentation - How TubeMogul uses AWS
AWS Customer Presentation - How TubeMogul uses AWSAWS Customer Presentation - How TubeMogul uses AWS
AWS Customer Presentation - How TubeMogul uses AWSAmazon Web Services
 
AWS user group Serverless in September - Chris Johnson Bidler "Go Serverless ...
AWS user group Serverless in September - Chris Johnson Bidler "Go Serverless ...AWS user group Serverless in September - Chris Johnson Bidler "Go Serverless ...
AWS user group Serverless in September - Chris Johnson Bidler "Go Serverless ...AWS Chicago
 

What's hot (20)

Aws architecture problems while being fancy
Aws architecture problems while being fancyAws architecture problems while being fancy
Aws architecture problems while being fancy
 
AWS Webcast - Explore the AWS Cloud
AWS Webcast - Explore the AWS CloudAWS Webcast - Explore the AWS Cloud
AWS Webcast - Explore the AWS Cloud
 
Cloud Overview
Cloud OverviewCloud Overview
Cloud Overview
 
Amazon Web Services lection 6
Amazon Web Services lection 6  Amazon Web Services lection 6
Amazon Web Services lection 6
 
AWS Cost Optimisation - November 2018
AWS Cost Optimisation - November 2018AWS Cost Optimisation - November 2018
AWS Cost Optimisation - November 2018
 
Amazon Web Services lection 5
Amazon Web Services lection 5  Amazon Web Services lection 5
Amazon Web Services lection 5
 
Aws Kinesis
Aws KinesisAws Kinesis
Aws Kinesis
 
Autoscale DynamoDB with Dynamic DynamoDB
Autoscale DynamoDB with Dynamic DynamoDBAutoscale DynamoDB with Dynamic DynamoDB
Autoscale DynamoDB with Dynamic DynamoDB
 
LatJUG Amazon Web Services
LatJUG Amazon Web ServicesLatJUG Amazon Web Services
LatJUG Amazon Web Services
 
Architecture et coût
Architecture et coûtArchitecture et coût
Architecture et coût
 
Big Data Day LA 2015 - Lessons learned from scaling Big Data in the Cloud by...
Big Data Day LA 2015 -  Lessons learned from scaling Big Data in the Cloud by...Big Data Day LA 2015 -  Lessons learned from scaling Big Data in the Cloud by...
Big Data Day LA 2015 - Lessons learned from scaling Big Data in the Cloud by...
 
Cost Optimization as Major Architectural Consideration for Cloud Application
Cost Optimization as Major Architectural Consideration for Cloud ApplicationCost Optimization as Major Architectural Consideration for Cloud Application
Cost Optimization as Major Architectural Consideration for Cloud Application
 
Batchly v Azure batch
Batchly v Azure batchBatchly v Azure batch
Batchly v Azure batch
 
Advanced Autoscaling for Kubernetes & Amazon ECS - DEM05 - Anaheim AWS Summit
Advanced Autoscaling for Kubernetes & Amazon ECS - DEM05 - Anaheim AWS SummitAdvanced Autoscaling for Kubernetes & Amazon ECS - DEM05 - Anaheim AWS Summit
Advanced Autoscaling for Kubernetes & Amazon ECS - DEM05 - Anaheim AWS Summit
 
Amazon Web Services lection 2
Amazon Web Services lection 2Amazon Web Services lection 2
Amazon Web Services lection 2
 
Paving The Way To The Hybrid Cloud
Paving The Way To The Hybrid CloudPaving The Way To The Hybrid Cloud
Paving The Way To The Hybrid Cloud
 
AWS EMR (Elastic Map Reduce) explained
AWS EMR (Elastic Map Reduce) explainedAWS EMR (Elastic Map Reduce) explained
AWS EMR (Elastic Map Reduce) explained
 
AWS Customer Presentation - How TubeMogul uses AWS
AWS Customer Presentation - How TubeMogul uses AWSAWS Customer Presentation - How TubeMogul uses AWS
AWS Customer Presentation - How TubeMogul uses AWS
 
How to Migrate a Web App to AWS
How to Migrate a Web App to AWSHow to Migrate a Web App to AWS
How to Migrate a Web App to AWS
 
AWS user group Serverless in September - Chris Johnson Bidler "Go Serverless ...
AWS user group Serverless in September - Chris Johnson Bidler "Go Serverless ...AWS user group Serverless in September - Chris Johnson Bidler "Go Serverless ...
AWS user group Serverless in September - Chris Johnson Bidler "Go Serverless ...
 

Similar to Aws bills and how a tester can help reduce them

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
 
Pat_Davies_AWSCostOptimization_Final.pdf
Pat_Davies_AWSCostOptimization_Final.pdfPat_Davies_AWSCostOptimization_Final.pdf
Pat_Davies_AWSCostOptimization_Final.pdfAWS Chicago
 
Cloud Architecture best practices
Cloud Architecture best practicesCloud Architecture best practices
Cloud Architecture best practicesOmid Vahdaty
 
FinOps - AWS Cost and Operational Efficiency - Pop-up Loft Tel Aviv
FinOps - AWS Cost and Operational Efficiency - Pop-up Loft Tel AvivFinOps - AWS Cost and Operational Efficiency - Pop-up Loft Tel Aviv
FinOps - AWS Cost and Operational Efficiency - Pop-up Loft Tel AvivAmazon Web Services
 
Serverless at Lifestage
Serverless at LifestageServerless at Lifestage
Serverless at LifestageBATbern
 
Migrating a multi tenant app to Azure (war biopic)
Migrating a multi tenant app to Azure (war biopic)Migrating a multi tenant app to Azure (war biopic)
Migrating a multi tenant app to Azure (war biopic)★ Akshay Surve
 
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
 
AWS Cloud cost optimization
AWS Cloud cost optimizationAWS Cloud cost optimization
AWS Cloud cost optimizationYogesh Sharma
 
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
 
Cost Optimization Best Practices: Rotem Yosef
Cost Optimization Best Practices: Rotem Yosef Cost Optimization Best Practices: Rotem Yosef
Cost Optimization Best Practices: Rotem Yosef Amazon Web Services
 
AWS Summit London 2014 | Optimising TCO for the AWS Cloud (100)
AWS Summit London 2014 | Optimising TCO for the AWS Cloud (100)AWS Summit London 2014 | Optimising TCO for the AWS Cloud (100)
AWS Summit London 2014 | Optimising TCO for the AWS Cloud (100)Amazon Web Services
 
AWS Cloud Cost Optimization
AWS Cloud Cost OptimizationAWS Cloud Cost Optimization
AWS Cloud Cost OptimizationYogesh Sharma
 
Aws cost optimization: lessons learned, strategies, tips and tools
Aws cost optimization: lessons learned, strategies, tips and toolsAws cost optimization: lessons learned, strategies, tips and tools
Aws cost optimization: lessons learned, strategies, tips and toolsFelipe
 
Understand AWS Pricing
Understand AWS PricingUnderstand AWS Pricing
Understand AWS PricingLynn Langit
 
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
 
C2 AWS Global Infrastructure and LABS.pptx
C2 AWS Global Infrastructure and LABS.pptxC2 AWS Global Infrastructure and LABS.pptx
C2 AWS Global Infrastructure and LABS.pptxEnrique
 
Cloud Economics, from Genesis to Scale
Cloud Economics, from Genesis to ScaleCloud Economics, from Genesis to Scale
Cloud Economics, from Genesis to ScaleAmazon Web Services
 
Serverless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloadsServerless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloadsTensult
 

Similar to Aws bills and how a tester can help reduce them (20)

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
 
Pat_Davies_AWSCostOptimization_Final.pdf
Pat_Davies_AWSCostOptimization_Final.pdfPat_Davies_AWSCostOptimization_Final.pdf
Pat_Davies_AWSCostOptimization_Final.pdf
 
Cloud Architecture best practices
Cloud Architecture best practicesCloud Architecture best practices
Cloud Architecture best practices
 
FinOps - AWS Cost and Operational Efficiency - Pop-up Loft Tel Aviv
FinOps - AWS Cost and Operational Efficiency - Pop-up Loft Tel AvivFinOps - AWS Cost and Operational Efficiency - Pop-up Loft Tel Aviv
FinOps - AWS Cost and Operational Efficiency - Pop-up Loft Tel Aviv
 
Serverless at Lifestage
Serverless at LifestageServerless at Lifestage
Serverless at Lifestage
 
Migrating a multi tenant app to Azure (war biopic)
Migrating a multi tenant app to Azure (war biopic)Migrating a multi tenant app to Azure (war biopic)
Migrating a multi tenant app to Azure (war biopic)
 
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
 
AWS Cloud cost optimization
AWS Cloud cost optimizationAWS Cloud cost optimization
AWS Cloud cost optimization
 
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...
 
Cost Optimization Best Practices: Rotem Yosef
Cost Optimization Best Practices: Rotem Yosef Cost Optimization Best Practices: Rotem Yosef
Cost Optimization Best Practices: Rotem Yosef
 
AWS Summit London 2014 | Optimising TCO for the AWS Cloud (100)
AWS Summit London 2014 | Optimising TCO for the AWS Cloud (100)AWS Summit London 2014 | Optimising TCO for the AWS Cloud (100)
AWS Summit London 2014 | Optimising TCO for the AWS Cloud (100)
 
AWS Cloud Cost Optimization
AWS Cloud Cost OptimizationAWS Cloud Cost Optimization
AWS Cloud Cost Optimization
 
Aws cost optimization: lessons learned, strategies, tips and tools
Aws cost optimization: lessons learned, strategies, tips and toolsAws cost optimization: lessons learned, strategies, tips and tools
Aws cost optimization: lessons learned, strategies, tips and tools
 
Cost Optimization at Scale
Cost Optimization at ScaleCost Optimization at Scale
Cost Optimization at Scale
 
Understand AWS Pricing
Understand AWS PricingUnderstand AWS Pricing
Understand AWS Pricing
 
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...
 
C2 AWS Global Infrastructure and LABS.pptx
C2 AWS Global Infrastructure and LABS.pptxC2 AWS Global Infrastructure and LABS.pptx
C2 AWS Global Infrastructure and LABS.pptx
 
Cloud Economics, from Genesis to Scale
Cloud Economics, from Genesis to ScaleCloud Economics, from Genesis to Scale
Cloud Economics, from Genesis to Scale
 
Cost Optimization at Scale
Cost Optimization at ScaleCost Optimization at Scale
Cost Optimization at Scale
 
Serverless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloadsServerless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloads
 

Recently uploaded

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Recently uploaded (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 

Aws bills and how a tester can help reduce them

  • 1. AWS Bills and How a Tester CAN Help Reduce Them
  • 2. About Me Jet Liu: ● Career Tester ● Passionate about quality and people
  • 3. Why Should I Care? Credit: Theresa Neate
  • 4. Quality for Cloud Based Apps: ● Reliability + - good architecture, design, implementation, monitoring etc ● Performance + - sufficient computing resources ● Security + - auditing, regular pen-tests, alerting etc ● Resilience + - good design, multi AZ/region redundancies, backups, DR ● Compliance + - data retention, traceability, privacy etc ● Etc. = COST
  • 5. AWS Pricing AWS offers you a pay-as-you-go approach for pricing for over 70 cloud services. With AWS you pay only for the individual services you need, for as long as you use them, and without requiring long-term contracts or complex licensing. You only pay for the services you consume, and once you stop using them, there are no additional costs or termination fees. Source: https://aws.amazon.com/pricing/
  • 7.
  • 8. Context ● Example system on AWS ○ Microservices, distributed system ○ Immutable AMI ○ Prefixed stacks ○ Dev, QA, Staging, Production ● Uses ~30 different AWS services ● AWS costs can be expensive, across multiple accounts
  • 9. EC2 Tip #1: Use the right EC2 type 1. Experiment with EC2 types and create a consistent, repeatable way of measuring performance 2. Use reserved, on-demand, spot instances appropriately ● Lots of instances: ~1500 instances on prod + non-prod ● On Demand vs Reserved vs Spot ● Ts vs Ms vs Cs vs Xs vs Rs vs Is etc. ● T2 “Burstable Performance” - watch out for CPU credits ● Can you use the cheapest in non-prod environments?
  • 11. Tool Example #1: Instance Churn Detector
  • 12. Load Balancers ● Included in EC2 cost ● CLB (ELB) vs ALB vs NLB
  • 14.
  • 15. Tip #2: Migrate away from CLB to ALB/NLB where appropriate and consolidate multiple stacks/applications to share ALB/NLB. Note, some limits may apply, eg. # of rules, # of certificates, # of listeners https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html
  • 16. Data Transfer Tip #3: Be mindful of data transfer Compression of data may help eg. JSON payloads, stack traces
  • 17. RDS Tip #4: RDS still requires good architecture, design & implementation: ● Proper application design can lead to cheaper instance sizes being required ● Choices of engine may be important eg. Mysql vs SQLServer vs Postgres vs Aurora ● Performance test with consistent approach and right tooling in anticipation of change Ideas: ● Use EC2/Containers rather than RDS eg. db.t2.small vs. t2.small (1VCPU, 2GB RAM): $0.052 vs $0.0292 ● Consolidate databases eg. 1 RDS instance with multiple DBs vs Many RDS instances each with a single DB
  • 18. DynamoDB Tip #5: use DynamoDB efficiently ● Create the correct indexes ● Enable TTL where appropriate ● Enable autoscaling where appropriate ● Reserve capacity where appropriate Tool Example #2: DynamoDb throughput checker Note. throughput not guaranteed due to partitioning. Autoscaling may not be “quick” enough..
  • 19. ElastiCache Tip #6: Use ElastiCache efficiently ● Cache != Database ● Capacity plan and set TTL for data ● Pre-warm cache, to enable use of smaller instances Idea: Use EC2/Containers rather than ElastiCache eg. cache.t2.small vs t2.small (1.5GB vs. 2GB) $0.052 vs $0.0292
  • 21. Tip #8: “Sleep” resources when not needed: Tool Example #3: aws-sleeper ● Shutdown all EC2s in a stack ● Set throughputs for Dynamodb tables to 0 ● Stop RDS ● Triggered by cron job or on demand Note: Will still pay for load balancers, storage, cache, etc
  • 22. Tool Example #4: stack-tinkerer Disable workers selectively when not needed by setting desired instance value in ASG Idea: Auto shutdown workers by default - create on demand triggered by eg. New items in a queue
  • 23. AWS Lambda Tip #9: Replace EC2 with lambda functions where appropriate (but calculate likely production costs first) Cost: ● Number of executions ● Duration of each execution ● Memory allocation ● Data transfer Note. Beware of potential “cold starts” and logging challenges.
  • 24. Tip #10: Tag resources
  • 25. 10 Tips Recap 1. Choose the right EC2 type 2. Migrate from CLB to ALB/NLB 3. Be mindful of data transfer 4. RDS is no replacement for good RDMS best practices 5. Use Dynamodb efficiently 6. Use ElastiCache efficiently 7. Disable detailed Cloudwatch metrics when not needed 8. Sleep resources when not needed 9. Replace EC2 wth AWS lambda functions where appropriate 10. Tag resources
  • 26. Other Tips ● Check out official AWS docs for ‘Pricing’ and ‘Limits’ ● Make use of free tier eg. 1st million requests free for AWS Lambda p.m. ● Use other AWS regions eg. db.t2.small ○ 0.034 (Oregon) vs. 0.038 (London) vs. 0.044 (California) vs. v0.049 (Mumbai) vs 0.052 (Sydney) ● Engage AWS professional services to review architecture and choice of services ● Think critically about need for redundancy, backups ● Find defects in AWS and get service credits (and sign NDA) ● Foreign entities may not need to pay GST
  • 27. Lessons ● Continuous improvement vs. once-off exercise ○ Testers should ask critical questions. Eg. is this the right service, what is the likely cost in prod? ● Improve reproducibility by regularly recreating environments/stacks (eg. before Easter/Christmas) and improving tooling eg. Tools to backup/restore data in ElastiCache, DynamoDb, RDS ○ Testers can help by creating/improving tooling - fill the gaps and experiment POC ● Create visibility, communicate changes and celebrate success ○ Tell people what you have done and quantify the benefits ● Team responsibility but need owners ○ Advocate for efficiency and drive for changes, stay up-to-date with AWS changes ● Human costs vs AWS costs ○ Be persistent and pragmatic, look out for new features that solve old problems