AWS Certified Solutions Architect - Associate / Question #1630 of 1019

Question #1630

A company operates a REST-based application on Amazon EC2 instances that processes real-time data from an external provider. The provider reports frequent 503 errors during peak data transmission periods, as the EC2 instances become overwhelmed and cannot handle the request volume.

Which solution will allow the application to scale efficiently during high data traffic?

A

Ingest data using Amazon Kinesis Data Streams and process it with AWS Lambda functions.

B

Implement Amazon API Gateway with throttling limits to control the incoming request rate.

C

Use Amazon SQS to queue incoming data and process messages using EC2 instances in an Auto Scaling group.

D

Migrate the application to AWS Lambda functions with Amazon API Gateway for request handling.

Explanation

Answer A is correct because:
- Amazon Kinesis Data Streams is designed to ingest and buffer high-volume, real-time data streams, decoupling data ingestion from processing. This prevents EC2 instances from being overwhelmed during traffic spikes.
- AWS Lambda automatically scales to process records from Kinesis, eliminating the need to manage server capacity. Each shard in Kinesis can trigger a Lambda function, enabling parallel processing.

Why other options are incorrect:
- B (API Gateway with throttling): Throttling limits requests but does not scale processing. It would reduce errors by rejecting requests, not handling increased load.
- C (SQS with EC2 Auto Scaling): While SQS queues decouple workloads, EC2 Auto Scaling has slower response times compared to Lambda. Real-time processing may lag during rapid scaling.
- D (Lambda with API Gateway): API Gateway is optimal for REST APIs but does not address high-volume data ingestion. Lambda may face concurrency limits or cold starts, whereas Kinesis + Lambda is purpose-built for streaming data.

Key Points: Use Kinesis for scalable real-time data ingestion and Lambda for serverless, auto-scaling processing. This architecture decouples components and handles variable workloads efficiently.

Answer

The correct answer is: A