Q46 — AWS SAP-C02 Ch.2

Question 46 of 75 | ← Chapter 2

Q196. 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?

Correct Answer: B. Create an Amazon API Gateway HTTP API that implements the RESTful API. Create an Amazon Simple Queue Service (Amazon SQS) queue. Create an API Gateway service integration with the SQS queue. Create an AWS Lambda function to process messages in the SQS queue

Explanation

Option A involves creating an ALB for the RESTful API and adding an SQS queue as a target. However, this option does not provide an automated way to process messages in the queue. It requires deploying a container that runs in Amazon ECS with the Fargate launch type to process messages in the queue. Option C involves creating an EC2 Auto Scaling group to process incoming data through an API Gateway proxy integration. However, this option does not provide a scalable or cost-effective solution since managing EC2 instances requires more administrative overhead than other AWS services. Option D involves creating a CloudFront distribution for the RESTful API and consuming data from a Kinesis Data Stream using an AWS Lambda function. This option may be complex and expensive since it requires setting up and configuring multiple AWS services. Option B involves creating an API Gateway HTTP API that implements the RESTful API and an SQS queue. The API Gateway service integration can be used to send incoming data to the SQS queue. An AWS Lambda function can then be used to process messages in the queue. This solution is both scalable and cost-effective and can handle unpredictable bursts of traffic while ensuring no data loss.