Opscraft
Cloud cost control (FinOps) · Lesson 4 of 6 · 3 min read

Storage, data transfer and managed services

Storage

  • S3: choose storage classes by access pattern — Standard for hot data, Intelligent-Tiering when access is unknown, Standard-IA for infrequent access, Glacier classes for archives. Use lifecycle rules to move or expire objects, delete incomplete multipart uploads, and expire old object versions in versioned buckets (they're easy to forget and can be most of the bill).
  • EBS: move gp2 to gp3 (about 20% cheaper per GB, with IOPS and throughput set independently), delete unattached volumes, and apply retention to snapshots with Data Lifecycle Manager or AWS Backup.
  • Logs and metrics: set retention on every CloudWatch log group (the default is forever), drop debug logs in production, sample noisy logs, and watch custom metric cardinality. Send long-term logs to S3 rather than keeping them in expensive hot storage.

Data transfer

Enlarge diagramThrough NATThrough endpointsnodes pull 5 TB of images a month from ECRevery GB billed at NAT processing ratesS3 gateway endpoint: free (ECR layers live in S3)ECR interface endpoints: far cheaper per GB
Figure 1. VPC endpoints take AWS-service traffic off the NAT gateway. S3 and DynamoDB gateway endpoints are free.
Swipe sideways to see all of it, or tap to open it full screen.
  • Replace NAT gateway traffic to AWS services with VPC endpoints: S3 and DynamoDB gateway endpoints are free; interface endpoints cost per hour and per GB but usually much less than NAT processing for heavy traffic, such as pulling container images from ECR.
  • Reduce cross-AZ traffic: keep chatty services in the same AZ where safe, use topology-aware routing in Kubernetes (trafficDistribution: PreferClose), and watch replication traffic of self-managed databases and Kafka.
  • Serve users through CloudFront: cheaper egress than directly from EC2 or S3, plus caching.
  • Compress responses and logs; avoid moving data between regions unless needed.

Managed services and architecture

  • Non-production doesn't need production's shape: single-AZ databases, smaller instances, fewer replicas, no Multi-AZ OpenSearch.
  • Load balancers: one ALB with host and path rules can serve many services instead of one ALB each.
  • Right service for the load: Lambda for spiky low traffic, containers for steady load; DynamoDB on-demand for unpredictable traffic, provisioned with auto scaling for steady traffic.
  • Cost is a design input: estimate it in design reviews, and compare options per unit of work.