Skip to content

AIP-C01 · Study Guide

← Domain 3: AI Safety, Security, and Governance

3.1.4 · Lesson 4 of 15

Defense-in-Depth Against Prompt Attacks

Guard against jailbreaks, prompt injections, and system prompt exfiltration with layered controls around instructions and inputs.

WHAT

Guard against jailbreaks, prompt injections, and system prompt exfiltration attempts.

HOW

  • Enable Prompt Attack / Jailbreak Filters in Bedrock Guardrails.
  • Separate system instructions from untrusted user inputs using Converse API system roles.
  • Do not concatenate user strings into the system prompt.
System role (trusted instructions)
User role (untrusted input)
        ↓
Converse API + Guardrails Prompt Attack filter

EXAM TRAP

Passing user inputs directly inside the system prompt via string concatenation weakens isolation and invites injection.

Key points

  • Prompt Attack / Jailbreak filters
  • Separate system instructions from user input
  • Converse API system roles
  • Avoid raw string concatenation
  • Defense-in-depth layering

Exam focus

Separate system instructions from untrusted user inputs using structured message roles — never rely on string concatenation alone.

View progress