exam questions

Exam AWS Certified Developer - Associate DVA-C02 All Questions

View all questions & answers for the AWS Certified Developer - Associate DVA-C02 exam

Exam AWS Certified Developer - Associate DVA-C02 topic 1 question 60 discussion

An ecommerce company is using an AWS Lambda function behind Amazon API Gateway as its application tier. To process orders during checkout, the application calls a POST API from the frontend. The POST API invokes the Lambda function asynchronously. In rare situations, the application has not processed orders. The Lambda application logs show no errors or failures.
What should a developer do to solve this problem?

  • A. Inspect the frontend logs for API failures. Call the POST API manually by using the requests from the log file.
  • B. Create and inspect the Lambda dead-letter queue. Troubleshoot the failed functions. Reprocess the events.
  • C. Inspect the Lambda logs in Amazon CloudWatch for possible errors. Fix the errors.
  • D. Make sure that caching is disabled for the POST API in API Gateway.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

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
[Removed]
Highly Voted 11 months, 1 week ago
B. Create and inspect the Lambda dead-letter queue. Troubleshoot the failed functions. Reprocess the events. When Lambda functions are invoked asynchronously, there is a possibility that the function fails without logging errors if there is no proper error handling. Configuring a dead-letter queue (DLQ) allows you to capture and review events that were not processed successfully. By creating and inspecting the DLQ, you can identify and troubleshoot the issues with the failed Lambda invocations and reprocess those events if needed. This will help ensure that no orders are missed without leaving any errors in the Lambda logs.
upvoted 23 times
...
gpt_test
Highly Voted 2 years ago
Selected Answer: B
Explanation: By configuring a dead-letter queue (DLQ) for the Lambda function, you can capture asynchronous invocation events that were not successfully processed. This allows you to troubleshoot the failed functions and reprocess the events, ensuring that orders are not missed. The DLQ will hold information about the failed events, allowing you to analyze and resolve the issue.
upvoted 13 times
rlnd2000
1 year, 11 months ago
as you said "... events that were not successfully processed." but there is not failure in Lambda log, so the lambda was not invoked by the POST API event. B is id not the answer.
upvoted 5 times
kavi00203
1 year, 10 months ago
Its an asynchronous invocation events, that's y there is no log. Because in asynchronous its not mandatory to get the result after invocation events.
upvoted 2 times
TeeTheMan
1 year, 9 months ago
Asynchronous invocation means that the caller of the lambda does not wait for a response. The type of invocation has no effect on the lambda having logs or not. I picked A, because the lambda not having logs suggests something’s gone wrong upstream of the lambda.
upvoted 5 times
...
...
...
...
Dadasar
Most Recent 1 month, 3 weeks ago
Selected Answer: B
A.Eliminada: O problema ocorre no backend (Lambda), e não no frontend. Como a invocação é assíncrona, o frontend não tem controle sobre falhas no processamento. C. Eliminada: Já foi mencionado que os logs do Lambda não mostram erros ou falhas, então apenas inspecionar os logs do CloudWatch não ajudaria a encontrar a causa do problema. D. Eliminada: O cache no API Gateway não afeta requisições POST, pois o cache só é aplicado para métodos GET. Então essa alternativa não faz sentido.
upvoted 1 times
...
sumanshu
4 months ago
Selected Answer: B
since there are no logs of errors or failures, the issue is likely due to dropped asynchronous events. Configuring a DLQ will capture these dropped events for further analysis and reprocessing. A) Eliminated - While inspecting frontend logs can help diagnose client-side issues, the problem here involves unprocessed events in Lambda. C) Eliminated - The question states that there are no errors or failures in the Lambda logs D) Eliminated - API Gateway caching is not related to this issue. Even with caching enabled, events would still invoke the Lambda function.
upvoted 3 times
...
mallikarjun_angadi
5 months, 2 weeks ago
Answer : B Lambda has a concurrency limit and in some cases, if the limit is reached, Lambda could throttle incoming requests without throwing an error, which means some invocations may be lost or delayed. Those will be moved to DLQ
upvoted 1 times
...
nbxyzd
6 months ago
Selected Answer: B
Option A is obviously wrong. Remember, it's an asynchronous labmda, so replaying the POST API returns no info instrumental to issue diagnosis. If you know how AWS usually designs a quiz, you'll know B is definitely the answer.
upvoted 1 times
...
65703c1
11 months, 1 week ago
Selected Answer: B
B is the correct answer.
upvoted 1 times
...
KarBiswa
1 year, 4 months ago
Selected Answer: B
https://aws.amazon.com/about-aws/whats-new/2016/12/aws-lambda-supports-dead-letter-queues/
upvoted 1 times
...
Jonalb
1 year, 6 months ago
Selected Answer: B
B. Crie e inspecione a fila de mensagens mortas do Lambda. Solucione os problemas das funções com falha. Reprocesse os eventos. Mais Votados
upvoted 1 times
...
mr_swal
1 year, 6 months ago
Selected Answer: A
The Lambda application logs show no errors or failures. - So Lambda function was not invoked at all
upvoted 1 times
daicoso
1 year, 6 months ago
if the application code doesn't log errors and doesn't throw exceptions, no error or failure will be logged
upvoted 1 times
...
...
nmc12
1 year, 6 months ago
Selected Answer: B
The Lambda Dead Letter Queue is a feature that helps in troubleshooting events that failed processing by a Lambda function. When an asynchronous invocation of a Lambda function fails, AWS Lambda can direct the failed event to an Amazon SNS topic or an Amazon SQS queue (the dead-letter queue), where the event is stored and can be analyzed or reprocessed.
upvoted 1 times
...
norris81
1 year, 7 months ago
Selected Answer: C
I don't like B which has reprocess the errors, which will make a whole load of errors be process creating orders which could be months old
upvoted 3 times
...
misa27
1 year, 7 months ago
Selected Answer: B
B https://aws.amazon.com/what-is/dead-letter-queue/
upvoted 1 times
...
ninomfr64
1 year, 8 months ago
Selected Answer: B
A) asynchronous invocations doe not return result to the caller, thus I do not expect errors in frontend log C) the scenario question rules out the option to have error messages in the Lambda log D) I do not see how caching can have impact in this scenario B) having a dead-letter queue is a viable option to troubleshoot asynchronous lambda invocation error, another option would be using Destination
upvoted 1 times
...
backfringe
1 year, 9 months ago
Selected Answer: C
Option C is the appropriate choice because it involves inspecting the Lambda logs in Amazon CloudWatch to identify any potential issues or errors that might be causing the orders not to be processed Option B is not the most appropriate choice because the dead-letter queue is generally used to capture events that cannot be processed by a Lambda function. In this scenario, it seems that the Lambda function is executing without apparent errors. Thus, the issue might not be related to dead-letter queue failures.
upvoted 2 times
...
redfivedog
1 year, 9 months ago
Selected Answer: D
I think D should be the correct answer to this question. The logs have no indications of errors or failed events, so if some transactions are not being processed, that probably means that the lambda function wasn't invoked for those calls. One reason could be that caching is enabled in API gateway for the POST request, so the lambda function isn't triggered for any cache hits. - A is not correct as the frontend would be getting 202s for all asynchronous post requests. - B is not correct because lambda logs have no errors => no lambda execution errors => DLQ won't get any requests of interest if we enable it. A comment below mentioned that asynchronous lambda invocations don't generate logs, but that is not true. - C is obviously incorrect. The premise explicitly mentions that there aren't any errors in the logs.
upvoted 3 times
Saurabh04
8 months, 2 weeks ago
Caching is only for GET Requests not for POST Requests. Correct answer is B
upvoted 2 times
...
xdkonorek2
1 year, 4 months ago
Absolutely agree, D is the answer
upvoted 1 times
...
...
gomurali
1 year, 10 months ago
https://aws.amazon.com/about-aws/whats-new/2016/12/aws-lambda-supports-dead-letter-queues/
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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago