Cost Optimization Strategies

AWS Security and Cost Management Concepts

Dev Bhosale

Principal Data & Cloud Architect

Cost optimization framework

  1. Right-size resources
  2. Create elastic capacity
  3. Leverage pricing model
  4. Explore alternative services
  5. Optimize storage

cost optimization framework: the five steps

AWS Security and Cost Management Concepts

Optimization example

The company's pays AWS $15,000/month total.   $12,000 for 12 EC2 servers and $2,000 for a database service and $1,000 for S3 storage. On-demand rate paid is $1.36/server-hour.

Cloud infrastructure: 12 servers, split into three groups of four

AWS Security and Cost Management Concepts

Optimize size and capacity

  • Servers are adequately sized in terms of CPU/memory
  • Instead of running four servers 24/7 we can optimize usage
  • We can dynamically scale-up and scale-down servers based on traffic surges using auto-scaling group and save at least 50% total server costs

Elastic server capacity

AWS Security and Cost Management Concepts

Leverage pricing model

Pricing spot

  • Spot instances offer average savings of 66%
  • Analytics workload needs to run for only four out of 24 hours
  • Opportunity to save 94% of the analytics server costs
AWS Security and Cost Management Concepts

Explore alternatives

  • Lambda is a serverless compute service for running code without having to manage servers
  • Lambda is ideal for short-term tasks such as image uploads and processing
  • One million free requests per month and 400,000 GB-seconds of compute time per month
  • Replacing four EC2 serers with Lambda will result in savings of $4,000/month or 100% of the image processing server costs

before and after lambda

AWS Security and Cost Management Concepts

Optimize storage

Lifecycle policies

  • S3 can grow in size and add to storage costs
  • Lifecyle policies can create rules which automatically purge files
  • This will save $500/month or 50% of the storage costs
AWS Security and Cost Management Concepts

Savings summary

  • We've saved a whopping 68.52% from the original AWS costs
  • Elastic-sizing EC2 servers and using alternative compute such as Lambda
  • Actual savings will depend on workload characteristics and the business need
Use cases Cost/month before optimization Cost/month After optimization
Web server $4,000 $2,000
Analytics servers $4,000 $222
Image processing servers $4,000 0
S3 storage costs $1,000 $500
RDS database $2,000 $2,000
Total $15,000 $4,722
AWS Security and Cost Management Concepts

Let's practice!

AWS Security and Cost Management Concepts

Preparing Video For Download...