Q78 — AWS SAA-C03 Ch.16
Question 78 of 100 | ← Chapter 16
Q1278. A company runs a web application on Amazon EC2 instances. The application also uses an Amazon DynamoDB table. The application generates sporadic HTTP 500 errors. The DynamoDB table is operating in on-demand mode, and other applications use the table without any issues.A solutions architect wants to resolve the HTTP 500 errors without disrupting in the web application.Which solution will meet these requirements?
- A. Configure DynamoDB to support larger write requests for increased throughput.
- B. Enable DynamoDB Streams to monitor changes in the table.
- C. Configure the application to use exponential backoff and retries to query the table. ✓
- D. Configure the application to use strongly consistent reads.
Correct Answer: C. Configure the application to use exponential backoff and retries to query the table.
Explanation
The correct solution must address sporadic HTTP 500 errors caused by DynamoDB throttling or transient failures while minimizing disruption to the application. Let's evaluate each option:Correct Answer: C. Configure the application to use exponential backoff and retries to query the table.Why Option C is Best:Handles Throttling & Transient Failures:HTTP 500 errors often occur when DynamoDB throttles requests (due to burst capacity limits in on- demand mode) or experiences transient failures.Exponential backoff and retries automatically pause and retry failed requests with increasing delays, reducing the chance of repeated throttling.No DynamoDB Configuration Needed:Unlike adjusting write capacity (A) or enabling streams (B), this solution requires only application-level changes.Works with On-Demand Mode:On-demand tables auto-scale, but sudden traffic spikes can still cause throttling. Retries help smooth out bursts.Low Risk & Non-Disruptive:Does not affect other applications using the same table (unlike strongly consistent reads, which increase latency).Why Other Options Fail:A. Configure DynamoDB to support larger write requests for increased throughput.Not Necessary:On-demand mode already auto-scales based on traffic. Manually increasing write capacity is irrelevant for read-heavy workloads (which likely cause 500s).Does Not Address Retries:Even with higher throughput, transient failures (e.g., network issues) still require retries. B. Enable DynamoDB Streams to monitor changes in the table.Use Case Mismatch:DynamoDB Streams is for capturing table changes (e.g., for triggers/analytics), not for error handling.No Impact on 500 Errors:Does not prevent or resolve throttling/retries.D. Configure the application to use strongly consistent reads.Worsens Performance:Strongly consistent reads increase latency and cost (2x RCU consumption vs. eventually consistent reads).Does Not Fix Throttling:If the issue is throttling (not stale data), this does not resolve 500 errors.Key Comparison:RequirementExponential Backoff (C)Other OptionsResolves throttling/500 errors(Retries failed requests) (A: Unnecessary; B: Irrelevant; D: No effect) Non-disruptive to application(Only code change) (A: May not help; D: Increases latency) Works with on-demand mode(Auto-scaling + retries) (A: Manual tuning; B: No error handling)Conclusion:Option C is the only solution that:Automatically retries failed requests to handle throttling.Requires minimal changes (no DynamoDB configuration).Does not disrupt other applications using the table.Final Answer: C