AWS Cost Optimization 101

AWS Cost Optimization 101

The beginning of the year is the perfect time to clean up and optimize. This also applies to your AWS bill. I present practical tips on how to cut costs with small effort in this talk.

E8f66870d1204779ecc45f2695faa73e?s=128

Michael Wittig

February 13, 2020
Tweet

Transcript

  1. AWS Cost Optimization 101 Michael Wittig cloudonaut.io

  2. Michael Wittig • Independent consultant at widdix • Technical writer

    at cloudonaut • Programming founder at marbot • All things AWS.
  3. How to reduce costs? • Know your cost per account/region/service

    (see AWS Bill) • Focus = $$$ • Prioritize findings based on potential saving & effort/risk
  4. General • Delete unused resources • Choose your region wisely

  5. Service by Service

  6. EC2 • Purchase Savings Plans for baseline • Switch to

    latest instance types ◦ Make use of AMD or ARM based instances • Verify that instance types still fit • Use Spot Instances
  7. EBS • Use AWS Backup to management the lifecycle of

    snapshots • Verify that the maximum I/O performance of the instance matches with the EBS volumes
  8. RDS • Enable RDS Storage Auto Scaling instead of over

    provisioning storage capacity • Consider switching to Aurora Serverless (pause database) • Switch to an Open Source database system (e.g., PostgreSQL instead of Oracle)
  9. VPC • Reduce NAT Gateway usage ◦ Gateway VPC endpoints

    (S3 & DynamoDB) ◦ Interface VPC endpoints for the rest ◦ Change architecture? • Reduce traffic between AZs
  10. VPC

  11. Route 53 • Increase TTL for records to reduce queries

    • Consolidate resolver endpoints
  12. CloudFront • Check hit/miss ratio of cache and adjust configuration

    and TTL accordingly • Restrict access to S3 by using an Origin Access Identity
  13. CloudTrail • Check costs for data events (S3 and Lambda)

    ◦ S3 Access Logs might be cheaper
  14. S3 • Consider using S3 Intelligent Tiering (works best with

    larger objects) • Configure lifecycle policies to define a retention period for objects • Use Glacier Deep Archive for long-term data archiving
  15. CloudWatch • Configure a retention period for all log groups

    • Identify unnecessary custom metrics
  16. Serverless • Optimize memory configuration for Lambda functions • Use

    Provisioned Concurrency to reduce costs for high traffic Lambda functions • Evaluate HTTP APIs (beta) as an alternative to API Gateway
  17. ECS • Use Fargate instead of EC2 instances • Purchase

    Savings Plans for Fargate • Use Fargate Spot for non-production workloads
  18. DynamoDB • Switch to On-demand capacity mode for unsteady workloads

    • Use auto-scaling to adjust the provisioned capacity to the workload
  19. Elasticsearch • Make use of Reserved Instances were planning ahead

    is feasible • Evaluate UltraWarm tier (Preview) to retain large amounts of data at lower costs
  20. One more thing...

  21. Create an AWS Budget to monitor your bill

  22. https://cloudonaut.io/rapid-docker-on-aws/