DVA-C02 exam dumps

DVA-C02 practice question 42 of 399

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

DVA-C02 Question 42

Single answer

You are developing a serverless application using AWS Lambda and need to process messages from an Amazon SQS queue. To optimize performance, you want to batch messages and process them concurrently. Which statement about configuring an event source mapping in this scenario is correct?

  1. A

    You can configure the BatchSize parameter to control the maximum number of messages processed per batch.

  2. B

    Event source mapping automatically retries failed messages indefinitely until they are processed successfully.

  3. C

    You must manually poll the SQS queue and pass messages to the Lambda function, as event source mapping does not support SQS.

  4. D

    You can set the MaximumRetryAttempts parameter to limit how many times a batch is retried before being sent to the dead-letter queue.

Show answer and explanation

Correct answer: A

Explanation

Event source mapping allows you to configure how AWS Lambda processes events from supported sources like SQS. For SQS, the BatchSize parameter determines the maximum number of messages processed in each Lambda invocation. This helps optimize performance by controlling the size of the workload. Other options mentioned either misrepresent the behavior of event source mappings or are not applicable to SQS.

  • A. Correct.

    Correct: The BatchSize parameter allows you to specify the maximum number of messages that the event source mapping will process in a single batch, making this the correct answer.

  • B. Incorrect.

    Incorrect: Event source mapping retries failed messages, but it does not retry them indefinitely. The retries depend on the MaximumRetryAttempts parameter or the retry logic for the event source.

  • C. Incorrect.

    Incorrect: Event source mapping supports Amazon SQS as an event source, and it automatically polls the queue and invokes the Lambda function with messages.

  • D. Incorrect.

    Incorrect: The MaximumRetryAttempts parameter is not configurable for SQS event source mappings. SQS queues handle retries internally, and unprocessed messages may be sent to a dead-letter queue if configured.

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