Skip to Content
Cloud Engineering Academy
16. Generative AI on AWS for Banking

Module 16: Generative AI on AWS for Banking

An awareness-level module on using generative AI safely in a bank: Amazon Bedrock models, knowledge bases, guardrails and agents, and AI coding assistants. You learn to call Bedrock from C#, and above all where GenAI fits, where it must not be used without controls, and which risks a bank's model-risk team will ask about.

AIF-C01AIP-C01

Assumes: .NET 10 LTS · AWS SDK for .NET v4 (AWSSDK.BedrockRuntime) · Region us-east-1. Verified against official sources on 2026-11-18.

An awareness-level module on using generative AI safely in a bank: Amazon Bedrock models, knowledge bases, guardrails and agents, and AI coding assistants. You learn to call Bedrock from C#, and above all where GenAI fits, where it must not be used without controls, and which risks a bank's model-risk team will ask about.

Estimated timeAbout 8 hours (lessons 5 h · lab 2 h · assignment 1 h)
Priority for youMedium — awareness level
LevelBeginner → intermediate
CertificationsOptional: AIF-C01 · AIP-C01
Cost profile🟢 design and local models · 🟡 a few Bedrock calls (pennies)

Why this matters in banking

Colleagues will soon ask you to "add AI" to internal tools, and vendors will pitch chatbots for customers. A bank must answer hard questions first: does customer data leave our control, can the model be tricked into revealing data (prompt injection), who checks the output before it affects a customer, and how is the model governed under the bank's model-risk policy? This module gives you enough depth to build a safe internal proof of concept and to recognise when a use case needs much more scrutiny.

Analogy: a GenAI model is a very fast, very confident new graduate. Great for drafting and searching, but never allowed to approve a loan or move money without a qualified person checking the work.

From .NET/Azure to AWS

You know (Microsoft/Azure)AWS equivalentWhat's different
Azure OpenAI / Azure AI FoundryAmazon BedrockMany model providers behind one API; in commercial Regions access is enabled on first use, so you control it with IAM and SCPs
Azure AI Search for RAGBedrock Knowledge Bases (managed option, or your own vector store)Managed chunking, embedding and retrieval; AWS now recommends the managed option for most new work
Azure AI Content SafetyAmazon Bedrock GuardrailsDenied topics, PII filters, contextual grounding checks
Azure AI Agent ServiceAmazon Bedrock AgentCoreBedrock Agents Classic is closed to new customers; AgentCore is a hosting and governance layer, not a drop-in clone
GitHub CopilotKiro (successor to Amazon Q Developer IDE plugins)Q Developer in the AWS Console continues
Azure.AI.OpenAI SDKAWSSDK.BedrockRuntime (Converse API)One request shape across models
Microsoft.Extensions.AIMicrosoft.Extensions.AI over Bedrock or a local modelKeep your code provider-agnostic

Learning objectives

By the end of this module you can:

  • Explain foundation models, tokens, context windows, embeddings and retrieval-augmented generation (RAG) in plain language.
  • Call a Bedrock model from C# with the Converse API using IAM-role credentials and no keys in code.
  • Describe how Bedrock Knowledge Bases, Guardrails and AgentCore fit together.
  • Identify banking risks: data privacy, data residency, prompt injection, data leakage, hallucination, bias and model risk.
  • Design human-in-the-loop review for any output that affects customers or money.
  • Classify use cases as good fits (internal knowledge search, developer productivity, document processing) or controlled/forbidden without strong controls.
  • Use AI coding assistants responsibly on bank code.

Prerequisites

How the pieces fit

Lessons

  1. GenAI in plain language — models, tokens, prompts, embeddings, RAG, agents and why outputs can be wrong.
  2. Amazon Bedrock basics — model catalogue and cards, model IDs and inference profiles, how model access works today, pricing options and data routing.
  3. Calling Bedrock from C# — AWSSDK.BedrockRuntime, the Converse API, streaming, retries and IAM least privilege.
  4. Knowledge Bases and RAG — managed and customer-managed knowledge bases, chunking, vector stores, citations and access control on sources.
  5. Bedrock Guardrails — denied topics, PII handling, prompt-attack and grounding checks, cost, and how to regression-test them.
  6. Lab 16.1: a safe policy assistant — the module lab: a tested C# pipeline with redaction, a guardrail and outcome classification, plus an offline mode.
  7. Agents on AWS — Amazon Bedrock AgentCore, tools, memory, and why autonomous actions need tight limits in a bank.
  8. AI coding assistants — Amazon Q Developer's transition to Kiro, and safe use on proprietary bank code.
  9. Data privacy and model risk — where data goes, UK GDPR considerations, model inventories, validation and monitoring.
  10. Prompt injection and data leakage — attack patterns, defence in depth and red-teaming your own prototype with a repeatable harness.
  11. Human-in-the-loop and use-case triage — good fits, controlled fits and uses that must not proceed without strong controls.

