Development with AWS Services
An application repeatedly runs expensive aggregation queries against Amazon RDS for PostgreSQL. Results can be several minutes old. Which solution best reduces repeated database computation?
Show the answer
Correct answerD. Cache query results in Amazon ElastiCache.
AWhy not this: DynamoDB Accelerator caches DynamoDB operations, not PostgreSQL query results.
BWhy not this: RDS Proxy pools database connections; it does not cache SQL query results.
CWhy not this: A read replica shifts query execution away from the primary but still recomputes the results.
DWhy this is right: Cached aggregation results avoid repeating expensive database computation while allowing controlled staleness.
Amazon ElastiCache can serve previously computed results without rerunning the aggregations. A read replica offloads queries from the primary but still performs the aggregation work.