Skip to content

SAP-C03 · Domain 2: Security, Compliance, and Governance · 25% of the exam

Task 2.5: Design security and responsible AI controls.

Guarding AI applications: content filtering and compliance controls with Amazon Bedrock Guardrails, access control for generative and agentic applications with AgentCore Identity, and human approval steps for AI actions built with Step Functions.

Study it

  • Guardrails for generative AI: content filters, denied topics and sensitive information

    Partly covered by: Guardrails, Finding and Masking PII

  • Access control for agents and human approval of AI actions

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the AWS documentation page that proves it.

Question 1 · choose 1

A company enforces one guardrail on every Amazon Bedrock model invocation in its organization through an Amazon Bedrock policy in AWS Organizations. A lending team wants Automated Reasoning checks to validate its assistant's answers against the company's lending rules, and the governance team proposes adding an Automated Reasoning policy to the organization-wide guardrail. What should a solutions architect recommend?

  1. AKeep Automated Reasoning out of the enforced guardrail, and add it to a guardrail that the lending application passes in its requests
  2. BAdd the Automated Reasoning policy to the organization guardrail and publish a new numbered version of it for the policy to reference
  3. CReplace the organization guardrail with account-level enforcement in the lending account that includes Automated Reasoning
  4. DUse contextual grounding checks in the organization guardrail instead, because they validate answers against logical rules
Show the answer and why
  • AKeep Automated Reasoning out of the enforced guardrail, and add it to a guardrail that the lending application passes in its requests

    Correct

    Automated Reasoning policies are not supported in enforced guardrails and cause runtime failures there. An application-level guardrail can use them, and it is applied together with the enforced one.

  • BAdd the Automated Reasoning policy to the organization guardrail and publish a new numbered version of it for the policy to reference

    Incorrect

    A new version does not change the rule: enforced guardrails must not include an Automated Reasoning policy, which would cause runtime failures for every account.

  • CReplace the organization guardrail with account-level enforcement in the lending account that includes Automated Reasoning

    Incorrect

    Account-level enforcement has the same restriction, and dropping the organization policy would remove the company-wide safeguards.

  • DUse contextual grounding checks in the organization guardrail instead, because they validate answers against logical rules

    Incorrect

    Contextual grounding checks compare responses with source material for grounding and relevance. Validating answers against a set of logical rules is what Automated Reasoning checks do.

Guardrail enforcement through Organizations or at the account level supports content filters, denied topics, word filters, sensitive information filters and contextual grounding checks. Automated Reasoning belongs in a guardrail that the application applies itself.

Question 2 · choose 1

A company enforces a guardrail on all Amazon Bedrock model invocations in two OUs through an Amazon Bedrock policy in AWS Organizations. A review finds that some teams wrap only small parts of their prompts in guard content tags, so most user-supplied text is never evaluated by the enforced guardrail. The governance team wants the enforced guardrail to evaluate all system and message content, whatever callers tag. What should it change?

  1. AAdd a denied topic to the guardrail that blocks requests containing guard content tags
  2. BSet the selective content guarding controls for system and messages in the Bedrock policy to comprehensive
  3. CRemove the guardrail permissions from the teams' roles so that they cannot use guard content tags
  4. DMove the Bedrock policy from the two OUs to the organization root so that it takes precedence over the teams' content tagging
Show the answer and why
  • AAdd a denied topic to the guardrail that blocks requests containing guard content tags

    Incorrect

    A denied topic filters subject matter in the text. It cannot detect or override how callers use guard content tags.

  • BSet the selective content guarding controls for system and messages in the Bedrock policy to comprehensive

    Correct

    With comprehensive guarding, the enforced guardrail evaluates all content regardless of guard content tags, so callers cannot narrow what it checks.

  • CRemove the guardrail permissions from the teams' roles so that they cannot use guard content tags

    Incorrect

    Taking permissions away does not change which parts of a prompt the enforced guardrail evaluates; it only makes the teams' calls fail.

  • DMove the Bedrock policy from the two OUs to the organization root so that it takes precedence over the teams' content tagging

    Incorrect

    Where the policy is attached decides which accounts inherit it, not how tagged content is evaluated.

Selective content guarding lets administrators decide whether to honor callers' guard content tags. Comprehensive evaluates everything and is the safer choice when callers cannot be trusted to tag correctly.

Question 3 · choose 1

A company enforces a guardrail with content filters and sensitive information filters on all Amazon Bedrock model invocations across its organization. Data teams run knowledge base ingestion jobs that call two embedding models millions of times a day, and these calls now also go through the guardrail, adding guardrail charges for text that is only being embedded, not shown to anyone. The company wants enforcement to stay in place for every generative model. What should it change?

  1. ADetach the Bedrock policy from the data teams' accounts and rely on application guardrails there
  2. BAsk the data teams to wrap the documents in guard content tags so that the guardrail skips them
  3. CAdd the two embedding model identifiers to the excluded models list of the policy's model enforcement setting
  4. DLower the content filter strengths in the enforced guardrail to reduce the number of text units charged per request
