0
0
DynamoDBquery~5 mins

Reserved capacity in DynamoDB

Choose your learning style9 modes available
Introduction
Reserved capacity helps you save money by paying upfront for a set amount of database capacity instead of paying for it as you go.
You know your app will need a steady amount of database power for a long time.
You want to reduce costs for your database usage by committing ahead.
You want to avoid surprises from sudden spikes in database charges.
You have a predictable workload and want to plan your budget better.
Syntax
DynamoDB
Reserved capacity is purchased through AWS Management Console or AWS CLI, not by a direct query.
You specify:
- Capacity units (read/write)
- Duration (usually 1 or 3 years)
- Payment option (all upfront, partial, or monthly)
Reserved capacity is not a query but a billing option you set up before using the database.
It applies to your whole account.
Examples
This AWS CLI command buys 5 units of reserved capacity for DynamoDB.
DynamoDB
aws dynamodb purchase-reserved-capacity-offering --reserved-capacity-offering-id <offering-id> --reserved-capacity-quantity 5
This is how you buy reserved capacity using the AWS web interface.
DynamoDB
In AWS Console, go to DynamoDB > Reserved Capacity > Purchase
Select capacity units and payment plan
Confirm purchase
Sample Program
This command purchases 10 reserved capacity units using the specified offering ID.
DynamoDB
-- Reserved capacity is not created by SQL or query language.
-- Instead, you buy it via AWS CLI or Console.
-- Example CLI command:
aws dynamodb purchase-reserved-capacity-offering --reserved-capacity-offering-id abc123 --reserved-capacity-quantity 10
OutputSuccess
Important Notes
Reserved capacity reduces your hourly cost but requires upfront commitment.
You cannot query reserved capacity like data; it is a billing setting.
Make sure to estimate your needs carefully before purchasing.
Summary
Reserved capacity saves money by pre-paying for database power.
It is bought through AWS Console or CLI, not by database queries.
Best for steady, predictable workloads to control costs.