SaveMyCert
Log in
5 of 5 free questions left today·for 10 a day
Foundation Model Integration, Data Management, and Compliance

AIP-C01 Prompt Engineering and Prompt Governance on Amazon Bedrock

21 min readAIP-C01 · Foundation Model Integration, Data Management, and ComplianceUpdated

Prompt engineering and governance for foundation models is the practice of controlling what a model is instructed to do, how it must answer and which rules are enforced regardless of the prompt, while managing prompts as versioned, approved, tested and audited production assets. This lesson covers AIP-C01 Task 1.6: Bedrock Prompt Management templates, variables and versions; Bedrock Guardrails as the enforcement layer, including account and organization enforcement; structured outputs; Step Functions clarification workflows, Amazon Comprehend intent routing and DynamoDB conversation history; approval gates, S3 template repositories, CloudTrail and invocation logging; Lambda, Step Functions and CloudWatch quality checks; chain-of-thought, structured input and feedback loops; and Amazon Bedrock Flows for chains, branches and loops.

What you’ll learn
  • Build instruction frameworks with Bedrock Prompt Management templates and variables, and enforce responsible-AI rules with Bedrock Guardrails at request, account or organization level.
  • Specify response formats with Converse structured outputs, and know which rules need a post-processing check instead.
  • Design interactive assistants with Step Functions wait-for-callback clarification, Comprehend custom classification for intent and DynamoDB conversation history.
  • Govern prompts with immutable versions, IAM approval gates, versioned S3 template repositories, CloudTrail data events and model invocation logging.
  • Build prompt quality assurance with Lambda output validation, Step Functions edge-case suites and CloudWatch regression detection.
  • Refine prompts with structured input, tagged chain-of-thought and feedback loops, and build multi-step systems with Bedrock Flows.

What do prompt engineering and prompt governance cover in AIP-C01?

Prompt engineering and governance is the discipline of controlling what a foundation model (FM) is told, how it must answer, which rules are enforced regardless of the prompt, and who may change, release and use each prompt. Task 1.6 treats prompts as production assets: they live in a managed store, are versioned and approved like code, are tested before release, are watched for regressions after release, and are audited. Six skills make up the task, and each has a typical set of AWS tools.

SkillWhat it asks you to buildTypical AWS tools
Instruction frameworksConsistent roles, enforced responsible-AI rules, predictable response formatsBedrock Prompt Management, Bedrock Guardrails, Converse structured outputs
Interactive systemsClarifying questions, intent routing, conversation memoryStep Functions, Amazon Comprehend, DynamoDB
GovernanceParameterized templates, approval gates, template history, usage and access recordsPrompt Management versions, IAM, S3, CloudTrail, CloudWatch Logs
Quality assuranceOutput checks, edge-case suites, regression detectionLambda, Step Functions, CloudWatch
Iterative refinementBetter prompts through structure, reasoning and feedbackPrompt Management variants, prompt optimization, invocation logs
Complex prompt systemsChains, branches, loops and pre/post-processingAmazon Bedrock Flows (formerly Prompt Flows)

Neighbouring tasks own related material: choosing and configuring the model is Task 1.2, building Converse requests in general is Task 1.3, prompt-injection and content/PII filtering are Domain 3, and model evaluation jobs and LLM-as-a-judge evaluation are Task 5.1. This lesson uses those features only where they serve prompt control and governance.

How does Bedrock Prompt Management create a reusable instruction framework?

Amazon Bedrock Prompt Management stores a prompt as a managed resource, so the role, tone, refusal wording and output instructions are defined once and every application calls the same definition by ARN. Hard-coding a system prompt in each service is how products drift apart. As a general rule, a plain configuration store holds text but not variables, model settings, console testing or versions, and an agent is orchestration you add only when the task needs tools or planning, not to share instructions.

What a managed prompt holds

  • Template and variables. The text contains placeholders such as {{product_name}} or {{region_policy}}, filled at runtime. Anything that differs per call, tenant or product belongs in a variable, not in a separate copy of the prompt.
  • Template type. A text template is a single prompt. A chat template has a system prompt plus messages (and optional tool configuration), which suits multi-turn assistants: the role lives in the managed system prompt, and the conversation's earlier user and assistant turns are appended at runtime as real messages.
  • Model and inference configuration. The model ID and settings such as temperature and maximum tokens are part of the prompt.
  • Variants. Authors compare alternative wordings or models side by side in the console test window before choosing one.

Calling a managed prompt at runtime

