SAP-C02 exam dumps

SAP-C02 practice question 656 of 678

AWS Certified Solutions Architect - Professional. Professional level, Amazon Web Services. Free question with the correct answer and a full explanation.

SAP-C02 Question 656

Single answer

A company is building a serverless application using AWS Lambda to process images uploaded to an Amazon S3 bucket. The images need to be resized and then stored in another S3 bucket. The company has observed that some images take longer to process than others. What should the solutions architect do to ensure the Lambda function can handle varying processing times, without causing failures?

  1. A

    Increase the memory allocated to the Lambda function as it will also proportionally increase the CPU available.

  2. B

    Configure an Amazon SQS queue as an event source for the Lambda function to manage image processing retries.

  3. C

    Enable Lambda reserved concurrency to ensure sufficient instances of the function can run concurrently.

  4. D

    Adjust the Lambda function's timeout setting to accommodate the longest processing time.

Show answer and explanation

Correct answer: D

Explanation

AWS Lambda functions have a default timeout of 3 seconds, which can be increased up to a maximum of 15 minutes. Adjusting the timeout setting ensures that the function has enough time to complete processing even for images that take longer. This is the best solution in scenarios where processing times can vary significantly.

  • A. Incorrect.

    Increasing the memory does increase the CPU proportionally, but this does not address the issue of varying processing times, which can lead to timeout failures.

  • B. Incorrect.

    Using Amazon SQS as an event source can help manage message retries, but it does not directly address the execution time of the Lambda function.

  • C. Incorrect.

    Enabling reserved concurrency ensures that a certain number of function instances can run concurrently, but it does not solve the problem of varying execution times.

  • D. Correct.

    Adjusting the Lambda function's timeout setting allows the function to handle longer processing times without failing, making it the appropriate solution.

Timed practice exam

Take a SAP-C02 practice test under exam conditions

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

Start timed exam