Exam DVA-C02 All QuestionsBrowse all questions from this exam
Question 53

A developer is using an AWS Lambda function to generate avatars for profile pictures that are uploaded to an Amazon S3 bucket. The Lambda function is automatically invoked for profile pictures that are saved under the /original/ S3 prefix. The developer notices that some pictures cause the Lambda function to time out. The developer wants to implement a fallback mechanism by using another Lambda function that resizes the profile picture.

Which solution will meet these requirements with the LEAST development effort?

    Correct Answer: A

    Setting the image resize Lambda function as a destination of the avatar generator Lambda function for events that fail processing is the solution that requires the least development effort. This is because it leverages AWS Lambda Destinations, which provides built-in support for routing failed asynchronous invocation results to a predetermined destination, such as another Lambda function. This method does not require additional coding or configuration for error handling, retries, or queue management, making it the simplest and most efficient solution for the task.

Discussion
March2023Option: A

Wouldn't A be the Least Effort

jingle4944Option: A

Previously, you needed to write the SQS/SNS/EventBridge handling code within your Lambda function and manage retries and failures yourself. With Destinations, you can route asynchronous function results as an execution record to a destination resource without writing additional code. https://aws.amazon.com/ru/blogs/compute/introducing-aws-lambda-destinations/

jayvarma

Option B is the right answer. Can someone say why B cannot be the right answer for this question? Option A fails when there are huge amounts of requests coming to the lambda functions. There is every chance for lambda to throw ProvisionedThrougputExceeded Exception because of the throttling issues. Which is almost the similar reason why Option C will also fail at some point. However, you could use SNS but it is not the best solution. Definitely Option B.

KarBiswaOption: A

Least development effort no emphasis on orchestration

KarBiswa

https://aws.amazon.com/ru/blogs/compute/introducing-aws-lambda-destinations/ this link justifies the answer

fabiomonta18

The article says "For each execution status such as Success or Failure you can choose one of four destinations: another Lambda function, SNS, SQS, or EventBridge." It hink for this reason the correct one is B.

fabiomonta18

I mean, which destination other then SQS can you set in this case?

[Removed]Option: A

A is a simplest solution https://aws.amazon.com/ru/blogs/compute/introducing-aws-lambda-destinations/ https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations

jipark

your explanation looks correct. Lambda "Denstination" seems exact solution for this. it explains how to handle success, failed case.

umer1998

I agree with B because I am considering scalability in my mind if we have thousands/millions of requests at the same time. because of the quota limit, the lambda can fail if we continuously call two functions (step function) together, which may result in another function doing a throttling issue. If we pass the message to the SQS, our function will never face this issue with throttling. and since the question asks us to do the least development efforts. Separation of concerns will make development easier.

rlnd2000Option: B

B is the best option in my opinion, I agree with Nagendhar and junrun3 explanations and because decoupling using SQS is a best practice, I think when they say ... with the LEAST development effort that imply following the best practices in AWS.

AWSdeveloper08Option: B

I agree with the explanation for option B. Scalability is the key

PrinceMughalOption: A

I will go with A as it is the simplest solution among other three option

fabiomonta18Option: B

This seems to be a tricky one. It's true that you can set Lambda destination, but you better set SQS as destination, exactly what the article suggests, go check it. The correct one is B. https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations

65703c1Option: A

A is the correct answer.

vipyodha

B is right. A.wrong because Lambda Function Chaining: While Lambda function chaining is possible, it would require modifying the avatar generation Lambda function to include the resize function as a destination for failed events. This might involve additional coding and potentially more complex error handling within the Lambda function.

Tluszczyk

With AWS Lambda destinations you don't need to interact with code to change this

JonalbOption: A

A. Defina a função Lambda de redimensionamento de imagem como um destino da função Lambda do gerador de avatar para os eventos que falham no processamento

appuNBablu

A, because we can map another Lambda function as destination alongside (SQS, SNS, Event Bridge)

ninomfr64Option: A

A is the easiest option https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations

backfringeOption: A

least amount of effort to set up destination on failure events to REsize Lambda

ScherbakovMike

SQS or SNS can be assigned as 'TargetArn' in the 'DeadLetterConfig'. I think, D variant is more appropriate: in case of timeout (image is too large), there will be push to SNS and to subscribed resizing function. Subscribed resizing function writes the resized image to S3 and original Lambda function processes the resized image again.