close

[Solved] An error occurred (ThrottlingException) when calling the GetDeployment operation (reached max retries: 4): Rate exceeded

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error An error occurred (ThrottlingException) when calling the GetDeployment operation (reached max retries: 4): Rate exceeded in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How An error occurred (ThrottlingException) when calling the GetDeployment operation (reached max retries: 4): Rate exceeded Error Occurs?

Today I get the following error An error occurred (ThrottlingException) when calling the GetDeployment operation (reached max retries: 4): Rate exceeded in python.

How To Solve An error occurred (ThrottlingException) when calling the GetDeployment operation (reached max retries: 4): Rate exceeded Error ?

  1. How To Solve An error occurred (ThrottlingException) when calling the GetDeployment operation (reached max retries: 4): Rate exceeded Error ?

    To Solve An error occurred (ThrottlingException) when calling the GetDeployment operation (reached max retries: 4): Rate exceeded Error Unfortunately, there is no way to increase the rate limit, as this is dynamically provisioned by the AWS API.

  2. An error occurred (ThrottlingException) when calling the GetDeployment operation (reached max retries: 4): Rate exceeded

    To Solve An error occurred (ThrottlingException) when calling the GetDeployment operation (reached max retries: 4): Rate exceeded Error Unfortunately, there is no way to increase the rate limit, as this is dynamically provisioned by the AWS API.

Solution 1

Unfortunately, there is no way to increase the rate limit, as this is dynamically provisioned by the AWS API.

AWS SUPPORT:

This issue is not related to any concurrent deployment or any other resource related limit. This is a throttling issue, which cannot be changed.

Multiple API calls initiated at the same time gets throttled at our endpoints. The limit for each endpoint is varies and is dynamic, therefore it is not documented anywhere.

In this case, there are multiple calls for ‘GetDeployment’ API simultaneously hence the calls are getting throttled.

In such scenarios we recommend to implement error retries and exponential backoff between retries, so that the API calls are not simultaneous.

I was able to implement an exponential back off to reduce the rate at which we are trying to get the deployment status and also increase the number of retries before deployment failure.

Make sure you are using the latest version of BOTO3 (boto3-1.9.108 botocore-1.12.108) which supports this new config system

PIPELINE SUCCESSFUL…

+ python ./_scripts/codedeploy_deploy.py
Deployment Created (Exponential back off 30s)
Deployment InProgress (Exponential back off 60s)
Deployment Succeeded

NOTE: I will update this post with more information as I revise the usage based on our deployments.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read