Skip to Content

Amazon DVA-C02: How to avoid AWS Lambda rate limit errors when retrieving data from Parameter Store?

Learn the most cost-effective solution to prevent rate limiting issues when AWS Lambda functions retrieve data from Systems Manager Parameter Store during high usage periods.

Table of Contents

Question

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?

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.

Answer

D. Add an SSM dynamic reference as an environment variable to the Lambda functions resource in the CloudFormation templates.

Explanation

Adding an SSM dynamic reference as an environment variable to the Lambda functions resource in the CloudFormation templates is the most cost-effective solution to avoid rate limiting issues when retrieving data from AWS Systems Manager Parameter Store.

By using an SSM dynamic reference, the Lambda function will retrieve the advanced parameter value from Parameter Store only during the function’s initialization phase. This approach reduces the number of API calls made to Parameter Store, as the parameter value is cached within the Lambda function’s execution environment.

Since the advanced parameter only changes during new deployments, using an SSM dynamic reference ensures that the Lambda function always has access to the latest parameter value without the need to make frequent API calls to Parameter Store. This solution eliminates the rate limiting issues encountered during periods of high usage.

Other options, such as configuring reserved concurrency, adding retry mechanisms, or requesting service quota increases, may incur additional costs or not effectively address the root cause of the rate limiting problem. By leveraging SSM dynamic references in the CloudFormation templates, the developer can efficiently manage the retrieval of the advanced parameter and optimize the application’s performance in a cost-effective manner.

Amazon AWS Certified Developer – Associate DVA-C02 certification exam assessment practice question and answer (Q&A) dump including multiple choice questions (MCQ) and objective type questions, with detail explanation and reference available free, helpful to pass the Amazon AWS Certified Developer – Associate DVA-C02 exam and earn Amazon AWS Certified Developer – Associate DVA-C02 certification.