Q3 — AWS SAA-C03 Ch.17
Question 3 of 89 | ← Chapter 17
Q1303. An ecommerce company is adding a product review feature to its web application. The feature will consist of a Submit Review function and a Get Review function. The Submit Review function will give customers the ability to submit a short text review. The Submit Review function must be capable of thousands of concurrent review submissions. The Get Review function will retrieve all reviews for each product ID. The Get Review function must have low latency.Which solution will meet these requirements?
- A. Deploy the Submit Review function on an Amazon Elastic Container Service(Amazon ECS) cluster in an Auto Scaling group. Configure an Application Load Balancer in front of the Auto Scaling group. Store the reviews in an Amazon S3 bucket. Configure the Get Review function to query the S3 bucket.
- B. Deploy the Submit Review function on an Amazon EC2 instance. Expose the function as a REST endpoint. Store all reviews on an instance store volume. Configure the Get Review function to query the instance store volume.
- C. Create an Amazon API Gateway REST API. Define a SubmitReview method and a GetReview method in the API. Choose AWS as the integration type and Amazon DynamoDB as the service.Enable API Gateway caching for the GetReview method. ✓
- D. Implement the Submit Review function by using AWS Step Functions. Configure each review submission to start a workflow. Configure the workflow to use an AWS Lambda function that validates and stores each review in an Amazon ElastiCache(Redis OSS) cluster. Configure the Get Review function to query the cluster.
Correct Answer: C. Create an Amazon API Gateway REST API. Define a SubmitReview method and a GetReview method in the API. Choose AWS as the integration type and Amazon DynamoDB as the service.Enable API Gateway caching for the GetReview method.
Explanation
Let's analyze each option based on the requirements of handling thousands of concurrent review submissions for the Submit Review function and providing low - latency retrieval for the Get Review function:Option ASubmit Review function:Deploying the Submit Review function on an Amazon ECS cluster in an Auto Scaling group with an Application Load Balancer is a good approach for handling a variable and potentially large number of requests. However, storing reviews in an Amazon S3 bucket has limitations when it comes to handling thousands of concurrent write operations. S3 is designed for highly durable object storage, but it is not optimized for high - throughput, low - latency write operations like a large number of concurrent review submissions.Get Review function:Querying an S3 bucket for reviews can result in relatively high latency, especially as the number of reviews grows. S3 is not designed as a database for quick retrieval of multiple related objects based on a product ID. So, this option does not meet the requirements.Option BSubmit Review function:Using a single Amazon EC2 instance to handle thousands of concurrent review submissions is not a scalable solution. A single instance has limited resources (CPU, memory, network bandwidth), and it will quickly become a bottleneck when faced with a high volume of concurrent requests.Get Review function:Storing reviews on an instance store volume is also problematic. Instance store volumes are ephemeral, meaning the data is lost when the instance is stopped or terminated. Moreover, querying data from an instance store volume is not designed for low - latency retrieval across multiple requests, especially when there are a large number of reviews. So, this option does not meet the requirements.Option CSubmit Review function:Creating an Amazon API Gateway REST API with a SubmitReview method integrated with Amazon DynamoDB is a great choice. DynamoDB is a fully managed NoSQL database service that can handle thousands of concurrent write operations. It is designed to scale horizontally to accommodate high - throughput workloads, making it well - suited for the Submit Review function that needs to handle a large number of concurrent review submissions.Get Review function:Defining a GetReview method in the API Gateway integrated with DynamoDB and enabling API Gateway caching for the GetReview method can significantly reduce latency. Caching stores frequently accessed data in memory, so subsequent requests for the same product's reviews can be served quickly without having to query the database again. This option meets both the high - concurrency requirement for the Submit Review function and the low - latency requirement for the Get Review function.Option DSubmit Review function:Using AWS Step Functions for each review submission is an over - engineered solution for this scenario. Step Functions are more suitable for orchestrating complex workflows with multiple steps and dependencies. For simply submitting a review, a more straightforward approach like directly interacting with a database would be more efficient. Also, using an AWS Lambda function to store reviews in an Amazon ElastiCache (Redis OSS) cluster for write operations may not be as cost - effective and scalable as using DynamoDB for high - volume concurrent writes.Get Review function:While querying an ElastiCache cluster can provide low - latency retrieval, the overall approach for the Submit Review function makes this option less optimal compared to Option C. So, this option does not meet the requirements as well as Option C.Therefore, the solution that will meet the requirements is Option C.