aws-samples / bedrock-claude-chat

AWS-native chatbot using Bedrock + Claude (+Mistral)
MIT No Attribution
687 stars 230 forks source link

[Feature Request] Automatic Retries for Throttling by S3 During File Upload #409

Open ViswanathaReddyGajjala opened 4 days ago

ViswanathaReddyGajjala commented 4 days ago

Describe the solution you'd like

When multiple files are uploaded to create a new bot, it often results in an Error Message: Request failed with status code 503. I want to implement automatic retries for these failed uploads. I need to understand if there are any considerations I should take into account before implementing this feature.

Why the solution needed

For every throttled request, we currently have to manually delete each file. This process can be quite frustrating for our customers. To improve the customer experience, we could implement automatic retries for these failed uploads

Additional context

I attempted to upload 200+ files and experienced over 140+ throttled uploads. To avoid throttling, I had to upload the files in batches, which was a frustrating process.

Implementation feasibility

Are you willing to discuss the solution with us, decide on the approach, and assist with the implementation?

statefb commented 4 days ago

Ref: https://repost.aws/knowledge-center/http-5xx-errors-s3

ViswanathaReddyGajjala commented 4 days ago

Thank you! I noticed that earlier, which is why I'm considering adding support for retries. If you believe this would be beneficial, I can spend some time on this.

statefb commented 4 days ago

@ViswanathaReddyGajjala The simplest way would be retrying uploadFile n times with a circuit breaker. It'd be appreciated if you could create a PR.