Q29 — AWS SAA-C03 Ch.17
Question 29 of 89 | ← Chapter 17
Q1329. A company is building a news aggregation platform. The platform ingests news articles that need to be cleaned and categorized. The processed articles must be stored durably for one year. The platform must handle up to thousands of incoming articles each minute during peaks. The platform must also provide independent, scalable processing for each article.Which solution will meet these requirements?
- A. Create a custom application to ingest articles and perform in-memory processing. Run the application on one large Amazon EC2 instance. Configure the application to store processed articles in an Amazon S3 bucket.
- B. Create an AWS Lambda function to ingest articles. Send one message for each article to an Amazon Simple Queue Service(Amazon SQS) queue. Create a second Lambda function to consume the SQS queue. Configure the second Lambda function to process the articles and store the articles in an Amazon S3 bucket. ✓
- C. Create an AWS Lambda function to ingest articles. Store the output in a shared Amazon ElastiCache (Memcached) cluster. Deploy a fleet of Amazon EC2 instances in an Auto Scaling group.Configure the instances to retrieve the article data from the ElastiCache cluster, process the data, and write the data back to the ElastiCache cluster.
- D. Create an AWS Lambda function to ingest articles. Send one message for each article to an Amazon Simple Queue Service(Amazon SQS) queue. Create a second Lambda function to consume the SQS queue. Configure the second Lambda function to process the articles and store the articles in a second SQS queue.
Correct Answer: B. Create an AWS Lambda function to ingest articles. Send one message for each article to an Amazon Simple Queue Service(Amazon SQS) queue. Create a second Lambda function to consume the SQS queue. Configure the second Lambda function to process the articles and store the articles in an Amazon S3 bucket.
Explanation
To meet the requirements of handling thousands of incoming articles per minute, providing independent scalable processing for each article, and storing processed articles durably for one year, the best solutionis:Correct Answer:B. Create an AWS Lambda function to ingest articles. Send one message for each article to an Amazon Simple Queue Service (Amazon SQS) queue. Create a second Lambda function to consume the SQS queue. Configure the second Lambda function to process the articles and store the articles in an Amazon S3 bucket.Why This Solution is Best?\1. Scalability & Independent ProcessingAWS Lambda automatically scales to handle thousands of concurrent invocations, making it ideal for high- throughput ingestion.SQS (Simple Queue Service) provides decoupling between ingestion and processing, ensuring that each article is processed independently.SQS is fully managed, highly scalable, and ensures no message loss (at-least-once delivery).\2. Durable Storage for Processed ArticlesAmazon S3 is the most cost-effective and durable storage solution for long-term retention (1 year). S3 provides high availability (99.999999999% durability) and scalability for storing processed articles.\3. Event-Driven ArchitectureLambda ingestion SQS queue Lambda processing S3 storage is a fully serverless, event-driven workflow.No need to manage servers (EC2) or caching (ElastiCache), reducing operational overhead.Why Other Options Are Less Suitable?A. Single Large EC2 Instance with In-Memory ProcessingSingle EC2 instance is a single point of failure and cannot scale independently per article. In-memory processing (RAM) is not durable--if the instance fails, processed articles are lost. Not cost-effective for sporadic or peak workloads (must over-provision for peaks).C. Lambda Ingestion ElastiCache EC2 Auto Scaling GroupElastiCache (Memcached) is an in-memory cache, not a durable storage solution. EC2 instances must be managed, increasing complexity and cost. Processing articles in EC2 is less scalable than Lambda, which auto-scales instantly. Writing back to ElastiCache is unnecessary since articles should be stored in S3 for durability.D. Lambda Ingestion SQS Lambda Second SQS QueueStoring processed articles in a second SQS queue is incorrect because:SQS is a temporary message queue, not a durable storage solution. Articles need to be stored in S3 for long-term retention (1 year). This approach introduces unnecessary complexity without providing durability.Recommended ArchitectureIngestion Layer:AWS Lambda receives incoming articles (e.g., via API Gateway or direct invocation). Each article is sent as a separate message to an SQS FIFO or Standard queue (depending on ordering needs).Processing Layer:A second Lambda function is triggered by SQS messages.Each Lambda invocation processes one article independently, ensuring scalability.Storage Layer:Processed articles are stored in Amazon S3 for durable, long-term retention.ConclusionThe most scalable, cost-effective, and durable solution is:B. Create an AWS Lambda function to ingest articles. Send one message for each article to an Amazon Simple Queue Service (Amazon SQS) queue. Create a second Lambda function to consume the SQS queue. Configure the second Lambda function to process the articles and store the articles in an Amazon S3 bucket.Other options either lack scalability (A), use unnecessary complexity (C), or fail to provide durable storage (D).