SAP-C02 Exam QuestionsBrowse all questions from this exam

SAP-C02 Exam - Question 180


A company runs a processing engine in the AWS Cloud. The engine processes environmental data from logistics centers to calculate a sustainability index. The company has millions of devices in logistics centers that are spread across Europe. The devices send information to the processing engine through a RESTful API.

The API experiences unpredictable bursts of traffic. The company must implement a solution to process all data that the devices send to the processing engine. Data loss is unacceptable.

Which solution will meet these requirements?

Show Answer
Correct Answer: B

In this scenario, using Amazon API Gateway HTTP API integrated with Amazon Simple Queue Service (SQS) is the optimal solution. API Gateway provides a scalable interface to handle bursts of traffic efficiently. SQS acts as a buffer to store incoming data, ensuring that no data is lost during traffic spikes. AWS Lambda can then process the messages from the SQS queue, providing a serverless compute solution that scales automatically as needed. This combination guarantees data durability and reliable processing without loss.

Discussion

17 comments
Sign in to comment
momo3321Option: B
May 13, 2023

Option A is incorrect because Application Load Balancer (ALB) can't directly target an Amazon SQS queue. Option C is incorrect because while Amazon API Gateway and EC2 Auto Scaling can handle high loads, they don't provide a built-in mechanism to ensure that all messages are processed without loss. Option D is incorrect because Amazon CloudFront is a content delivery network (CDN), and it is not typically used to handle incoming API requests. It is primarily used to cache and deliver content to users.

bjexamprepOption: B
Dec 14, 2023

In real life, I wouldn't trust SQS to handle such large amount of data.

Littleboy95Option: B
Apr 24, 2023

B is correct, you can integrate SQS with API Gateway HTTP. I have checked it in AWS API Gateway Console https://repost.aws/knowledge-center/api-gateway-rest-api-sqs-errors A is incorrect because you can not set SQS queue as the target of ALB C is incorrect because a fleet of EC2 instances and ASG can lead instances to terminated unexpectedly → data loss D is incorrect because Kinesis Data Streams is a provisioned service, It can not handle unpredictable bursts

youngmanaws
Apr 26, 2023

KDS has on-demand mode. https://docs.aws.amazon.com/streams/latest/dev/how-do-i-size-a-stream.html

Littleboy95
Apr 29, 2023

Yes, KDS has on-demand mode, my wrong. But according to the above link, KDS on-demand can only accommodate up to double the peak write throughput observed in the previous 30 days. While SQS standard Queue has Unlimited Throughput https://aws.amazon.com/sqs/features/

AMEJackOption: B
May 7, 2023

Kinesis DataStreams can't be the origin for the CloudFront

rbm2023Option: B
May 22, 2023

I agree with B https://aws.amazon.com/blogs/architecture/things-to-consider-when-you-build-rest-apis-with-amazon-api-gateway/ This pattern can decouple the data ingestion from the data processing. "you should look for opportunities to design an asynchronous, loosely coupled architecture. A decoupled architecture separates the data ingestion from the data processing and allows you to scale each system separately"

severlightOption: B
Nov 17, 2023

yes you can integrate API Gateway HTTP Api with SQS

nzin4x
Feb 28, 2024

but normally API gateway can not handle high burst request. it will make 429 too many requests error.

Sarutobi
Apr 25, 2023

B is the best option.

mrfretzOption: B
Apr 25, 2023

Kinesis retention

mrfretz
Apr 26, 2023

Answer D, sorry typo

mrfretzOption: D
Apr 26, 2023

Kinesis retention

Roontha
May 28, 2023

Answer : B

NikkyDickyOption: B
Jul 5, 2023

B is right

rxhan
Jul 23, 2023

Similar to #179

SK_TyagiOption: B
Aug 20, 2023

KDS need to implement Sharding for unpredictable bursts

career360guruOption: B
Nov 24, 2023

Option B

career360guruOption: B
Nov 25, 2023

Option B

vip2Option: B
Jul 9, 2024

Restful API is not REST API, so HTTP API-GW + SQS