Which solution will provide the MOST cost optimization of the DynamoDB database layer?
Change the DynamoDB tables to use on-demand capacity.
Use AWS Auto Scaling and configure time-based scaling.
Enable DynamoDB capacity-based auto scaling.
Enable DynamoDB Accelerator (DAX).
Explanations:
On-demand capacity mode is best for unpredictable or variable workloads, but it can be more expensive for workloads with predictable patterns, as the cost per read/write unit is higher compared to provisioned capacity. In this case, the usage pattern is smooth and predictable, so on-demand mode would not provide the best cost optimization.
AWS Auto Scaling with time-based scaling might help to adjust capacity for predictable traffic changes. However, it is not as efficient as DynamoDB’s built-in capacity auto-scaling, as time-based scaling requires manual configuration and lacks the real-time responsiveness of DynamoDB’s auto-scaling feature.
Enabling DynamoDB capacity-based auto-scaling will automatically adjust the read and write capacity units based on actual usage patterns. This is optimal for this use case since the usage has a predictable bell curve pattern, and auto-scaling would adjust capacity dynamically, thus optimizing cost by not over-provisioning resources during off-peak times.
DynamoDB Accelerator (DAX) is a caching service designed to accelerate read-heavy workloads. It reduces read latency, but does not address the underlying cost optimization for read/write capacity. Since the issue here is related to managing provisioned capacity effectively, DAX is not the appropriate solution for cost optimization.