AWS Certified Developer – Associate (DVA-C02) — Question 427
A developer has an application that uses AWS Lambda functions and AWS CloudFormation templates. Usage of the application has increased. As a result, the Lambda functions are encountering rate limit errors when they retrieve data.
The Lambda functions retrieve an advanced parameter from AWS Systems Manager Parameter Store on every call. The parameter changes only during new deployments. Because the application’s usage is unpredictable, the developer needs a way to avoid the rate limiting.
Which solution will meet these requirements MOST cost-effectively?
Answer options
- A. Configure the Lambda functions to use reserved concurrency that is equal to the last month’s average number of concurrent invocations.
- B. Add a retry mechanism with exponential backoff to the call to Parameter Store.
- C. Request a service quota increase for Parameter Store GetParameter API operations to match the expected usage of the Lambda functions.
- D. Add an SSM dynamic reference as an environment variable to the Lambda functions resource in the CloudFormation templates.
Correct answer: D
Explanation
Using an SSM dynamic reference in the CloudFormation template allows the parameter value to be retrieved once during deployment and passed directly as an environment variable to the Lambda functions. This completely eliminates the need for the Lambda functions to call the Parameter Store API on every execution, resolving the rate limit issue at no extra cost. Other solutions either do not resolve the underlying API rate limit (A), introduce latency and potential failures (B), or incur unnecessary costs and administrative overhead (C).