exam questions

Exam AWS Certified Developer Associate All Questions

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

Exam AWS Certified Developer Associate topic 1 question 397 discussion

Exam question from Amazon's AWS Certified Developer Associate
Question #: 397
Topic #: 1
[All AWS Certified Developer Associate Questions]

A developer 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 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 developer has noticed that the Lambda function sometimes processes duplicate messages from the SQS queue.

What should the developer do to ensure that the Lambda function does not process duplicate messages?

  • A. Configure the Lambda function with a larger amount of memory.
  • B. Configure an increase in the Lambda function's timeout value.
  • C. Configure the SQS queue’s delivery delay value to be greater than the maximum time it takes to call the third-party API.
  • D. Configure the SQS queue’s visibility timeout value to be greater than the maximum time it takes to call the third-party API.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
pancman
2 years, 3 months ago
Selected Answer: D
D is correct. Visibility timeout is the number of seconds a message in the queue stays invisible after a processor takes it. If this message is processed within this time limit, it will be deleted from the queue. If it is not processed within this time, the object will be returned to the queue and it will be visible again, waiting to be processed by the recipient EC2. In our case it is not being processed within the time limit so it is being returned to the queue. We need to increase the visibility timeout.
upvoted 4 times
...
JagpreetLM10
2 years, 3 months ago
Selected Answer: D
When the Lambda function is invoked, it reads a message from the SQS queue, makes a call to the third-party machine learning API, and then processes the message. The visibility timeout is the amount of time that the message is invisible in the queue after a consumer retrieves it. During this time, the message is not available to other consumers. If the Lambda function finishes processing the message before the visibility timeout expires, it will delete the message from the queue. If the Lambda function does not finish processing the message before the visibility timeout expires, the message becomes visible again and can be processed by another consumer.
upvoted 2 times
...
Phinx
2 years, 3 months ago
Selected Answer: D
It's D. You need to configure the visibility timeout in the SQS queue to be greater than the processing time .
upvoted 2 times
...
Mark1000
2 years, 3 months ago
I think is --> D
upvoted 2 times
...
KT_Yu
2 years, 3 months ago
Selected Answer: D
Ans: D
upvoted 2 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