nerdexam
Amazon

SAA-C03 · Question #467

A solutions architect has an application container, an AWS Lambda function, and an Amazon Simple Queue Service (Amazon SQS) queue. The Lambda function uses the SQS queue as an event source. The…

The correct answer is D. Configure the SQS queue's visibility timeout value to be greater than the maximum time it takes to. When using an SQS queue as an event source for AWS Lambda, the visibility timeout of the SQS queue plays a critical role in preventing duplicate message processing. "If your Lambda function doesn't process the message and delete it from the queue within the visibility timeout…

Submitted by lukas.cz· Mar 4, 2026Design Resilient Architectures

Question

A solutions architect has an application container, an AWS Lambda function, and an Amazon Simple Queue Service (Amazon SQS) queue. The Lambda function uses the SQS queue as an event source. The Lambda function makes a call to a third-party machine learning (ML) API when the function is invoked. The response from the third-party API can take up to 60 seconds to return. The Lambda function's timeout value is currently 65 seconds. The solutions architect has noticed that the Lambda function sometimes processes duplicate messages from the SQS queue. What should the solutions architect do to ensure that the Lambda function does not process duplicate messages?

Options

  • AConfigure the Lambda function with a larger amount of memory.
  • BConfigure an increase in the Lambda function's timeout value.
  • CConfigure the SQS queue's delivery delay value to be greater than the maximum time it takes to
  • DConfigure the SQS queue's visibility timeout value to be greater than the maximum time it takes to

How the community answered

(35 responses)
  • A
    3% (1)
  • B
    9% (3)
  • C
    3% (1)
  • D
    86% (30)

Explanation

When using an SQS queue as an event source for AWS Lambda, the visibility timeout of the SQS queue plays a critical role in preventing duplicate message processing. "If your Lambda function doesn't process the message and delete it from the queue within the visibility timeout period, the message becomes visible again and can be processed again by the same or another function instance." In this scenario, the third-party API may take up to 60 seconds to respond. Since the Lambda function is configured with a 65-second timeout, the visibility timeout of the queue must be greater than or equal to the maximum function execution time to avoid the same message being Incorrect Options: A: Memory allocation doesn't impact duplicate message handling. B: Timeout is already sufficient; increasing it further does not solve the core issue. C: Delivery delay controls initial delivery delay, not reprocessing logic.

Community Discussion

No community discussion yet for this question.

Full SAA-C03 Practice