Labs and module project

  • Lab 16.1 (🟡) — A safe policy assistant: a .NET 10 pipeline that redacts personal data, fences retrieved policies, calls one Bedrock model through the Converse API with a guardrail attached, and classifies every outcome. The code is in labs/m16-policy-assistant/ (72 tests that run without an AWS account). The optional real Bedrock calls cost pennies.
  • Lab 16.2 (🟢) — The same pipeline over Microsoft.Extensions.AI IChatClient, run with the free offline provider (a keyword-matching fake model), showing provider-agnostic code at zero cost. It is Part B of the same lab page; a real local model can be plugged in behind IChatClient.
  • Lab 16.3 (🟢) — coming. A dedicated prompt-injection red-team exercise is not built yet. Until it is, use the repeatable red-team harness and corpus in Prompt injection and data leakage and the injected POL-003 document in Lab 16.1.

Module assignment — GenAI use-case assessment. Write a one-page assessment for an internal "policy Q&A" assistant: data flows, data classification, guardrails, human review, logging, model-risk questions and a go/no-go recommendation. Use the risk tiers and triage questions from Data privacy and model risk and Human-in-the-loop and use-case triage. No capstone depends on this module; optionally add a guarded internal search feature to Capstone 1.

When you finish, keep the Module 16 cheat sheet handy for revision.

Cost profile

PartLabelFree alternative
Concepts, risk assessment, use-case triage🟢 freeDesign-only
Local model via Microsoft.Extensions.AI🟢 freeRuns on your machine
A few Bedrock Converse calls with a guardrail🟡 creditsRun the offline provider and unit tests. Guardrail cost is driven by how much text it evaluates, so scan only the user's question, not the whole prompt
Bedrock Knowledge Base (managed, or customer-managed with a vector store)🔴 paid while it existsDesign-only, or a local vector store (for example pgvector in Docker) with local embeddings
AgentCore runtime🔴 paidDesign-only exercise

Certification alignment

ExamDomains (weight)What this module covers
AIF-C01AI/GenAI fundamentals, responsible AI, security and governance (weights on exam page)Concepts, risks, Bedrock basics
AIP-C01Professional GenAI development (weights on exam page)Bedrock APIs, RAG, guardrails, agents — this module is only a starting point

Both exams are optional for your goals. See each exam page for the official domains.

Service availability notes

GenAI service changes — verified 2026-11-18

Amazon Q Developer: new sign-ups ended 2026-05-15. The IDE plugins and paid subscriptions reach end of support on 2027-04-30; the successor is Kiro (the Q CLI became the Kiro CLI on 2025-11-17). Amazon Q Developer in the AWS Management Console is not affected.

Amazon Bedrock Agents is now Bedrock Agents Classic and closed to new customers from 2026-07-30. Use Amazon Bedrock AgentCore. Bedrock models, Knowledge Bases and Guardrails are not affected.

Closed to new customers on 2026-07-30: Amazon Kendra, Amazon Q Business (its successor is Amazon Quick), SageMaker AI Clarify, SageMaker AI Model Monitor, SageMaker AI Ground Truth and Amazon Augmented AI (A2I). This module builds on none of them. Exam guides may still list them, so learn the names and build on the replacements.

Closed serviceWhat to use instead
KendraBedrock Knowledge Bases (the managed option)
Q BusinessAmazon Quick
SageMaker AI Clarify (bias and explainability)SHAP and scikit-learn bias metrics with SageMaker AI MLflow; Bedrock Evaluations or fmeval for foundation models; Bedrock Guardrails at runtime
SageMaker AI Model MonitorOpen-source monitoring with Evidently and MLflow, CloudWatch, Quick Sight
Ground Truth and A2I (human review)No named AWS replacement: build a review queue (Step Functions task token with SQS or DynamoDB), as in Human-in-the-loop and use-case triage

Bedrock Knowledge Bases now have a managed option that AWS recommends for most new work. Managed Knowledge Base Regions are limited, so check yours, and note that your SDK version may lag the API (Knowledge Bases and RAG).

Bedrock model access changed. The Model access page is retired in commercial Regions (it remains for GovCloud): access is enabled on first use, so a bank controls which models run with IAM and SCPs (Amazon Bedrock basics).

Claude 5.5 models on Bedrock list no in-Region support in us-east-1: you call them through a us. (or eu. / global.) inference profile, such as us.anthropic.claude-haiku-5-5. Routing depends on the Region you call from, and a global. profile may leave your geography, so read the destination Regions with GetInferenceProfile. ⚠ VERIFY the exact profile ID in the console before each lab.

Guardrails cost is driven by how much text each policy evaluates, and evaluating the whole prompt (including retrieved passages) can cost more than the model call itself (Bedrock Guardrails).

Model availability differs by Region and changes often; check the Bedrock console for us-east-1 before each lab ⚠ VERIFY.

Key AWS services

Amazon Bedrock (Converse API, Knowledge Bases, Guardrails) · Amazon Bedrock AgentCore · Kiro / Amazon Q Developer · Amazon S3 · AWS KMS · AWS IAM · Amazon CloudWatch · AWS CloudTrail · Amazon SageMaker AI (awareness)

Independent learning resource — not affiliated with, endorsed or sponsored by Amazon Web Services. AWS and related marks are trademarks of Amazon.com, Inc. or its affiliates. All banking data in examples is fictional. Sample architectures are for learning and are not automatically compliant with GDPR, PCI DSS or any banking regulation.

On this page