exam questions

Exam AWS Certified Solutions Architect - Professional All Questions

View all questions & answers for the AWS Certified Solutions Architect - Professional exam

Exam AWS Certified Solutions Architect - Professional topic 1 question 665 discussion

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.)

  • 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.
Show Suggested Answer Hide Answer
Suggested Answer: AB 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
keos
Highly Voted 3 years, 8 months ago
would go for AD
upvoted 23 times
tuananhngo
3 years, 7 months ago
I DONT THINK SO. THE QUESTION DOES NOT MENTION DATA SHOULD BE PROCESSED IN REAL-TIME. I AM GOING WITH AB.
upvoted 6 times
...
...
Bulti
Highly Voted 3 years, 8 months ago
E is out as IoT core cannot use Amazon SQS FIFO as target. C is out as increasing the payload size would not necessarily result in reduced volume over a period of time. Between B and D, I would go with D as batching the data before sending to Lambda would result in reducing the concurrency which is the reason for TooManyRequestsException. A is correct because Lambda is writing to Dynamo DB and batching wouldn't help with the rate at which Lambda is writing data to DynamoDB which is the cause of ProvisionedThroughputExceededException. So need to increase the WCU in DynamoDB. Correct answer is A and D.
upvoted 19 times
...
nhorcajada
Most Recent 1 year, 8 months ago
Selected Answer: AD
AD ...memory thing is not the problem here
upvoted 1 times
...
rbm2023
2 years ago
Selected Answer: AB
https://repost.aws/knowledge-center/lambda-troubleshoot-throttling I thought the only way to solve the lambda error mentioned would be to increase concurrency for lambda which lead me to choose option E. Apparently, there is reference from AWS to increase the memory as well: “Check for spikes in Duration metrics for your function Concurrency depends on function duration. If your function code is taking too long to complete, there might not be enough compute resources. Try increasing the function's memory setting. Then, use AWS X-Ray and CloudWatch Logs to isolate the cause of duration increases. Note: Changing the memory setting can affect the charges that you incur for execution time.”
upvoted 1 times
vn_thanhtung
1 year, 9 months ago
As more smart meters are deployed, the Engineers notice the Lambda functions are taking from 1 to 2 minutes to complete. I don't think the problem is in the lambda
upvoted 1 times
...
...
Jesuisleon
2 years ago
Selected Answer: AE
I think A and E. For B, increase lambda memory has nothing to do with the error TooManyRequestsException which is related with lambda cocurrency limit, pls. refer to https://repost.aws/questions/QUDg8O87XnQoaITAumf8TpVg/error-lambda-toomanyrequestsexception For E, I think data is sent to api gateway then data is queued in SQS by this lambda can handle in a limited concurrency.
upvoted 4 times
Jesuisleon
2 years ago
For Bulti mentioned that E is out as IoT core cannot use Amazon SQS FIFO as target, I didn't see anywhere in the question mentioned aws IoT core service , My understanding is data -> apigateway->sqs->dynamodb. So E is feasible.
upvoted 1 times
...
...
dev112233xx
2 years, 1 month ago
Selected Answer: AB
AB are correct https://repost.aws/knowledge-center/lambda-troubleshoot-throttling Also, can you tell me how a rest api can "stream" the data to Kinesis? Lol it's possible to do the opposite which Kinesis stream to Api Gateway but not Api Gateway to Kinesis especially when the Rest endpoint is Synchronous ..
upvoted 2 times
...
zWarez
2 years, 3 months ago
"ProvisionedThroughputExceededException". D: Kinesis can group request in batch so Lambda can handle them efficiently. B is not right. There's no mentioning that memory was bottleneck. Lambda has 100 concurrent execution per region. So batching here is more important than increase Lambda memory setting.
upvoted 1 times
romiao106
2 years, 1 month ago
If lambda takes a long time to execute it will affect the number of concurrent requests in a specific region. By allowing for more memory, it can decrease the # of time to run a lambda function thus allows for more concurrent requests.
upvoted 1 times
...
...
andras
2 years, 3 months ago
Selected Answer: AB
Does increasing Lambda memory increase performance? If a function is CPU-, network- or memory-bound, then changing the memory setting can dramatically improve its performance. Since the Lambda service charges for the total amount of gigabyte-seconds consumed by a function, increasing the memory has an impact on overall cost if the total duration stays constant.
upvoted 2 times
...
syaldram
2 years, 4 months ago
Selected Answer: AD
ProvisionedThroughputExceededException = DynamoDB
upvoted 2 times
...
evargasbrz
2 years, 5 months ago
Selected Answer: AB
I will go with A and B
upvoted 1 times
...
gnic
2 years, 9 months ago
Selected Answer: AD
AD D - The question talk about "tooManyRequest". Kinesis can batch data
upvoted 2 times
...
johnnsmith
3 years, 3 months ago
D is vague. Does it use the same Lambda function? If yes, it doesn't work. If you do a batch of 10, it will take 20 minutes to finish. If a new design with EC2 is allowed, D is correct. The question says "modification" which implies same Lambda function. Then B is correct. Then what is currently memory size? If it is already 10GB, B is wrong. Overall, it is a badly worded question.
upvoted 1 times
...
Ishu_awsguy
3 years, 4 months ago
I would go for A and B. The error on DynamoDb is because of the resources constraint since the requests are too high. A for increasing WCU B is supported by https://aws.amazon.com/premiumsupport/knowledge-center/lambda-troubleshoot-throttling/ The blog quotes below. Check for spikes in Duration metrics for your function Concurrency depends on function duration. If your function code is taking too long to complete, then there might not be enough compute resources. Try increasing the function's memory setting. Then, use AWS X-Ray and CloudWatch Logs to isolate the cause of duration increases D should not be ideal because it changes the whole architecture and will induce more latency I believe.
upvoted 2 times
joancarles
2 years, 8 months ago
Basically AWS Lambda has a default safety throttle of 100 concurrent executions per account per region. Increasing the lambda size doesn't solve the root problem, so D seems to be a better option.
upvoted 2 times
...
...
cldy
3 years, 6 months ago
A. Increase the write capacity units to the DynamoDB table. D. Stream the data into an Amazon Kinesis data stream from API Gateway and process the data in batches.
upvoted 2 times
...
AzureDP900
3 years, 6 months ago
A,D seems to be correct
upvoted 1 times
...
Bigbearcn
3 years, 7 months ago
AD. https://alienattack.workshop.aws/en/short-labs/kinesis/300-ingestion-to-dynamodb.html
upvoted 1 times
...
andylogan
3 years, 7 months ago
It's A D
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...