DVA-C02 exam dumps

DVA-C02 practice question 194 of 399

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

DVA-C02 Question 194

Single answer

You are developing a serverless application using AWS Lambda. The application needs to process large batches of messages from an Amazon SQS queue. To ensure optimal performance, you want to maximize the number of messages processed in a single invocation of the Lambda function while keeping the system scalable. Which configuration change should you make?

  1. A

    Increase the BatchSize parameter in the event source mapping.

  2. B

    Enable Lambda function reserved concurrency.

  3. C

    Set the VisibilityTimeout of the SQS queue to 0 seconds.

  4. D

    Increase the timeout value of the Lambda function to its maximum limit.

Show answer and explanation

Correct answer: A

Explanation

To optimize the processing of large batches of messages from an SQS queue, you can adjust the BatchSize parameter in the Lambda event source mapping. This parameter controls how many messages are fetched and passed to the Lambda function in a single invocation, allowing you to process more messages concurrently and reduce overall invocation costs. Other options, like reserved concurrency or increasing timeout, do not directly address batch processing efficiency.

  • A. Correct.

    Correct. Increasing the BatchSize parameter allows your Lambda function to process more messages in a single invocation, improving performance and reducing costs when processing large batches.

  • B. Incorrect.

    Incorrect. Reserved concurrency limits the number of concurrent executions of a Lambda function but does not impact the number of messages processed per invocation.

  • C. Incorrect.

    Incorrect. Setting the VisibilityTimeout to 0 seconds would cause unprocessed messages to become available immediately, potentially leading to duplicate processing.

  • D. Incorrect.

    Incorrect. Increasing the timeout value allows the Lambda function to run for longer durations but does not affect the number of messages processed in a single invocation.

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