Find answers, ask questions, and connect with our
community around the world.

Home Forums AWS AWS Certified Solutions Architect Professional Review Mode Set 2 Question 5 – Disagree with Answer

  • Review Mode Set 2 Question 5 – Disagree with Answer

  • SalientListener

    June 21, 2024 at 3:39 am

    An electric utility company deploys smart meters for its customers to easily track their electricity usage. Each smart meter sends data every five minutes to an Amazon API Gateway which is then processed by several AWS Lambda functions before storing to an Amazon DynamoDB table. The Lambda functions take about 5 to 10 seconds to process the data based on the initial deployment testing. As the company’s customer base grew, the solutions architect noticed that the Lambda functions are now taking 60 to 90 seconds to complete the processing. New metrics are also collected from the smart meters which further increased the processing time. Errors began showing when running the Lambda function such as Too Many Requests & Provisioned Throughput Exceeded error when performing PUT operation on the DynamoDB table
    (Select TWO)
    (A) The WCU Answer is correct.
    (B) Process the data in batches to avoid reaching the write limits to the DynamoDB table. Group the requests from API Gateway by streaming the data into an Amazon Kinesis data stream.

    Answer (A) Is totally fine.

    However for Answer(B) In order to “Group the requests from API Gateway by streaming data into Kinesis?”: I read the AWS documentation where they explain API Gateway can PROXY to Kinesis PutRecord/PutRecords. Is this answer suggesting the application is REFACTORED into calling API Gateway -> Kinesis Proxy’s PutRecords operation so that EACH smart meter is publishing multiple records instead of one at a time?

  • Neil-TutorialsDojo

    June 28, 2024 at 9:28 am

    Hi SalientListener,

    Good day!
    As I mentioned in your other post ( ), API Gateway alone cannot Group the individual calls from the smart meters. Therefore, it needs the Amazon Kinesis data stream to aggregate multiple records and process them in batches. Then, Lambda functions can be triggered by Kinesis streams, instead of directly invoking Lambda functions for each data point using API Gateway.
    I hope this clarifies your question. If you have more queries, pls let us know.

    Neil @ Tutorials Dojo

    Review Mode Set 2 Question 5 Question

    • SalientListener

      June 28, 2024 at 11:38 pm

      So is this the architecture you are suggesting the second answer? That the series of messages are pushed into different shards and from EACH shard Lambdas are triggered after a batch limit is reached?

      Smart meter 1,2,3,4,5,6,7 messages> API Gateway > Kinesis Shard 1,2 <b style=”background-color: transparent; font-family: inherit; font-size: inherit;”> <— Lambda per Shard (Batch size: 10 Batch Window: 40 seconds)

  • Neil-TutorialsDojo

    July 2, 2024 at 10:25 am

    Hello Salient,

    Yes, that’s correct. Smart meters > Amazon API Gateway > Kinesis Data Stream automatically distributes the data records across multiple shards based on the partition key. So, in your example:

    • Smart meter 1, 2, 3 messages could go to Kinesis Shard 1
    • Smart meter 4, 5, 6, 7 messages could go to Kinesis Shard 2

    Kinesis Data Streams automatically provisions and manages the number of shards. Then, the Lambda functions are triggered by Kinesis Data Streams to process the batched data records from each shard. This parallelizes the processing and helps to scale the workload across multiple Lambda invocations.

    I hope this clarifies your question.

    Neil @ tutorials dojo

Viewing 1 - 2 of 2 replies

Log in to reply.

Original Post
0 of 0 posts June 2018