AWS Certified Solutions Architect – Professional (SAP-C02) — Question 476
A utility company wants to collect usage data every 5 minutes from its smart meters to facilitate time-of-use metering. When a meter sends data to AWS, the data is sent to Amazon API Gateway, processed by an AWS Lambda function. and stored in an Amazon DynamoDB table. During the pilot phase, the Lambda functions took from 3 to 5 seconds to complete.
As more smart meters are deployed, the engineers notice the Lambda functions are taking from 1 to 2 minutes to complete. The functions are also increasing in duration as new types of metrics are collected from the devices. There are many ProvisionedThroughputExceededException errors while performing PUT operations on DynamoDB, and there are also many TooManyRequestsException errors from Lambda.
Which combination of changes will resolve these issues? (Choose two.)
Answer options
- A. Increase the write capacity units to the DynamoDB table.
- B. Increase the memory available to the Lambda functions.
- C. Increase the payload size from the smart meters to send more data.
- D. Stream the data into an Amazon Kinesis data stream from API Gateway and process the data in batches.
- E. Collect data in an Amazon SQS FIFO queue, which triggers a Lambda function to process each message
Correct answer: A, D
Explanation
To resolve the ProvisionedThroughputExceededException errors, the DynamoDB table's write capacity units must be increased to handle the higher volume of incoming write requests. To address the TooManyRequestsException and long execution times, streaming data into Amazon Kinesis Data Streams allows Lambda to process records in batches, significantly reducing the number of concurrent Lambda executions compared to a one-to-one invocation model. SQS FIFO with individual message triggering would not solve the throughput bottleneck as efficiently, and increasing Lambda memory alone does not address the concurrency and database throttling issues.