Course menuAIP-C01

Exams / AIP-C01 / Study guide / Prompt chains and flows (Amazon Bedrock Flows, Step Functions)

Prompt chains and flows (Amazon Bedrock Flows, Step Functions): AIP-C01 study notes and practice questions

What to know about Prompt chains and flows (Amazon Bedrock Flows, Step Functions) for the AIP-C01 exam, from the Foundation Model Integration, Data Management, and Compliance domain (31% of the exam guide), then 1 free question to test it. Part of the AIP-C01 study guide.

Last verified against current AWS documentation ·How we write our questions

What to know for the exam

AIP-C01 asks how to break a task into reliable steps, which orchestration service fits the workflow, and when a chain costs more than it helps.

Two orchestration options

Amazon Bedrock Flows (formerly Prompt Flows) builds a workflow from nodes: prompt nodes, knowledge base nodes, Lambda nodes, condition nodes, iterator and collector nodes. Flows support versions and aliases, so you can release a chain the same way you release code. It suits prompt-centric workflows owned by a product team.

AWS Step Functions calls Bedrock through its optimized integration, for example invoking a model directly. It adds retries, error catching, Map states for parallel work, and human approval through task tokens. Use it when the workflow includes many AWS services or needs strict control over retries and timeouts. Standard workflows suit long or auditable runs. Express workflows suit high-volume, short runs.

Typical chain patterns

Pattern Example
Sequential Extract fields, then validate, then draft a reply
Conditional Route to a simple prompt for easy cases and a detailed prompt for hard ones
Parallel then aggregate Summarize each section in parallel, then combine into one report
Pre- and post-processing Lambda normalizes input before the model and checks output afterward
Reusable prompt node One approved summarization prompt used by several flows

How to choose

Scenario wording Choose
“Product team builds and versions a prompt workflow visually” Amazon Bedrock Flows
“Chain must retry failed steps and call other AWS services” Step Functions with Bedrock integration
“Independent sections processed at the same time” Map or parallel branches, then aggregate
“Output must pass a rule check before the user sees it” Post-processing Lambda step
“Simple task, latency and cost matter most” A single prompt

Common traps

  • Chaining for a task one prompt handles. Each extra step adds latency and tokens.
  • No retry or timeout on model calls, which can stall a whole workflow.
  • Parallel branches with no aggregate step, leaving results unmerged.
  • Using the largest model for every step instead of a smaller model for simple steps.
  • Hard-coding prompts in each chain rather than reusing approved prompt nodes.
  • Choosing Step Functions for a prompt-only workflow when Bedrock Flows is simpler to manage.

See also Prompt management and Query transformation.

Try the 1 practice question

A motor insurer's claims team wants a workflow that drafts a first response to each new claim. The steps are: classify the claim type, extract the vehicle and incident fields, look up the policy in an internal service, and then either draft a letter or route the claim to an adjuster.

Claims above 10,000 dollars must always go to an adjuster, and the claims analysts, who are not developers, must be able to see and edit each prompt step in a visual editor. Each change must be versioned so the team can roll back a workflow.

The team wants as little glue code as possible between the steps.

Which solution meets these requirements?

Choose one answer.

  1. A. Put every step into one long prompt that asks the model to classify, extract, decide the routing and draft the letter in a single response, and parse the routing decision from its output.
  2. B. Build a Step Functions Standard workflow with a Choice state for the amount rule, a Task state for each model call and a Lambda task for the policy lookup, and deploy each change through the team's CI pipeline.
  3. C. Create a chain of separate Lambda functions, each with a hardcoded prompt that calls the model, and pass the results between functions through an Amazon SQS queue at each step.
  4. D. Build an Amazon Bedrock Flow with prompt nodes, a Lambda function node for the policy lookup and a condition node on the amount, and call a published version through an alias.
Show the answer and explanation

Answer: D

  • A. Wrong: One prompt cannot call the policy service, and parsing a routing decision from free text is unreliable for a 10,000-dollar rule. Analysts also cannot edit the steps separately, so the design misses the visual editing and control requirements.
  • B. Wrong: Step Functions handles the branching and retries well, but the analysts would need to edit state machine code rather than prompts in a visual editor. The workflow also needs glue code for each step, which misses the requirements.
  • C. Wrong: Hardcoded prompts in Lambda functions are hard for analysts to edit, and the queues add a lot of glue code between steps. Version control of the workflow is also left to the team, so this option misses several requirements.
  • D. Right: Bedrock Flows connects prompt, Lambda and condition nodes visually, so analysts can edit the prompts and the team needs little glue code. Published flow versions and aliases let the team roll back to an earlier version, which meets every requirement. Learn more: Amazon Bedrock Flows (opens in a new tab)

Explanation

Bedrock Flows combines prompt, Lambda and condition nodes in a visual editor, with versions and aliases for rollback and little glue code between steps. A single prompt cannot reliably enforce the amount rule, while Step Functions and Lambda chains require code that the analysts cannot edit.

Study

Want more on Prompt chains and flows (Amazon Bedrock Flows, Step Functions)? The 5 full-length practice sets have 5 more Prompt chains and flows (Amazon Bedrock Flows, Step Functions) questions, 375 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets

Study Prompt chains and flows (Amazon Bedrock Flows, Step Functions)

More Foundation Model Integration, Data Management, and Compliance topics