Module 5 cheat sheet
One-page revision summary for Security for Banking & Finance: services, Azure mapping, CLI commands, limits, decision rules, exam traps and cost traps.
Assumes: AWS CLI v2 · AWS SDK for .NET v4 · Region us-east-1 · facts as stated in the Module 5 lessons; items marked VERIFY there are not repeated as certain here. Verified against official sources on 2026-11-18.
A printable summary of Module 5. Each row links back to the lesson with the detail. This is revision help, not compliance advice: your QSA, auditor and counsel decide.
Key services
| Service | What it is for |
|---|---|
| IAM, STS, Identity Center | Identities, policies and short-lived credentials; humans sign in through Identity Center |
| Organizations SCPs / RCPs | Guardrails that cap permissions on principals (SCP) or resources (RCP); they never grant |
| IAM Access Analyzer | External-access and unused-access findings, policy generation and checks |
| KMS / CloudHSM | Managed keys with key policies and envelope encryption / single-tenant HSMs and custom key stores |
| Secrets Manager / Parameter Store | Rotating secrets / cheap configuration and SecureString |
| ACM / Private CA | Free auto-renewing public certificates / private PKI for mTLS |
| S3 Block Public Access, Object Lock, Macie | Stop public exposure, WORM retention, PII discovery |
| Network Firewall, WAF, Shield, Verified Access | Egress filtering, layer-7 rules and rate limits, DDoS protection, identity-aware access |
| CloudTrail, Config | Who did what (log archive with integrity validation) / what the resource looks like and rules over it |
| Security Hub, GuardDuty, Inspector, Detective | Aggregated findings, threat detection, vulnerability scanning, investigation |
| AWS Backup (Vault Lock) | Immutable, cross-account backup copies |
.NET / Azure → AWS
| Microsoft / Azure | AWS |
|---|---|
| Entra ID + PIM | IAM Identity Center + permission sets, temporary role sessions |
| Azure RBAC | IAM identity and resource policies, permission boundaries |
| Azure Policy (deny) | SCPs and RCPs |
| Managed identity | IAM role for ECS task, Lambda or EC2 |
| Key Vault keys / Managed HSM | KMS / CloudHSM |
| Key Vault secrets | Secrets Manager (+ Parameter Store) |
| Azure Storage immutability | S3 Object Lock, Backup Vault Lock |
| Defender for Cloud | Security Hub, GuardDuty, Inspector |
| Purview | Macie |
| Activity Log | CloudTrail |
| Sentinel | Security Hub + Detective + CloudWatch, or your SIEM |
.NET DataProtection / AesGcm | KMS GenerateDataKey + local AES-GCM (envelope encryption) |
Most useful CLI commands
| Task | Command |
|---|---|
| Who am I? | aws sts get-caller-identity --profile learn-sandbox |
| Test a policy offline | aws iam simulate-custom-policy ... · aws iam simulate-principal-policy ... |
| Validate a policy | aws accessanalyzer validate-policy --policy-type IDENTITY_POLICY --policy-document file://p.json |
| Create / inspect a key | aws kms create-key · aws kms describe-key --key-id ID · aws kms get-key-policy --key-id ID --policy-name default |
| Rotation | aws kms enable-key-rotation --key-id ID · aws kms get-key-rotation-status --key-id ID |
| Retire a lab key | aws kms schedule-key-deletion --key-id ID --pending-window-in-days 7 |
| Verify CloudTrail logs | aws cloudtrail validate-logs --trail-arn ARN --start-time TIME |
| Config compliance | aws configservice describe-compliance-by-config-rule |
| Inspector findings | aws inspector2 list-findings |
| Read a secret value | aws secretsmanager get-secret-value --secret-id NAME |
| Offline policy linter (this module) | dotnet run --project src/Harbourline.Security.PolicyLinter -- lint policy.json |
Key limits and defaults
| Item | Value | Lesson |
|---|---|---|
| Managed policy size | 6,144 characters; inline policies per role together 10,240 | IAM in depth |
| Role trust policy | 2,048 characters by default (adjustable to 8,192) | IAM in depth |
| Role session | 15 minutes to 12 hours; role chaining capped at 1 hour | Identity Center, MFA and STS |
| Permission set session | 1 to 12 hours, default 1 hour | Identity Center, MFA and STS |
| SCPs / RCPs | Do not affect the management account | Boundaries, SCPs, RCPs |
KMS Encrypt | 4 KB maximum plaintext; use envelope encryption | AWS KMS |
| KMS key deletion | Waiting period 7 to 30 days (default 30); irreversible afterwards | AWS KMS |
| KMS automatic rotation | Period 90 to 2,560 days, default 365; key ID unchanged | Backup security and key rotation |
| KMS cost | USD 1 per key per month, prorated hourly; none while pending deletion | AWS KMS |
| Secrets Manager recovery window | 7 to 30 days; USD 0.40 per secret per month | Secrets Manager |
| Parameter Store value size | Standard 4 KB, advanced 8 KB | Secrets Manager |
| ACM public certificate validity | 198 days, auto-renewed when DNS validation stays in place | Certificates, TLS, mTLS |
| CloudTrail event history | 90 days of management events, free, not extendable | CloudTrail for banks |
| CloudTrail digests | Hourly, SHA-256 hash chain, signed | CloudTrail for banks |
| WAF capacity | Up to 5,000 WCUs per web ACL; extra charge above 1,500 | WAF and Shield |
| Vault Lock compliance grace time | Minimum 3 days, then immutable | Backup security and key rotation |
| GuardDuty trial | 30 days per account per Region | Security Hub, GuardDuty, Inspector, Detective |
Decision rules
| If… | Then… |
|---|---|
| A human needs AWS access | Identity Center and a role session, never an IAM user with keys |
| Two policies conflict | Explicit deny wins; then check boundaries, SCPs/RCPs and session policies cap the allow |
| Delegating role creation to developers | Permission boundary plus a rule that new roles must carry it |
| Stop a whole account or OU from an action | SCP; to stop outsiders reaching your resources, RCP |
| Data larger than 4 KB | Envelope encryption with GenerateDataKey |
| Regulation needs single-tenant HSMs or key custody | CloudHSM or a custom key store; otherwise plain KMS |
| Credentials in code or config | Secrets Manager with rotation; Parameter Store for non-secret or cheap config |
| Service-to-service identity inside the platform | mTLS with Private CA or IAM roles |
| Logs must survive an admin compromise | Organisation trail into a separate log-archive account, Object Lock, integrity validation |
| Detecting threats | GuardDuty; aggregate in Security Hub; investigate in Detective |
| Records must not change for a retention period | Object Lock (governance in labs, compliance only deliberately) |
| Leaked access key | Deactivate, review CloudTrail, rotate, then follow the runbook |
Common exam traps
- Explicit deny beats any allow, but an SCP or boundary allow alone grants nothing.
- Cross-account access needs both sides (identity policy and resource policy); within one account a resource policy can grant on its own.
- Role chaining caps the session at 1 hour, whatever the role's maximum says.
- KMS key policy is the primary control: without the key policy (or an IAM-enabling statement) IAM alone cannot grant access.
- Rotation keeps the key ID and old material; asymmetric, HMAC and custom-key-store keys are rotated manually with an alias.
- Object Lock compliance mode and Vault Lock compliance mode cannot be shortened, even by root.
- CloudTrail event history is 90 days; a trail is needed for longer retention.
- Security Hub CSPM is the original posture service; the newer Security Hub is separate.
- Macie finds PII in S3 only; it does not prevent exposure.
- Shield Standard is automatic and free; Shield Advanced is a paid commitment.
Cost traps
| Trap | Avoid it by |
|---|---|
| CloudHSM clusters left running | Hourly per HSM; design-only exercise, delete the same day |
| Shield Advanced | USD 3,000 per month with a 1-year commitment; design-only |
| AWS Private CA | Costs USD 400 per month for a general-purpose CA; use a local OpenSSL CA for the mTLS lab |
| KMS keys and rotations | Schedule deletion after labs; the first two rotations each add USD 1 per month |
| Secrets Manager secrets | USD 0.40 each per month; Parameter Store for most labs |
| Network Firewall, NAT, interface endpoints | Hourly per AZ plus per GB; tear down the same day |
| Verified Access applications | USD 0.27 per application per hour, even idle |
| GuardDuty, Inspector, Macie, Detective trials | Note the date, disable in the same Region, check Billing next day |
| Config recorders everywhere | Record only the resource types you need; delete rules and recorder after the lab |
| Backups copied everywhere, forever | Lifecycle rules; governance mode and short retention in labs |
Encryption, classification and tokenisation (lessons 12 and 14)
| Topic | Rule of thumb | Lesson |
|---|---|---|
| Three layers | TLS in transit, service encryption at rest, field-level encryption in the application; each stops different threats | Encryption at rest and in transit |
| Creation-only settings | RDS and EBS encryption cannot be switched on in place: snapshot, copy encrypted, restore | Encryption at rest and in transit |
| Key ownership | AWS owned (invisible) < AWS managed (visible, fixed policy) < customer managed (your policy and audit) | Encryption at rest and in transit |
| TLS policy in IaC | Always set SslPolicy explicitly; the IaC default allows TLS 1.0 | Certificates, TLS and mTLS |
| Random vs deterministic | Random by default; deterministic leaks equality and frequency; random plus a keyed blind index for search | Encryption at rest and in transit |
| Encryption context | Identifiers only (it is plain text in CloudTrail); verify it on decrypt | Encryption at rest and in transit |
| Classification | A label is worth only the controls attached to it; fail the build on unlabelled properties | Data classification, masking and tokenisation |
| Masking vs tokenisation | Masking is display only; tokenisation keeps the real value in one vault | Data classification, masking and tokenisation |
| Macie | S3 only; produces evidence of misclassification, people fix the label (⚠ VERIFY current availability) | Data classification, masking and tokenisation |
Extra exam traps: a snapshot encrypted with an AWS managed key cannot be shared cross-account; pseudonymised data is still personal data; a plain hash of a card number is brute-forceable.
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 project: a secure banking API (field encryption, roles, audit, secrets and incident runbooks) with Labs 5.4 to 5.6
Run and extend the secure edition of the Harbourline Accounts API: field-level encryption bound to the customer, a blind index for IBAN search, role-based access with segregation of duties, audit events and masked logs, Terraform for KMS, secrets and a least-privilege role, plus the CloudTrail, GuardDuty and pipeline-scanning labs and two incident runbooks.
Module 6: Databases & Data Architecture
Map your SQL Server experience onto the AWS database family: RDS, Aurora, DynamoDB, ElastiCache, DocumentDB, Redshift and S3. You learn to pick the right store for each banking workload, migrate SQL Server schemas and data safely, and connect a .NET API with EF Core, Secrets Manager credentials and least-privilege access.