Issue
I am running this code to translate
translate = boto3.client(service_name='translate',
aws_access_key_id="secret",
aws_secret_access_key="secret",
region_name='eu-central-1',
use_ssl=True)
translate.translate_text(Text=data,SourceLanguageCode="de",TargetLanguageCode="en").get("TranslatedText")
Code runs properly for most of the test but suddenly throws the following error:
An error occurred (ThrottlingException) when calling the TranslateText operation (reached max retries: 4): Rate exceeded
How to handle this exception?
Solution
This link has answers to throttling exceptions https://docs.aws.amazon.com/translate/latest/dg/what-is-limits.html#limits-throttling The service scales up the fleet based on the traffic pattern. I wonder at what TPS you hit the throttling limits.
&
Have you also tried a different region like eu-west-1?
Answered By - user13191010