Show the answer and why
  • ADetach the Bedrock policy from the data teams' accounts and rely on application guardrails there

    Incorrect

    This removes enforcement from the generative models in those accounts too, which the company wants to keep.

  • BAsk the data teams to wrap the documents in guard content tags so that the guardrail skips them

    Incorrect

    Guard content tags mark parts of a prompt in a request. They are not the documented way to exempt a whole model from enforcement.

  • CAdd the two embedding model identifiers to the excluded models list of the policy's model enforcement setting

    Correct

    Model enforcement controls accept included and excluded model lists, so specific models such as embedding models can be carved out while all other models stay covered.

  • DLower the content filter strengths in the enforced guardrail to reduce the number of text units charged per request

    Incorrect

    Charges are based on the text units processed per configured safeguard; weaker filters still process the embedding text.

Guardrail enforcement can be scoped by model: list ALL or specific models as included, and carve out exceptions, such as embedding models, in the excluded list.

Question 4 · choose 1

An agent on Amazon Bedrock AgentCore Runtime is invoked today by backend services that sign their calls with SigV4 under IAM roles, and those services must not change. A new mobile app must invoke the same agent code directly with bearer tokens that its Amazon Cognito user pool issues, so that the agent knows which user is calling. Which approach meets these requirements?

  1. AAdd a JWT authorizer for the Cognito user pool to the existing runtime next to its IAM authorization
  2. BGive each mobile user an IAM user with access keys so that the app can sign its calls with SigV4
  3. CSwitch the existing runtime to JWT authorization and have the backend services request user tokens from the Cognito user pool
  4. DDeploy the same code as another runtime version with a JWT authorizer for the user pool, keeping SigV4 on the existing one
Show the answer and why
  • AAdd a JWT authorizer for the Cognito user pool to the existing runtime next to its IAM authorization

    Incorrect

    A runtime supports either IAM SigV4 or JWT bearer token inbound authorization, not both at the same time.

  • BGive each mobile user an IAM user with access keys so that the app can sign its calls with SigV4

    Incorrect

    Long-term access keys on phones are insecure, and per-user IAM users do not scale to a consumer app.

  • CSwitch the existing runtime to JWT authorization and have the backend services request user tokens from the Cognito user pool

    Incorrect

    This changes how the backend services authenticate, which the company does not allow.

  • DDeploy the same code as another runtime version with a JWT authorizer for the user pool, keeping SigV4 on the existing one

    Correct

    Different runtime versions can use different inbound authorization types, so the mobile app gets JWT authorization while the backend keeps SigV4 unchanged.

AgentCore Runtime inbound auth is either IAM SigV4 or JWT bearer tokens per runtime configuration. To serve both kinds of callers, configure different runtime versions for the two authorization types.

Question 5 · choose 1

A central AI governance account owns an Amazon Bedrock guardrail that application teams must reference in their own model calls. Only the application roles in accounts of the Retail and Lending OUs may apply it; accounts in other OUs of the organization, and any account outside the organization, must not. The governance team does not want to update a policy each time an account joins one of the two OUs. How should access to the guardrail be granted?

  1. AAttach a guardrail policy that allows bedrock:ApplyGuardrail for principal * when the calling role's aws:PrincipalTag/team value is retail or lending
  2. BUse a guardrail policy allowing bedrock:ApplyGuardrail for principal * with aws:PrincipalOrgID and the OUs' aws:PrincipalOrgPaths, plus role permissions
  3. CAttach a guardrail policy that allows bedrock:ApplyGuardrail for principal * on the condition that aws:PrincipalOrgID equals the organization's own ID
  4. DAttach a guardrail policy that allows bedrock:ApplyGuardrail for principal *, and attach an SCP that denies the action to the other OUs
Show the answer and why
  • AAttach a guardrail policy that allows bedrock:ApplyGuardrail for principal * when the calling role's aws:PrincipalTag/team value is retail or lending

    Incorrect

    Tag-based scoping looks attractive, but guardrail resource-based policies support only conditions on aws:PrincipalOrgID and aws:PrincipalOrgPaths, so this statement is not accepted.

  • BUse a guardrail policy allowing bedrock:ApplyGuardrail for principal * with aws:PrincipalOrgID and the OUs' aws:PrincipalOrgPaths, plus role permissions

    Correct

    Sharing with specific OUs is a supported pattern: principal * limited by the organization ID and the OU paths. Callers in another account also need bedrock:ApplyGuardrail on the guardrail in their own identity policies.

  • CAttach a guardrail policy that allows bedrock:ApplyGuardrail for principal * on the condition that aws:PrincipalOrgID equals the organization's own ID

    Incorrect

    This is a supported pattern, but without an OU condition it also lets accounts in the other OUs apply the guardrail.

  • DAttach a guardrail policy that allows bedrock:ApplyGuardrail for principal *, and attach an SCP that denies the action to the other OUs

    Incorrect

    The SCP would limit the other OUs, but guardrails do not support a * principal without an organization or OU condition, so the policy itself is not accepted.

