AWS Certified Developer – Associate / Question #899 of 557

Question #899

A company uses an AWS Lambda function to process data from an internal API. The internal API has a strict limit on the number of concurrent connections it can handle. If the Lambda function exceeds this limit, the API returns connection limit exceeded errors.

A developer needs to ensure the Lambda function does not exceed the API's concurrent connection limit.

Which solution will meet this requirement?

A

Set the reserved concurrency for the Lambda function to the API's connection limit.

B

Reduce the memory allocation of the Lambda function.

C

Configure provisioned concurrency for the Lambda function to match the API's connection limit.

D

Increase the Lambda function's timeout setting.

Explanation

The correct answer is A because reserved concurrency directly caps the maximum number of concurrent Lambda executions. This ensures the function cannot scale beyond the API's connection limit, preventing errors.

- Option B (reducing memory) affects resource allocation but does not limit concurrency.
- Option C (provisioned concurrency) pre-warms instances but does not enforce a hard limit on concurrency.
- Option D (increasing timeout) extends execution duration but does not address concurrent connections.

Key Takeaway: Use reserved concurrency to enforce strict concurrency limits for Lambda functions, ensuring compliance with downstream service constraints.

Answer

The correct answer is: A