Pass a prompt version ARN as the modelId (the Converse reference asks for the version ARN; production should always pin one) of a Converse (or InvokeModel) request and supply promptVariables to fill the placeholders. You may append messages, such as earlier conversation turns. You may not send system, inferenceConfig, toolConfig or additionalModelRequestFields: those must be defined in the prompt itself, and including them returns a ValidationException. The fix for a new setting or per-tenant rule is therefore to change the prompt (for example, set the temperature or add a variable such as a region policy), publish a new version and fill the variable per call. The caller needs permission for bedrock:RenderPrompt as well as the model invocation permission.

NeedWhere it goes
Text that changes per call (product, tenant rule, document)A {{variable}} filled through promptVariables
Role and standing instructionsThe prompt's template (system prompt of a chat template)
Temperature, max tokens, toolsThe prompt's inference and tool configuration
Earlier conversation turnsConverse messages appended to a chat-template prompt

Why do responsible-AI rules need Bedrock Guardrails rather than instructions?

A system prompt is guidance the model can be talked out of; a Bedrock guardrail is a policy evaluated by a separate service on the user input and on the model output, whatever the prompt or the conversation says. Role-play and rephrasing routinely defeat "never do X" instructions, so a rule that must hold no matter the wording belongs in a guardrail (for example a denied topic), and the instructions only shape style and behaviour within it.

Prompt instructionsBedrock Guardrails
What it doesTells the model how to behaveEvaluates input and output against configured policies and blocks or masks
Survives clever wordingNoYes: evaluated independently of the model
Custom codeNoneNone: configured policies (denied topics, word filters, content filters and more)
Best forRole, tone, format, reasoning stepsRules that must be enforced

As a rule, any custom filter you build yourself covers only the side it is placed on (input or output) and is code you maintain, whereas a guardrail screens both with configuration alone. Guardrails do not replace deterministic business checks either; a word filter or grounding check cannot count bullet points or add up line items (see the quality assurance section).

Ways to apply a guardrail

  • Per request: pass guardrailConfig (guardrail ID and version) on Converse or InvokeModel.
  • Inside a flow: add a guardrailConfiguration to a prompt node, which screens that node's input and response.
  • Without a Bedrock model: the ApplyGuardrail API is decoupled from foundation models. For a model on a SageMaker AI endpoint or elsewhere, call it with source INPUT on the user's text before invoking the model and with source OUTPUT on the response; when the action is GUARDRAIL_INTERVENED the result carries the guardrail's configured blocked message. The heavier path, moving the model into Bedrock with Custom Model Import so that guardrailConfig can be passed on each request, means re-packaging and re-hosting the model only to gain a filter that ApplyGuardrail already provides beside the existing endpoint.
  • Account-level enforcement: an enforced guardrail configuration (PutEnforcedGuardrailConfiguration, set per account and Region) applies a guardrail to invocations in that account even when requests omit it, but it stays in that account administrator's hands.
  • Organization-level enforcement: an AWS Organizations Bedrock policy attached to the root, OUs or accounts references a versioned guardrail in the management account that is shared through a resource-based policy granting bedrock:ApplyGuardrail. It applies to every invocation in scope, needs no application change and cannot be removed by member-account administrators. Organization, account and request guardrails combine, so teams can add stricter guardrails of their own.
Control typeEffect on a request without the guardrail
Organizations Bedrock policy or account enforcementGuardrail applied automatically; request succeeds
Deny-style policy on a guardrail condition key (IAM or SCP)Request rejected; applications must change to pass the guardrail
Detective rule or reportNothing happens at request time; non-compliance is reported later

How do you make an FM return a reliable response format?

Reliable formats come from three layers: instructions and templates that describe the format, structured outputs that constrain the model to a JSON Schema, and a validation step for rules a schema cannot express. Instructions and examples raise consistency but guarantee nothing, and sampling or stopping settings change how text is generated, not whether it matches a schema.

Converse structured outputs

