Question

Difficulty: MediumServerless and Automated Scaling Architectures for Cost Efficiency

A fleet management company is designing a serverless alert processing pipeline. IoT devices in fleet vehicles send diagnostic alert events via HTTPS to an API endpoint. The traffic is highly unpredictable, with long periods of inactivity followed by sudden, high-volume bursts during peak driving hours. The alerts from each unique vehicle must be processed in the exact chronological order they were generated to ensure accurate event tracking. Each alert requires a brief, 3-second validation and database write operation. The company wants to minimize costs and eliminate idle compute expenses.

Which combination of two actions will meet these requirements most cost-effectively? (Select TWO.)

  1. Route incoming HTTPS requests from Amazon API Gateway directly to an Amazon SQS FIFO queue.Answer
  2. Configure an AWS Lambda function to poll the Amazon SQS FIFO queue and process the alerts.Answer
  3. C
    Route incoming HTTPS requests from Amazon API Gateway to a standard Amazon SQS queue.
  4. D
    Configure an AWS Lambda function to run continuously in a loop using a recursive invocation pattern to poll a standard Amazon SQS queue.
  5. E
    Deploy the processing logic on Amazon ECS using AWS Fargate tasks configured to run continuously to poll the queue.

Answer

Routing incoming HTTPS requests from Amazon API Gateway directly to an Amazon SQS FIFO queue and configuring an AWS Lambda function to poll the Amazon SQS FIFO queue and process the alerts.
Routing incoming HTTPS requests from Amazon API Gateway directly to an Amazon SQS FIFO queue and configuring AWS Lambda to poll the queue is the most cost-effective solution. API Gateway provides a serverless frontend that scales automatically and charges only per request. Direct integration with SQS FIFO buffers the messages and guarantees order processing per vehicle ID using the MessageGroupId. AWS Lambda scales to zero during idle periods, ensuring that compute costs are only incurred during the 3-second execution time when processing alerts.

Step-by-Step Solution

1
Select a serverless ingestion and queueing mechanism that supports strict ordering.
Amazon API Gateway integrates directly with Amazon SQS FIFO queues.
This setup allows HTTPS requests from vehicles to be securely received and queued in chronological order without needing continuously running servers or incurring compute costs during idle periods.
2
Select a scale-to-zero compute service to process the buffered messages.
AWS Lambda is configured to poll the SQS FIFO queue via event source mapping.
AWS Lambda automatically polls SQS, processes the alerts, and scales down to zero when there is no traffic, ensuring no costs are paid for idle compute time.

Key Concept

Serverless and Automated Scaling Architectures for Cost Efficiency
Estimated Time:2m 0s
Rate this question