Skill 7.2.3

Optimize database cost

Key Concepts

Database cost comes from compute (instance size and count), storage (volume and provisioned performance), I/O and requests, backups, replicas and licenses. Rightsizing applies, but memory needs and licensing make it harder: many databases rely on memory for caching, and commercial engines are licensed per core.

Techniques include choosing serverless or autoscaling capacity for variable or intermittent load, adding read replicas or a cache for read-heavy load instead of scaling the primary, stopping non-production databases outside hours, reviewing multi-zone configurations for non-production, tuning queries that drive I/O, and choosing between license-included and BYOL pricing or an open-source engine.

Commitment discounts also apply to many managed databases, for example reserved database instances and, on AWS, Database Savings Plans, which were introduced in December 2025. As with compute, rightsize before committing.