1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Amazon Bedrock

Connected

Exercise

Implementing rate limit handling

TrailBlaze, an AI-powered adventure-travel booking platform, has recently developed a chat assistant that is getting a surge of itinerary questions whenever new flight deals drop. You’ll build a helper function that copes with Bedrock throttling by adding exponential back-off.

The json, time and boto3 libraries are preloaded. The bedrock client and model_id have also been preloaded.

Instructions

100 XP
  • Complete the API request string with the prompt.
  • Implement exponential backoff.