Table of Contents
hide
DynamoDB Table Classes
- DynamoDB table classes are designed to help you optimize for cost.
- DynamoDB currently supports two table classes:
- DynamoDB Standard table class is the default, and is recommended for the vast majority of workloads.
- DynamoDB Standard-Infrequent Access (DynamoDB Standard-IA) table class which is optimized for tables where storage is the dominant cost. e.g., tables that store infrequently accessed data, such as application logs, old social media posts, e-commerce order history, and past gaming achievements.
- Every DynamoDB table is associated with a table class.
- All secondary indexes associated with the table use the same table class.
- DynamoDB table class can be:
- Set when creating the table (DynamoDB Standard by default), or
- Updated for an existing table using the AWS Management Console, AWS CLI, or AWS SDK.
- DynamoDB also supports managing the table class using AWS CloudFormation for single-region tables (tables that are not global tables).
- Each table class offers different pricing for data storage as well as read and write requests.
- You can select the most cost-effective table class for your table based on its storage and throughput usage patterns.
DynamoDB Standard Table Class
- The default table class for all new tables.
- Recommended for the vast majority of workloads.
- Lower throughput costs than DynamoDB Standard-IA.
- Most cost-effective option for tables where throughput is the dominant cost.
- Use Cases:
- Frequently accessed data with high read/write operations.
- Real-time applications requiring low latency.
- Tables with high throughput relative to storage.
- Mission-critical workloads with continuous access patterns.
DynamoDB Standard-IA Table Class
- Optimized for tables where storage is the dominant cost.
- Storage costs: Approximately 60% lower than DynamoDB Standard ($0.10/GB vs. $0.25/GB).
- Throughput costs: Approximately 25% higher than DynamoDB Standard for reads and writes.
- Cost-Effective Threshold: When storage exceeds 50% of the throughput cost of a table using DynamoDB Standard, Standard-IA can help reduce total table cost.
- Offers the same performance, durability, and availability as DynamoDB Standard tables.
- Use Cases:
- Application logs and audit trails.
- Old social media posts or historical content.
- E-commerce order history and past transactions.
- Gaming achievements and historical player data.
- Archived data with infrequent access.
- Long-term data retention with occasional reads.
Pricing Comparison
| Cost Component | DynamoDB Standard | DynamoDB Standard-IA | Difference |
|---|---|---|---|
| Storage | $0.25/GB | $0.10/GB | ~60% lower |
| Read/Write Throughput | Lower cost | Higher cost | ~25% higher |
| Best For | Throughput-dominant | Storage-dominant | – |
Switching Between Table Classes
- Table class can be updated at any time for existing tables.
- No application code changes required – same DynamoDB APIs and service endpoints are used regardless of table class.
- No downtime – table remains accessible during the table class update.
- Table class update is a background process.
- Update time depends on table traffic, storage size, and other variables.
- Switching Limitation: No more than two table class updates are allowed in a 30-day trailing period.
- All secondary indexes automatically use the same table class as the base table.
Feature Compatibility
- DynamoDB Standard-IA tables are compatible with all existing DynamoDB features:
- Auto Scaling
- On-demand mode
- Time-to-Live (TTL)
- On-demand backups
- Point-in-Time Recovery (PITR)
- Global Secondary Indexes (GSIs)
- Local Secondary Indexes (LSIs)
- DynamoDB Streams
- Global Tables
- Transactions
- Encryption at rest
Choosing the Right Table Class
- Analyze Historical Data: Use AWS Cost and Usage Reports and AWS Cost Explorer to review table’s historical storage and throughput costs.
- Calculate Cost Ratio: Determine if storage cost exceeds 50% of total table cost.
- Decision Criteria:
- Choose Standard if:
- Throughput (reads/writes) is the dominant cost.
- Data is frequently accessed.
- High read/write operations relative to storage.
- Choose Standard-IA if:
- Storage is the dominant cost (exceeds 50% of throughput cost).
- Data is infrequently accessed.
- Large storage with low read/write operations.
- Choose Standard if:
- Monitor and Adjust: Review costs regularly and switch table classes if usage patterns change (within the 2 updates per 30 days limit).
Best Practices
- Start with Standard: Use DynamoDB Standard for new tables until usage patterns are established.
- Monitor Costs: Regularly review storage vs. throughput costs using Cost Explorer.
- Use 50% Threshold: Switch to Standard-IA when storage exceeds 50% of throughput cost.
- Consider Access Patterns: Standard-IA is ideal for archival and historical data with infrequent access.
- Plan Switches Carefully: Remember the 2 updates per 30 days limitation.
- Test Before Production: Validate cost savings in non-production environments first.
- Document Decisions: Keep records of why specific table classes were chosen for future reference.
- Automate Monitoring: Set up CloudWatch alarms for cost thresholds to identify optimization opportunities.
Limitations and Considerations
- Switching Limit: Maximum of 2 table class updates per 30-day trailing period.
- CloudFormation Support: Only for single-region tables (not global tables).
- Index Inheritance: All indexes (GSIs and LSIs) automatically use the same table class as the base table.
- Background Process: Table class updates are asynchronous and time varies based on table size and traffic.
- Cost Analysis Required: Requires careful analysis of storage vs. throughput costs to determine optimal class.
- No Partial Application: Cannot apply different table classes to different indexes on the same table.
AWS Certification Exam Practice Questions
- Questions are collected from Internet and the answers are marked as per my knowledge and understanding (which might differ with yours).
- AWS services are updated everyday and both the answers and questions might be outdated soon, so research accordingly.
- AWS exam questions are not updated to keep up the pace with AWS updates, so even if the underlying feature has changed the question might not be updated
- Open to further feedback, discussion and correction.
- A company has a DynamoDB table storing 500 GB of application logs that are accessed once per month for compliance reporting. The table currently uses the Standard table class. What should they do to optimize costs?
- Enable DynamoDB Auto Scaling.
- Switch to DynamoDB Standard-IA table class.
- Enable Time-to-Live (TTL) to delete old logs.
- Switch to on-demand capacity mode.
- A DynamoDB table has storage costs of $1,000/month and throughput costs of $800/month. Which table class would be most cost-effective?
- DynamoDB Standard
- DynamoDB Standard-IA (storage exceeds 50% of total cost)
- Either class would have the same cost
- Cannot determine without more information
- A company wants to switch a table between Standard and Standard-IA classes multiple times to test cost optimization. What is the maximum number of switches allowed?
- Unlimited switches
- 1 switch per 30 days
- 2 switches per 30-day trailing period
- 4 switches per 30 days
- What happens to a DynamoDB table during a table class update?
- The table is unavailable during the update.
- Read operations are allowed but write operations are blocked.
- The table remains fully accessible with no downtime.
- The table is read-only during the update.
- A company has a DynamoDB table with 3 Global Secondary Indexes (GSIs). They want to use Standard-IA for the base table but Standard for the GSIs. Is this possible?
- Yes, each index can have a different table class.
- No, all indexes automatically use the same table class as the base table.
- Yes, but only for GSIs, not LSIs.
- Yes, but requires manual configuration for each index.
- Which of the following statements about DynamoDB Standard-IA are correct? (Select TWO)
- Storage costs are approximately 60% lower than Standard.
- Throughput costs are approximately 60% lower than Standard.
- Read and write costs are approximately 25% higher than Standard.
- It offers lower performance than Standard tables.
- It is not compatible with DynamoDB Streams.
2 thoughts on “DynamoDB Table Classes”
Comments are closed.