On supported models, Converse accepts a JSON Schema in outputConfig.textFormat with type json_schema. Bedrock compiles the schema into a grammar and constrains decoding, so the response parses and contains the required fields with no parse-and-retry loop. Strict tool use (a tool definition with strict mode) uses the same mechanism and the same schema subset. Know the rules:

  • Every object must set additionalProperties to false.
  • The supported subset excludes numeric and length constraints such as minimum, maximum, multipleOf, minLength and maxLength. A schema that uses them fails with a 400 ValidationException on every request. Remove them (you can describe the limit in the property's description) and enforce the limit after the response.
  • Constrained decoding does not lift the token limit. If stopReason is max_tokens, the JSON was cut off mid-way. Give long inputs a higher maxTokens and check the stop reason before parsing so truncated responses are retried rather than breaking the parser.

Shape versus meaning

ProblemControl
Not valid JSON, missing or extra fields, wrong typesStructured outputs (schema)
Value ranges and string lengthsPost-processing check (unsupported schema keywords)
Cross-field rules, such as line items summing to a totalPost-processing check, typically a Lambda function
Prose layout (a required heading, a word budget, a mandatory disclaimer line)Template instructions plus a deterministic check

How do Step Functions clarification workflows pause for user input?

A clarification workflow pauses when the model finds information missing, asks the user, and resumes with the answer; in Step Functions this is a Standard workflow Task state that uses the wait-for-callback pattern (.waitForTaskToken). The task passes a token to the step that sends the question (for example a Lambda function or an SNS/SQS message to the app), and the execution stops without consuming compute. When the user replies, the reply handler calls SendTaskSuccess with the saved token and the reply, and the execution resumes with its earlier state intact. A Standard execution can wait days.

Standard workflowExpress workflow
Maximum durationUp to one yearFive minutes
.waitForTaskToken / .syncSupportedNot supported: the definition is rejected
FitsHuman replies, approvals, long-running stepsHigh-volume, short, request-response steps

So an Express workflow that must wait for a person has to become a Standard workflow. The general rule for waiting: anything that checks repeatedly is polling, and anything that holds compute open while waiting is billed for idle time and bounded by that compute's own limit (15 minutes for Lambda). The callback pattern does neither.

Looping until the answer is complete

Model the loop on the business result, not on errors. Keep a round counter in the state data; after each reply re-run the extraction, then a Choice state checks whether fields are still missing and how many rounds have passed, looping back to ask again or routing to a human handoff.

Step Functions featureWhat it is for
Choice state + counterLooping on a business result with new input each round
RetryRe-running a state after an error, with the same input
MapRunning the same steps over each item of an array
TimeoutSeconds / HeartbeatSeconds + CatchHandling a callback that never arrives (the user never replies)

How do intent recognition and conversation history improve interactions?

Interactive assistants route each message by intent and carry context between turns: Amazon Comprehend custom classification recognises the intent that selects a prompt, and DynamoDB stores the conversation so each model call gets the history it needs.

Intent recognition with Amazon Comprehend

Comprehend custom classification trains a classifier from your labelled examples with no model-training code, and a real-time endpoint classifies each message synchronously (endpoint throughput is set in inference units). Generic pretrained features such as key phrases or entities do not know your business intents, and a custom entity recognizer extracts spans of text rather than labelling a whole message.

ModeAssumesUse when
Multi-classExactly one class per documentEach message has one intent
Multi-labelA document can belong to several classesMessages can carry several intents; act on every label above a threshold

Every classification result includes confidence scores, which an application can compare with a threshold of its choosing: act on confident results and send low-confidence messages down a clarifying-question path. In general, behaviour you control in application code changes at once, while anything that changes the classifier itself (its mode, its classes, its training data) means training a new model version; capacity settings change throughput only.

Conversation history in DynamoDB

  • Key design: session ID as the partition key and turn timestamp (or sequence) as the sort key, so a Query with descending order and a limit reads the latest turns directly. A timestamp partition key forces Scans, and appending every turn to one list attribute eventually hits the 400 KB item limit.
  • Expiry: write an expiry timestamp on each item as it is stored and enable TTL on that attribute; DynamoDB deletes expired items in the background without consuming write capacity, so no cleanup job is needed.
  • Bounding the context: sending the whole transcript makes input tokens grow every turn and eventually exceeds the context window. Send the last few turns verbatim plus a rolling summary of older turns that the model refreshes periodically and DynamoDB stores with the session.
Context strategyStrengthCost
Full transcriptNothing lostTokens grow every turn until the window is exceeded
Recent turns onlyCheap and simpleEarly facts drop out
Recent turns + rolling summaryBounded tokens, early facts kept in summaryA periodic summarization call
Semantic retrieval of past turnsRecalls relevant old turnsEmbeddings and a vector store to run
Larger context windowNo design changePostpones the limit; cost still rises per turn

How do you govern prompts: versions, approvals, repositories and audit trails?

Prompt governance means production runs exactly the prompt that was approved, only authorised people can release a prompt, every change has history, and both prompt usage and model traffic are recorded. Four mechanisms combine.

Versions as the release unit

A Prompt Management version is an immutable snapshot of the prompt's working draft. Production passes a version ARN as the modelId, so daily draft edits never reach it, and rollback is switching to an earlier version's ARN. Prompt variants are alternatives inside one prompt for comparison, not releases.

Approval gates with IAM

Creating a version is its own IAM action, bedrock:CreatePromptVersion. Allow authors to create, update and test prompts (UpdatePrompt, RenderPrompt) but deny them CreatePromptVersion; grant it to a reviewer role (or a pipeline the reviewer approves) and point production at the version it creates. The principle: gate the action that creates the release, not the actions authors need every day.

Template repositories in Amazon S3

When templates live as files in S3 before import, enable S3 Versioning so every overwritten template stays as a noncurrent version that can be restored, and use S3 event notifications for object-created events (to Lambda, SQS, SNS or EventBridge) to start validation on each upload.

S3 featurePurpose
VersioningKeeps every earlier object version restorable
Event notificationsReacts to each upload as it happens
Object LockWrite-once retention: prevents deletion or overwrite for a period
Lifecycle expiration of noncurrent versionsDeletes old versions to save cost (removes history)
S3 InventoryScheduled listing report, not an event trigger

Tracking usage and access

RecordShowsDefault
CloudTrail management eventsPrompt create/update/version/delete calls, and Converse/InvokeModel calls, with principal and timeRecorded by trails
CloudTrail data eventsRenderPrompt (resource type AWS::Bedrock::Prompt), InvokeFlow (AWS::Bedrock::FlowAlias), InvokeAgent (AWS::Bedrock::AgentAlias), knowledge base retrieval and ApplyGuardrail, with principal and resourceOff: add an advanced event selector for the resource type
Model invocation loggingFull request and response bodies, the caller's identity ARN and any requestMetadata, delivered to CloudWatch Logs and/or S3 (large bodies go to S3)Off: enable it in Bedrock settings

CloudTrail never stores prompt or response text, so "who used which prompt or flow" without content is a data-event question, while "searchable full text for a year" is invocation logging with a log-group retention setting and Logs Insights. CloudTrail Insights only flags unusual call volumes.

How do you build quality assurance for prompts?

Prompt quality assurance checks every output before it is used, tests each prompt version against edge cases before release, and watches production for regressions after release, using Lambda, Step Functions and CloudWatch respectively.

Verifying each output with Lambda

Put a Lambda function after the model step to test deterministic rules. Typical rules: a required number of list items, a length budget, a mandatory field value, line amounts that add up to a stated total. Have it return a verdict naming the broken rule rather than throwing an error. A Choice state with an attempt counter can then call the model again with the failed rule added to the prompt, and send repeat failures to a human review queue (for example SQS). Every attempt stays visible in the execution history. Keeping the loop in the state machine rather than inside one function is what makes each attempt auditable and bounded.

Edge-case suites with Step Functions

  • Distributed Map reads a large dataset directly from S3 (for example a JSON Lines file), runs a child workflow per item at a chosen MaxConcurrency, writes results with ResultWriter and can stop the run at a tolerated failure percentage. The workflow then computes the pass rate and blocks approval below the gate.
  • Inline Map takes its items from the state input, so it is bound by the 256 KiB payload limit and runs at most 40 iterations concurrently.
  • The optimized integration arn:aws:states:::bedrock:invokeModel calls a model straight from a Task state, with input or output optionally in S3, so the suite needs no Lambda or container code for model calls.
  • Throttling (ThrottlingException) means the suite is faster than your quota: lower MaxConcurrency and add a Retry with exponential backoff and jitter. Raising the tolerated failure percentage hides untested items.
  • Bedrock batch inference is the cheaper way to run very large offline prompt sets, but jobs are asynchronous and queued with no guaranteed completion time, so it does not suit a time-boxed release gate that must return a pass rate before approval.

Regression detection with CloudWatch

Built-in Bedrock metrics (invocations, latency, token counts, throttles) are per model ID and say nothing about answer quality. Publish your own quality signal as a custom metric with dimensions identifying the prompt and its variant (for example PromptId and Variant) from the code that already grades responses, and alarm on it with anomaly detection, which learns the metric's normal band and alerts on a clear drop. When live traffic is too low to measure, a CloudWatch Synthetics canary sends golden inputs on a schedule, asserts on the answers, stores run history and publishes SuccessPercent to alarm on, with no scheduling or reporting code to write.

How do you refine prompts beyond basic prompting?

Iterative refinement improves response quality by structuring the input, specifying the output, asking for explicit reasoning, and closing the loop with measured feedback rather than guesswork.

Structured input components

Wrap each component (document, instructions, question, examples) in its own XML-style tag and refer to those tags in the instructions, so the model cannot confuse a contract clause with the question. For long documents, place the document first and the question and instructions after it. Retrieval is no substitute when the whole document must be considered. In Converse, document content blocks belong to user messages, not the system field.

Chain-of-thought with a parseable answer

Multi-step problems improve when the model reasons before answering. Ask for the reasoning inside one tag (for example <thinking>) and the result inside another (for example <output>). The application extracts only the answer tag, so downstream parsers get a stable location and users never see the reasoning. The general rule: reasoning has to be produced to help, so hiding it is a parsing job for the application, not something to forbid in the prompt; examples teach whatever they show, and inference parameters change randomness, not method.

Feedback loops

  • Tag every request with its prompt version and a per-answer ID in the Converse requestMetadata field; the tags appear in the model invocation log record next to the full text.
  • Store each user rating with the same answer ID and prompt version, so you can compute low-rating rates per version and pull the low-rated prompts and responses from the logs.
  • Turn low-rated cases into a test set, compare candidate variants against the current version on it, and release the winner as a new version. Never auto-rewrite production prompts or ship a rewrite untested.
ToolWhat it doesUses your evaluation data
Prompt optimization (Optimize in Prompt Management)Rewrites one prompt for a chosen model using built-in heuristicsNo
Advanced Prompt OptimizationIteratively rewrites and scores prompts using your sample inputs, optional ground-truth answers and a required evaluation method (LLM-as-a-judge rubric, Lambda function or steering criteria), and compares results across several modelsYes
Model evaluation jobScores responses; does not rewrite the promptYes
Prompt variantsManual side-by-side comparison in the consoleManual

Fine-tuning changes the model, not the prompt, so it is outside prompt refinement.

How do Amazon Bedrock Flows build complex prompt systems?

Amazon Bedrock Flows (formerly Prompt Flows) link prompts, logic and AWS services into a visual workflow, giving you sequential prompt chains, conditional branches on model output, loops, reusable prompt components and built-in pre- and post-processing.

NodeBehaviour to know
PromptInline prompt, or a reference to a Prompt Management prompt by ARN (one reusable, versioned definition for many flows); can carry a guardrailConfiguration
ConditionEvaluates its conditions in order; the first one that is true wins, and a default condition catches the rest. Supports == (data types must match), !=, >, >=, <, <= and and/or/not. Put specific conditions before general ones
Iterator and collectorThe iterator sends each array item (with the array size) through the following nodes; the collector gathers the results back into one array. Without a collector, each item produces a separate output
DoWhile loopRepeats its nodes while a condition holds, capped by maxIterations, which defaults to 10 even when you never set it
Lambda functionRuns your function (which can be attached to a VPC) and returns its response: the choice for calls to private APIs or any substantial pre/post-processing
Inline code (preview)Short Python 3.12 in an isolated environment with no network access; not supported in asynchronous flow executions
OthersKnowledge base, agent, S3 storage and retrieval, Lex (classifies a single utterance; it is not multi-turn), input and output

Versions and aliases

You edit a flow's working draft and test it through the built-in test alias (TSTALIASID), which always tracks the draft. A version is an immutable snapshot; an alias points at a version, and applications invoke the flow through an alias. Releasing means repointing the alias, and rollback means repointing it to the previous version, with no code change and without exposing unfinished draft edits. Invocations of a flow alias are CloudTrail data events on AWS::Bedrock::FlowAlias.

Tip. Task 1.6 questions are production scenarios in which a team's prompts, assistants or flows must meet several stated requirements at once, such as one central definition plus console testing, enforcement that member accounts cannot remove plus no code changes, or a usage report that must not capture text. Every option is a real AWS feature, and each wrong one fails a single stated requirement, so read every constraint in the stem before comparing options. Expect symptom-led items (a ValidationException after a request change, routing that follows an unexpected branch, a loop that always stops at the same count, JSON that fails to parse) where the symptom points to the fact being tested, and Select TWO items where each correct option covers a different requirement.

Key takeaways
  • Define roles and instructions once as a Prompt Management prompt; per-call differences go in {{variables}}, not copies.
  • With a prompt version ARN as the Converse modelId, system, inferenceConfig, toolConfig and additionalModelRequestFields must live in the prompt; messages can be appended.
  • Instructions guide; guardrails enforce. Use an Organizations Bedrock policy with a versioned guardrail when member accounts must not remove it, and ApplyGuardrail for models outside Bedrock.
  • Structured outputs guarantee JSON shape; ranges, lengths and cross-field rules still need a Lambda check, and max_tokens can still truncate.
  • Clarification that waits for a person needs a Standard workflow with .waitForTaskToken; Express workflows reject it and stop at five minutes.
  • Comprehend multi-label for several intents per message, multi-class for one; a confidence threshold with a clarifying fallback needs no retraining.
  • DynamoDB history: session partition key, timestamp sort key, TTL on each item, and a rolling summary to bound tokens.
  • Prompt versions are the release unit; deny authors bedrock:CreatePromptVersion to make versioning the approval gate.
  • CloudTrail data events record who rendered a prompt or ran a flow without content; only model invocation logging holds prompt and response text.
  • In Bedrock Flows the first true condition wins, DoWhile defaults to 10 iterations, and rollback is repointing an alias to an earlier version.

Frequently asked questions

What is Amazon Bedrock Prompt Management used for?

Amazon Bedrock Prompt Management stores prompts as managed resources with templates, variables, model and inference settings, variants for comparison and immutable versions. Applications call a prompt by passing a prompt version ARN as the modelId of a Converse or InvokeModel request and fill its variables with promptVariables, so every service uses the same approved instructions instead of its own hard-coded copy.

Why can't a system prompt enforce responsible-AI rules on its own?

A system prompt is an instruction to the model, and users can rephrase or role-play their way around instructions. Amazon Bedrock Guardrails evaluate the user input and the model output in a separate service against configured policies such as denied topics, so the rule holds regardless of how the conversation is worded. Use instructions for role, tone and format, and guardrails for rules that must be enforced.

Why does a Converse request fail when it uses a Prompt Management prompt as the modelId?

When the modelId is a Prompt Management prompt or prompt version ARN, the Converse request must not include system, inferenceConfig, toolConfig or additionalModelRequestFields, because those are defined in the prompt; including them returns a ValidationException. Put the settings or extra rules into the prompt (using variables for per-call text), publish a new version, and send only promptVariables and any appended messages.

Does Converse structured output guarantee that every response is usable?

Structured outputs guarantee that the response matches the JSON Schema's shape: valid JSON with the required fields and types, when every object sets additionalProperties to false. They do not support numeric or length keywords such as minimum, maximum or maxLength (a schema with them is rejected), cannot express cross-field rules, and cannot prevent truncation when the response stops at max_tokens. A post-processing check and a stop-reason check cover those gaps.

How do you pause a GenAI workflow until a user answers a clarifying question?

Use an AWS Step Functions Standard workflow with a Task state that uses the .waitForTaskToken callback pattern. The task hands a token to the step that sends the question, the execution pauses without consuming compute, and the reply handler calls SendTaskSuccess with the token and the answer to resume it. Express workflows do not support this pattern and cannot run longer than five minutes.

How do you build an approval workflow for prompt changes on AWS?

Treat Prompt Management versions as releases. Let authors edit and test the working draft, deny them the bedrock:CreatePromptVersion action, and grant it to a reviewer role that creates a version only after approval. Production calls that version's ARN, so it runs exactly the reviewed text, and rolling back means switching to an earlier version ARN.

How do you audit who uses a Bedrock prompt or flow without logging content?

Add CloudTrail data events, which are off by default, for the AWS::Bedrock::Prompt resource type to record RenderPrompt calls and for AWS::Bedrock::FlowAlias to record InvokeFlow calls. Each event records the principal and resource but no prompt or response text. Model invocation logging is the opposite: it captures full request and response bodies, so use it only where text must be retained.

What is the difference between prompt optimization and Advanced Prompt Optimization in Amazon Bedrock?

Prompt optimization in Prompt Management rewrites a single prompt for a chosen model using built-in heuristics and does not use your evaluation data. Advanced Prompt Optimization takes your sample inputs, optional ground-truth answers and a required evaluation method such as an LLM-as-a-judge rubric, a Lambda function or steering criteria, iterates through rewriting and scoring, and reports original versus optimized results across several models.

Source

This lesson covers the "Foundation Model Integration, Data Management, and Compliance" domain of the official AIP-C01 exam guide. Vendors revise their guides — check the source for the current version.

Sign up free to mark lessons complete, bookmark topics and track your exam readiness.

Spotted a mistake in this lesson?