Which solution will resolve this issue MOST cost-effectively?
Configure the DynamoDB table’s read capacity to use auto scaling with default parameters.
Increase the timeout of all the Lambda functions that read from the DynamoDB table.
Use DynamoDB Streams to replicate data to a new table. Configure all the Lambda functions to read from the new table.
Increase the DynamoDB table’s provisioned read capacity to 1,400 RCUs.
Explanations:
Configuring DynamoDB’s read capacity to use auto scaling allows the table to automatically adjust its read capacity units based on demand. This means that during peak hours, the RCU limit will dynamically increase as needed, preventing timeouts and ensuring that Lambda functions can read from the table without hitting capacity limits, all while being more cost-effective than manually increasing the provisioned capacity.
Increasing the timeout for Lambda functions will not address the underlying issue of insufficient read capacity in DynamoDB. While it may temporarily prevent errors, it does not improve performance or resolve the capacity problem during peak times, potentially leading to higher costs without solving the root cause.
Using DynamoDB Streams to replicate data to a new table does not solve the immediate capacity issue. This option introduces unnecessary complexity and may not significantly improve performance, as it still requires managing read capacity for both tables. Additionally, replicating data can incur extra costs and overhead, making it less cost-effective than adjusting the existing table’s capacity.
While increasing the provisioned read capacity to 1,400 RCUs would alleviate the timeout issues, it is a static solution that does not allow for flexibility during varying traffic levels. This option incurs a higher cost compared to the auto-scaling solution, which only increases capacity when necessary. Therefore, it is not the most cost-effective option.