DVA-C02 exam dumps

DVA-C02 practice question 393 of 399

AWS Certified Developer - Associate. Associate level, Amazon Web Services. Free question with the correct answer and a full explanation.

DVA-C02 Question 393

Single answer

You are developing a serverless application using AWS Lambda to process orders. The Lambda function is invoked by an Amazon SQS queue, which receives hundreds of orders per second. You notice that the function does not process messages fast enough and there is a growing backlog of unprocessed messages in the queue. Which configuration change should you make to optimize the concurrency of your Lambda function?

  1. A

    Increase the batch size setting in the event source mapping for the SQS queue.

  2. B

    Set a reserved concurrency limit on the Lambda function.

  3. C

    Decrease the visibility timeout value of the SQS queue.

  4. D

    Enable FIFO mode for the SQS queue.

Show answer and explanation

Correct answer: A

Explanation

In this scenario, the Lambda function is invoked by an Amazon SQS queue, and the backlog of unprocessed messages indicates that the function is not processing messages quickly enough. Increasing the batch size in the event source mapping allows the function to process more messages per invocation, improving throughput and reducing the backlog. This is the most effective way to address the concurrency issue in this case.

  • A. Correct.

    Correct: Increasing the batch size allows the Lambda function to process more messages per invocation, reducing the backlog and improving concurrency.

  • B. Incorrect.

    Incorrect: Setting a reserved concurrency limit restricts the number of concurrent executions, which could further limit throughput instead of optimizing it.

  • C. Incorrect.

    Incorrect: Decreasing the visibility timeout could lead to duplicate processing of messages if the function does not complete in time, and does not directly improve concurrency.

  • D. Incorrect.

    Incorrect: Enabling FIFO mode changes the queue’s ordering guarantee but does not address the concurrency issue or the backlog of unprocessed messages.

Timed practice exam

Take a DVA-C02 practice test under exam conditions

65 questions in 130 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam