hands-on lab

Building Resilient AI Architectures using Amazon Bedrock and AWS Step Functions

Difficulty: Beginner
Duration: Up to 1 hour
Students: 2
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

Service disruptions and model throttling are an inevitable reality when building on top of any third-party API. A resilient architecture anticipates these disruptions and degrades gracefully, maintaining core functionality and a good user experience even when the underlying model isn't fully available.

In this lab, students will build a state machine in AWS Step Functions that wraps every Bedrock call in resilience logic. The gateway implements a circuit breaker pattern to detect when the primary model is degraded (e.g. due to throttling or transient errors) and automatically routes to a fallback model when necessary. By the end of the lab, students will have a reusable architecture they can drop into any Bedrock-backed application to protect against the two most common real-world failure modes:

  • Regional throttling
  • Transient model errors

Learning objectives

Upon completion of intermediate-level lab, you will be able to:

  • Deploy an AI model state machine using AWS Step Functions and Amazon Bedrock
  • Implement a circuit breaker pattern to detect and respond to model degradation
  • Simulate model failures and observe the self-healing behavior of the architecture

Intended audience

  • Candidates for the AWS Certified Generative AI Developer – Professional (AIP-C01) exam
  • Cloud Architects
  • AI Developers

Prerequisites

Familiarity with the following will be beneficial but is not required:

  • AWS Step Functions
  • Amazon Bedrock
  • AWS Lambda
  • AWS DynamoDB

The following content can be used to fulfill the prerequisites:

Environment before

Environment after

Covered topics

Hands-on Lab UUID

Lab steps

0 of 5 steps completed.Use arrow keys to navigate between steps. Press Enter to go to a step if available.
  1. Logging In to the Amazon Web Services Console
  2. Previewing the Model Gateway Architecture
  3. Building the Model Gateway State Machine
  4. Observing the State Machine in Action
  5. Confirming Automatic Model Gateway Recovery