← Course Home
Module 7 · Capstone

Defense-in-Depth Walkthrough

A production financial-services agent with all seven security layers applied — from a user's question to a fully-audited answer.

⏱ ~15 min · All 7 surfaces

The Scenario

Deploy a production-ready financial-services agent that handles customer portfolio queries. It touches market data, customer PII, and per-customer memory — so every one of the seven surfaces is in play at once.

The task: a customer asks "What's my portfolio performance this quarter?" The agent must answer accurately, touch only that customer's data, never execute a trade, leak no PII, and leave a complete audit trail.

Why a capstone Each earlier module secured one surface in isolation. Real deployments need them composed — the strength is in the layering. If one control fails, the next still holds.

The Security Stack Applied

Seven layers, one agent. Each maps back to the module that built it.

1 · Identity M2

OAuth Token Vault for the market-data API; sessions scoped by actorId.

2 · Network M3

VPC mode, private subnet, no public egress.

3 · Policy M4

Cedar permits portfolio reads; forbids trade execution without approval.

4 · Memory M5

CMK-encrypted, one namespace per customer, 24-hour TTL.

5 · Gateway M4

Lambda interceptor logs every tool call; Guardrails block PII in responses.

6 · Observability M6

Full OTEL traces, CloudTrail audit, Security Hub monitoring.

7 · SCP M3

Org-wide: deny public runtimes, deny unencrypted memory.

End-to-End Demonstration Flow

Follow one request through all seven layers. Every step is a control you built in an earlier module.

01
Query arrives

"What's my portfolio performance this quarter?"

02
Identity

Token Vault retrieves the OAuth token for the market-data MCP server.

03
Policy

Cedar permits this agent + this user + portfolio-read action.

04
Gateway

Lambda interceptor logs the request; Guardrails check passes.

05
Runtime

MicroVM executes in the VPC and calls the market-data tool.

06
Memory

Session summary written to the user-scoped, CMK-encrypted namespace.

07
Observability

Full trace in CloudWatch; CloudTrail captures every event.

08
Response

Delivered — no PII, no unauthorized data, full audit trail.

Defense-in-depth in one sentence: a prompt-injected agent still can't call an unauthorized tool (policy), reach an unapproved endpoint (network), read another customer's memory (namespace), or leak PII (Guardrails) — and every attempt is on the record (observability).

Course wrap You've now walked all seven Amazon Bedrock AgentCore security surfaces and seen them compose into a production deployment. That's the whole point: no single control is sufficient, but together they make an unpredictable agent safe to ship.

Sources