Module 5: Security for Banking & Finance
The most important module on the platform: identity, encryption, network protection, detection, incident response and secure delivery on AWS, all through a banking lens. You learn exactly where AWS's responsibility ends and the bank's begins, and you build a secure banking API architecture with an incident-response runbook.
Assumes: .NET 10 LTS · AWS SDK for .NET v4 · Region us-east-1. Verified against official sources on 2026-11-18.
The most important module on the platform: identity, encryption, network protection, detection, incident response and secure delivery on AWS, all through a banking lens. You learn exactly where AWS's responsibility ends and the bank's begins, and you build a secure banking API architecture with an incident-response runbook.
| Estimated time | About 36 hours (lessons 24 h · labs 8 h · project 4 h) — split across two roadmap phases |
| Priority for you | ⭐⭐ Most critical — priority 3 (banking-grade security) |
| Level | Beginner → advanced |
| Certifications | SCS-C03 (primary) · SAA-C03 · DVA-C03 · CLF-C02 |
| Cost profile | 🟢 IAM, policies, CloudTrail, SDLC tooling · 🟡 KMS keys, detection-service trials · 🔴 CloudHSM, Private CA, Shield Advanced (design-only) |
Why this matters in banking
A bank's licence to operate depends on keeping money and customer data safe and on proving it to auditors and regulators. On AWS, most real-world breaches come not from AWS failing but from customer mistakes: an over-broad IAM role, a public bucket, an unrotated secret, logs nobody watched. This module teaches you to prevent those mistakes, detect them quickly when they happen, and produce evidence that controls work. It also teaches honesty: AWS is responsible for security of the cloud and holds certifications for its services, but the bank stays responsible for security in the cloud and for the compliance of its own workloads. No sample architecture on this platform is automatically compliant with PCI DSS, UK GDPR or any banking regulation.
Analogy: IAM is the bank's keycard system, KMS is the vault that holds the master keys, CloudTrail is the CCTV recording every door opened, and GuardDuty is the security guard watching the monitors for anything unusual.
From .NET/Azure to AWS
| You know (Microsoft/Azure) | AWS equivalent | What's different |
|---|---|---|
| Entra ID users, groups, PIM | IAM Identity Center + permission sets, IAM roles, temporary credentials | Humans get short-lived role sessions; no standing admin |
| Azure RBAC role assignments | IAM identity policies, resource policies, permission boundaries | Explicit deny always wins; several policy types combine |
| Azure Policy (deny effects) | SCPs and RCPs in AWS Organizations | Guardrails cap permissions; they never grant any |
| Managed identities | IAM roles for EC2, ECS tasks, Lambda | Same idea — no keys in code |
| Key Vault keys / Managed HSM | AWS KMS / AWS CloudHSM | KMS key policies are the primary control; envelope encryption by default |
| Key Vault secrets | AWS Secrets Manager (+ Parameter Store) | Built-in rotation with Lambda rotation functions |
| Key Vault certificates / AD CS | AWS Certificate Manager / AWS Private CA | Public ACM certificates are free and auto-renew |
| Azure Storage immutability | S3 Object Lock (WORM), AWS Backup Vault Lock | Compliance mode cannot be shortened even by root |
| Defender for Cloud | AWS Security Hub (+ Security Hub CSPM), GuardDuty, Inspector | Several focused services feed one aggregated view |
| Microsoft Purview data discovery | Amazon Macie | Finds PII in S3 objects |
| Azure Activity Log | AWS CloudTrail | Organisation trail into a separate log-archive account |
| Microsoft Sentinel | Security Hub + Amazon Detective + CloudWatch (or your SIEM) | AWS emphasises native findings plus export to the bank's SIEM |
Learning objectives
By the end of this module you can:
- Write least-privilege IAM policies, explain the full policy evaluation logic, and debug an
AccessDeniedfrom the error and CloudTrail. - Use IAM Identity Center, STS role assumption, permission boundaries, SCPs/RCPs and resource policies together, and enforce segregation of duties.
- Encrypt data at rest and in transit with KMS customer managed keys, envelope encryption and TLS/mTLS, and add field-level encryption in .NET.
- Store and rotate secrets, issue certificates, and lock records with S3 Object Lock.
- Segment networks, filter egress, and protect public endpoints with WAF and Shield.
- Build an organisation-wide audit trail and detection stack, and run an incident-response runbook including isolation and evidence capture.
- Threat-model a payment API with STRIDE and add SAST, SCA, secrets, container and IaC scanning to a pipeline.
- Explain PCI DSS scope reduction, UK GDPR tensions (right to erasure vs immutable logs), tokenisation, transaction integrity and non-repudiation — and say where legal or compliance review is required.
Prerequisites
- Module 1: AWS fundamentals — IAM basics, Organizations, shared responsibility
- Module 2: Networking — VPCs, security groups, endpoints
- Parts 4–6 also assume Module 3: .NET on AWS and Module 4: APIs
How the pieces fit
Prevent (identity, guardrails, encryption, network), detect (findings aggregated in Security Hub), and respond (runbooks), with evidence stored where workload administrators cannot alter it.
Lessons
Lessons are listed in teaching order. Lessons 12 and 14 have a companion lab, labs/m05-data-protection/ (27 tests pass and 1 AWS test is skipped unless RUN_AWS_TESTS=1; no AWS account needed), with CDK (C#) and Terraform.
Part 1 — Identity and access
- IAM in depth — users, groups, roles and the policy types, and why banks avoid IAM users for people.
- Policy evaluation logic — explicit deny, allows, boundaries, SCPs/RCPs and session policies in one flowchart.
- Least privilege in practice — starting narrow, IAM Access Analyzer policy generation and unused-access findings.
- IAM Identity Center, MFA and temporary credentials — permission sets, STS and assume-role chains.
- Permission boundaries, SCPs, RCPs and resource-based policies — delegating safely across teams and accounts.
- Federation and segregation of duties — connecting Active Directory/Entra ID via SAML/OIDC and separating deploy, approve and audit roles.
- Labs 5.1 and 5.2: policy puzzles, permission boundaries and an offline policy linter — the hands-on checkpoint for lessons 1 to 6.
Part 2 — Data protection
- AWS KMS — customer managed keys, key policies, grants, envelope encryption, automatic rotation and multi-Region keys.
- When banks need CloudHSM — single-tenant HSMs, custom key stores and the operational cost.
- Secrets Manager and Parameter Store — rotation, caching in .NET and choosing between them.
- Certificates, TLS and mTLS — ACM, AWS Private CA and mutual TLS between services.
- Encryption at rest and in transit, and field-level encryption in .NET — customer managed keys across S3, EBS, RDS and DynamoDB, TLS policies, the AWS Encryption SDK and random versus deterministic encryption.
- S3 protection — Block Public Access, bucket policies, Object Lock for WORM records and Macie for PII discovery.
- Data classification, masking and tokenisation — four classification levels that drive controls, role-based masking, a tokenisation vault and Macie drift detection.
Part 3 — Network security
- Segmentation, private endpoints and egress filtering — layered network controls with Network Firewall.
- AWS WAF and AWS Shield — managed rules, rate limiting and DDoS protection tiers.
- Zero-trust principles and Verified Access (overview) — identity-aware access instead of trusted networks.
Part 4 — Detection, audit and response
- CloudTrail for banks — organisation trail, log file integrity validation and an immutable log-archive account.
- AWS Config — recording, managed and custom rules, remediation and conformance packs.
- Security Hub, GuardDuty, Inspector and Detective — what each finds and how findings flow together.
- Vulnerability management — Inspector for EC2, ECR images and Lambda, and patching SLAs.
- Incident response — runbooks, isolating a compromised instance or key, forensics basics and evidence preservation.
- Backup security and key rotation — AWS Backup, Vault Lock, cross-account copies, and rotating keys without downtime.
Part 5 — Secure SDLC
- Threat modelling with STRIDE — a worked model of a payment API.
- Pipeline security scanning — SAST, SCA/dependency scanning, secrets scanning, container image scanning and IaC scanning (Checkov, cfn-nag).
- Secure code review checklist for .NET on AWS — the things to check in every pull request.
Part 6 — Banking-specific considerations
- PCI DSS on AWS — scope reduction, tokenisation and segmentation (concepts only; your QSA decides).
- UK GDPR and data residency — lawful basis, right to erasure vs immutable logs, sovereignty and Region choice.
- Transaction integrity and non-repudiation — hashing, idempotency, double-entry consistency and digital signatures with KMS asymmetric keys.
- Labs 5.3 and 5.7: envelope encryption with KMS and signing payment instructions — the hands-on checkpoint for the KMS and transaction-integrity lessons.
- Audit logging and evidence collection — AWS Artifact, AWS Config evidence and what auditors actually ask for.
- Operational resilience and third-party risk — outsourcing considerations, exit plans and concentration risk.
- Module project: a secure banking API — the module project, with Labs 5.4 to 5.6 and the two incident runbooks.
Labs and module project
- Lab 5.1 (🟢) and Lab 5.2 (🟢) — Policy puzzles and permission boundaries: predict allow/deny for ten puzzles and confirm with the offline evaluator and the IAM policy simulator; build a permission boundary that lets a developer create roles without escalating privileges.
- Lab 5.3 (🟡) and Lab 5.7 (🟡) — Envelope encryption and payment signing: envelope encryption in C# with a KMS customer managed key (or the local stand-in), then sign and verify a payment instruction with a KMS asymmetric key, then schedule the keys for deletion.
- Lab 5.4 (🟢) — CloudTrail with log file validation; tamper with a log copy and detect it. Walkthrough in the module project.
- Lab 5.5 (🟡) — Enable GuardDuty and Security Hub CSPM in one Region during their trials, generate sample findings, then disable. Walkthrough in the module project.
- Lab 5.6 (🟢) — STRIDE threat model and a scanning pipeline (SCA, secrets, IaC, policy lint) for the Account API. Walkthrough in the module project.
Module project — secure banking API. A secure edition of the Account API with field encryption bound to the customer, role-based access and segregation of duties, audited and masked logging, KMS-backed secrets, a least-privilege task role and two incident runbooks ("leaked access key" and "suspicious data download"). Dummy data only. This feeds Capstone 1 and Capstone 7.
The code is in labs/m05-secure-banking-api/ (Terraform only, no CDK; 72 tests: 71 pass and 1 AWS integration test is skipped unless RUN_AWS_TESTS=1; none need an AWS account):
| Folder | Contents |
|---|---|
policies/ | IAM, boundary, SCP, RCP and key policies, plus ten evaluation puzzles in policies/scenarios/ (Labs 5.1, 5.2) |
src/Harbourline.Security.PolicyLinter | hl-policy: lint, explain and evaluate policies offline |
src/Harbourline.Security.Crypto | Envelope and field encryption, signing, masking, tokenising, blind index, classification, local KMS stand-in |
src/Harbourline.Security.Secrets | Caching Secrets Manager and Parameter Store readers |
src/Harbourline.Security.Tools | hl-crypto demos for Labs 5.3 and 5.7 |
src/Harbourline.Accounts.SecureApi | The module project API |
tests/ | The xUnit v3 test project |
infra/terraform/ | KMS keys, secret, parameter, least-privilege task role |
scripts/ | Labs 5.4 (CloudTrail validation) and 5.5 (GuardDuty and Security Hub CSPM) |
pipelines/security-scan.yml | Lab 5.6 scanning pipeline |
docs/runbooks/ | leaked-access-key.md, suspicious-data-download.md |
When you finish, keep the Module 5 cheat sheet handy for revision.
Cost profile
| Part | Label | Free alternative |
|---|---|---|
| IAM, Identity Center, Organizations, SCPs/RCPs, Access Analyzer (external access) | 🟢 free | No charge |
| CloudTrail management events (first trail), ACM public certificates | 🟢 free | No charge |
| Threat modelling and SDLC scanning | 🟢 free | Open-source scanners run locally or in GitHub Actions |
| KMS customer managed keys | 🟡 credits | About $1 per key per month; use AWS managed keys where the lesson allows, and schedule deletion straight after |
| Secrets Manager | 🟡 credits | $0.40 per secret per month; Parameter Store SecureString for most labs |
| GuardDuty, Security Hub, Inspector, Macie, Detective, Config rules | 🟡 credits | Use free trials in one Region, then disable ⚠ VERIFY trial terms |
| AWS WAF | 🟡 credits | Attach, test and delete in one session |
| CloudHSM, AWS Private CA, Shield Advanced, Network Firewall | 🔴 paid | Design-only exercises; build a local OpenSSL CA for the mTLS lab |
Irreversible settings — read before the labs
S3 Object Lock in compliance mode and AWS Backup Vault Lock in compliance mode cannot be removed or shortened, even by the root user. In labs, always use governance mode with a retention period of one day or less, or you may pay to store test data until the retention ends.
Certification alignment
| Exam | Domains (weight) | What this module covers |
|---|---|---|
| SCS-C03 | Detection (16%) · Incident Response (14%) · Infrastructure (18%) · IAM (20%) · Data Protection (18%) · Governance (14%) | Every domain — this module is the core SCS-C03 preparation |
| SAA-C03 | Secure (30%) | IAM, KMS, network controls, secure architectures |
| DVA-C03 | Security (26%) | Secrets, encryption from code, Cognito and IAM for applications |
| CLF-C02 | Security & Compliance (30%) | Shared responsibility and the security service landscape |
Service availability notes
Services that changed — verified 2026-11-17
AWS Security Hub was relaunched as a unified service (GA December 2025). The original service is now called AWS Security Hub CSPM and continues as a separate posture-management service. Lessons use the current names.
AWS Audit Manager is in maintenance: from 2026-04-30 it cannot be set up in new accounts. AWS points to AWS Config conformance packs, Control Tower controls and Security Hub CSPM standards. There is no GDPR conformance pack, so UK GDPR evidence remains a manual, compliance-led activity.
CloudTrail Lake closed to new customers on 2026-05-31; AWS recommends CloudWatch for similar analysis. CloudTrail trails themselves are fully supported.
Systems Manager Incident Manager closed to new customers on 2025-11-07, so incident runbooks here use CloudWatch alarms, EventBridge, SNS and Systems Manager Automation. Amazon CodeGuru Reviewer is in maintenance, so SAST uses open-source tools.
Key AWS services
AWS IAM · IAM Identity Center · AWS STS · AWS Organizations (SCPs, RCPs) · IAM Access Analyzer · AWS KMS · AWS CloudHSM · AWS Secrets Manager · Systems Manager Parameter Store · AWS Certificate Manager · AWS Private CA · Amazon S3 (Block Public Access, Object Lock) · Amazon Macie · AWS WAF · AWS Shield · AWS Network Firewall · AWS Verified Access · AWS CloudTrail · Amazon CloudWatch · AWS Config · AWS Security Hub / Security Hub CSPM · Amazon GuardDuty · Amazon Inspector · Amazon Detective · AWS Backup · AWS Artifact · AWS Systems Manager Automation
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.
Module 4 cheat sheet
One-page revision summary for API Development & Integration: services, Azure mapping, CLI commands, limits, decision rules, exam traps and cost traps.
IAM in depth: identities, roles and every policy type
Explain IAM users, groups, roles and the root user, read and write policy JSON with confidence, and recognise all nine policy types a request can meet — then audit an account for risky IAM users from C#.