Q52 — AWS SAA-C03 Ch.17
Question 52 of 89 | ← Chapter 17
Q1352. A company processes streaming data by using Amazon Kinesis Data Streams and an AWS Lambda function. The streaming data comes from devices that are connected to the internet.The company is experiencing scaling problems and needs to implement shard-level control and custom checkpointing.Which solution will meet these requirements with the LEAST latency?
- A. Connect Kinesis Data Streams to Amazon Data Firehose to ingest incoming data to an Amazon S3 bucket. Configure S3 Event Notifications to invoke the Lambda function.
- B. pany process the provisioned concurrency settings for the Lambda function. Stream the data from Kinesis Data Streams to an Amazon SQS standard queue. Invoke the Lambda function to process the messages.
- C. Run the Lambda function code in an Amazon ECS container that runs on AWS Fargate. Change the code to use the Kinesis Client Library(KCL). ✓
- D. Increase the memory and provisioned concurrency settings for the Lambda function. Stream the data from Kinesis Data Streams to an Amazon SQS FIFO queue. Configure the Lambda function to be invoked by the SQS queue.
Correct Answer: C. Run the Lambda function code in an Amazon ECS container that runs on AWS Fargate. Change the code to use the Kinesis Client Library(KCL).
Explanation
The correct solution is C. Run the Lambda function code in an Amazon ECS container that runs on AWS Fargate. Change the code to use the Kinesis Client Library (KCL).Explanation:The requirements are:Shard-level control (ability to manage how data is processed per shard). Custom checkpointing (manual control over progress tracking in the stream). Least latency (minimal delay in processing streaming data).Why Option C is correct:Kinesis Client Library (KCL) provides:Shard-level control: The KCL allows applications to process data from individual shards, enabling fine- grained control over parallelism and load distribution.Custom checkpointing: The KCL lets you manually commit checkpoints (instead of relying on Lambda's automatic checkpointing), ensuring exact-once processing semantics. Low latency: Running the KCL-based application in AWS Fargate (serverless containers) avoids the overhead of Lambda cold starts and provides consistent performance.Why the other options are incorrect:A. Connect Kinesis Data Streams to Amazon Kinesis Data Firehose S3 Lambda (S3 Event Notifications)Incorrect:High latency: Firehose batches data before delivering it to S3, introducing delays. No shard-level control: Firehose abstracts away shard management. No custom checkpointing: Firehose handles checkpointing automatically.B. Use SQS Standard Queue between Kinesis and LambdaIncorrect:No shard-level control: SQS decouples messages from Kinesis shards, losing shard context. No custom checkpointing: Lambda's SQS integration handles checkpointing automatically. Higher latency: Introduces an extra hop (Kinesis SQS Lambda). D. Use SQS FIFO Queue between Kinesis and Lambda (with provisioned concurrency) Incorrect:No shard-level control: FIFO queues do not preserve shard information. No custom checkpointing: Lambda's SQS integration handles checkpointing automatically. Higher latency: FIFO queues enforce ordering, adding delay (even if less than Firehose).Key Considerations:Lambda's limitations:Lambda automatically checkpointing (no custom control).No direct shard-level processing (Lambda reads from shards but cannot manage them).Cold starts can introduce latency.KCL advantages:Runs as a long-lived process (no cold starts).Explicit control over shard assignment and checkpointing.Best for low-latency, exact-once processing requirements.Correct Architecture (Option C):Kinesis Data Streams KCL application running on FargateThe KCL worker processes data from assigned shards.Custom checkpointing ensures progress is tracked manually.Fargate provides scalable, low-latency execution.Conclusion:Option C is the only solution that meets all requirements:Shard-level control (via KCL).Custom checkpointing (manual KCL checkpoints).Least latency (Fargate avoids Lambda cold starts).The other options fail due to higher latency, lack of shard control, or no custom checkpointing.