diff --git a/localstack-core/localstack/services/lambda_/event_source_mapping/pollers/stream_poller.py b/localstack-core/localstack/services/lambda_/event_source_mapping/pollers/stream_poller.py index 7c40f563ef2f1..7a2980e1891ca 100644 --- a/localstack-core/localstack/services/lambda_/event_source_mapping/pollers/stream_poller.py +++ b/localstack-core/localstack/services/lambda_/event_source_mapping/pollers/stream_poller.py @@ -202,7 +202,9 @@ def poll_events_from_shard(self, shard_id: str, shard_iterator: str): attempts = 0 error_payload = {} - boff = ExponentialBackoff(max_retries=attempts) + max_retries = self.stream_parameters.get("MaximumRetryAttempts", -1) + # NOTE: max_retries == 0 means exponential backoff is disabled + boff = ExponentialBackoff(max_retries=max_retries) while ( not abort_condition and not self.max_retries_exceeded(attempts)