Guardrail resource-based policies use a restricted policy language: they can share a guardrail within the account, with the organization or with specific OUs, only through aws:PrincipalOrgID and aws:PrincipalOrgPaths, and never outside the organization.

Question 6 · choose 1

An operations agent built on Amazon Bedrock AgentCore proposes remediation actions, such as resizing production databases. Policy says that no production change may happen until an on-call engineer approves it, and that the agent must be technically unable to make the change itself, even if a prompt injection manipulates it. Which design meets these requirements?

  1. AAdd a system prompt instruction that tells the agent to ask for the engineer's approval in chat before it calls the resize tool
  2. BAttach a guardrail with a denied topic for database changes to the agent's model invocations
  3. CLet the agent's role resize databases, and send each change to the on-call engineer through an EventBridge rule so it can be reverted
  4. DAllow the agent's role only to start an approval workflow, whose own role makes the change after the engineer approves it
Show the answer and why
  • AAdd a system prompt instruction that tells the agent to ask for the engineer's approval in chat before it calls the resize tool

    Incorrect

    A prompt instruction is guidance to the model, not a control. A manipulated agent could still call the tool, because nothing technical prevents it.

  • BAttach a guardrail with a denied topic for database changes to the agent's model invocations

    Incorrect

    A denied topic filters text in prompts and responses. It does not gate the execution of a tool call or require a human decision.

  • CLet the agent's role resize databases, and send each change to the on-call engineer through an EventBridge rule so it can be reverted

    Incorrect

    Notification after the fact is a detective control: the change has already happened before anyone approves it.

  • DAllow the agent's role only to start an approval workflow, whose own role makes the change after the engineer approves it

    Correct

    The agent cannot change the database with its own permissions. The only path is a Step Functions workflow that pauses at an approval step and then performs the change with the state machine's separate role.

Human oversight of AI actions works as a technical boundary: the agent can only request a change, and a workflow with an approval step, running under a separate role, carries it out after a person decides.

Question 7 · choose 3

A platform team fronts its agents on Amazon Bedrock AgentCore Runtime with an AgentCore Gateway, so that policy checks, guardrails and observability apply to every request. The runtimes use the default IAM (SigV4) inbound authorization. Employees sign in with the company's OpenID Connect identity provider, a self-hosted server in a VPC whose discovery URL is not reachable from the internet, and only members of its agent-users group may use the gateway. Nobody may invoke a runtime directly and bypass the gateway, even with a broad identity policy. Which actions meet these requirements? (Choose THREE.)

  1. AAttach a resource-based policy to each runtime that allows InvokeAgentRuntime only for the gateway's execution role and explicitly denies every other principal
  2. BAttach an SCP to the workload OU that denies bedrock-agentcore:InvokeAgentRuntime to all principals
  3. CGive the gateway's inbound JWT authorizer a private endpoint in the identity provider's VPC for its discovery URL
  4. DList the agent-users group in the allowed scopes of the gateway's inbound JWT authorizer
  5. EAdd a required custom claim rule to the gateway's JWT authorizer that the groups claim contains agent-users
  6. FPut each runtime in VPC mode with a security group that accepts connections only from the gateway
Show the answer and why
  • AAttach a resource-based policy to each runtime that allows InvokeAgentRuntime only for the gateway's execution role and explicitly denies every other principal

    Correct

    The gateway signs runtime calls with its execution role. Allowing only that role and denying all others in the runtime's resource policy stops direct invocations even from principals with broad permissions.

  • BAttach an SCP to the workload OU that denies bedrock-agentcore:InvokeAgentRuntime to all principals

    Incorrect

    The SCP would also deny the gateway's execution role in those accounts, so the gateway could no longer invoke the runtimes.

  • CGive the gateway's inbound JWT authorizer a private endpoint in the identity provider's VPC for its discovery URL

    Correct

    The authorizer fetches the provider's discovery document and keys from the discovery URL. For a provider inside a VPC, a privateEndpoint (a managed VPC resource or self-managed Lattice resource) gives AgentCore Identity private access to it.

  • DList the agent-users group in the allowed scopes of the gateway's inbound JWT authorizer

    Incorrect

    Allowed scopes are matched against the token's scope values, which are permissions, not group membership. Group membership is checked as a custom claim.

  • EAdd a required custom claim rule to the gateway's JWT authorizer that the groups claim contains agent-users

    Correct

    Required custom claims let the authorizer match a claim such as groups against a value, with CONTAINS for string arrays, so tokens of users outside the group are rejected.

  • FPut each runtime in VPC mode with a security group that accepts connections only from the gateway

    Incorrect

    VPC mode gives the runtime network interfaces for reaching resources in the VPC. Invocations arrive through the AgentCore API, so a security group does not decide who can invoke the runtime.

A governed entry point needs the runtime locked to the gateway's role with an explicit deny, and a gateway authorizer that can reach the identity provider privately and checks the claims that grant access.

Practice domain 2 →Practice all domains →