Skip to main content

Security Architecture Fundamentals

1. Executive Summary​

Security architecture defines how a system protects confidentiality, integrity, and availability against intentional and accidental threats across people, processes, and technology. At principal level, security is not a checklist of tools—it is a design discipline integrating identity, network segmentation, encryption, supply chain controls, and detective response into every architecture decision.

This chapter covers defense in depth, the zero trust model ("never trust, always verify"), threat modeling with STRIDE, encryption in transit and at rest, AWS IAM and KMS as control planes, and production patterns: WAF, Secrets Manager, GuardDuty, Security Hub, and audit logging via CloudTrail.

Principal architects balance security vs velocity with explicit risk acceptance, measurable controls, and alignment to compliance frameworks—not security theater that blocks delivery without reducing real risk.

2. Why This Topic Matters​

Security failures end careers and companies. Interviewers expect:

  • STRIDE threat categorization on a whiteboard design.
  • Zero trust principles applied to cloud microservices.
  • IAM least privilege and blast radius of compromised credentials.
  • Encryption key management (KMS, rotation, MRKs for DR).
  • mTLS vs TLS termination at load balancer tradeoffs.
  • Shared responsibility on AWS—what you must still own.
  • Incident response integration: detection, containment, recovery.

Security architecture is distributed systems security: boundaries, trust, and failure modes under attack.

3. Problems Being Solved​

ProblemSecurity architecture response
Unauthorized accessIAM, MFA, RBAC, policy boundaries
Data exfiltrationEncryption, DLP, network egress controls
Lateral movementSegmentation, zero trust, short-lived credentials
Supply chain compromiseSigned artifacts, dependency scanning, IaC review
Insider threatLeast privilege, audit logs, separation of duties
DDoS / abuseWAF, Shield, rate limiting
ComplianceConfig rules, evidence from CloudTrail
Key compromiseRotation, HSM, MRK, revocation procedures

Security does not guarantee zero incidents—it reduces likelihood and impact with detectable, recoverable posture.

4. Assumptions and System Model​

AssumptionImplication
Breach will occurDesign detection and containment, not only prevention
Insiders and bugs existLeast privilege; no single god-role
Dependencies are untrustedVerify signatures, scan CVEs
Network perimeter is insufficientZero trust inside VPC
Crypto keys are high-value targetsKMS, HSM, rotation
Auditability requiredImmutable logs, retention policies

Threat model: Rational adversaries with varying capability—script kiddies to nation-states; design for credential theft and misconfiguration as most common AWS risks.

5. Essential Terminology​

TermDefinition
CIA triadConfidentiality, Integrity, Availability
AuthenticationProving identity (who)
AuthorizationPermitting action (what)
Zero trustVerify every request; no implicit network trust
Defense in depthLayered controls
STRIDESpoofing, Tampering, Repudiation, Info disclosure, DoS, Elevation
mTLSMutual TLS—client and server certificates
KMSAWS Key Management Service for encryption keys
CMKCustomer Master Key
HSMHardware Security Module (CloudHSM, KMS custom key store)
WAFWeb Application Firewall
SCPService Control Policy in AWS Organizations
SBOMSoftware Bill of Materials
CSPMCloud Security Posture Management
MTTD / MTTRMean time to detect / respond

6. Core Mechanism​

6.1 Defense in depth layers​

  1. Identity — IAM, SSO, MFA, role assumption.
  2. Perimeter — WAF, Shield, CloudFront, API throttling.
  3. Network — VPC segmentation, security groups, PrivateLink.
  4. Compute — Hardened AMIs, IMDSv2, patch management.
  5. Application — Input validation, OWASP mitigations, authZ.
  6. Data — Encryption at rest (KMS), in transit (TLS), tokenization.
  7. Detection — GuardDuty, Security Hub, CloudTrail anomalies.
  8. Response — Runbooks, IR teams, automated containment (Lambda).

Failure of one layer should not imply total compromise.

6.2 Zero trust on AWS​

Traditional: "Inside VPC = trusted." Zero trust: Every API call and connection is authenticated and authorized regardless of network location.

Practices:

  • IAM roles for workloads; no long-lived keys.
  • Service-to-service mTLS or IAM SigV4 for AWS APIs.
  • Security groups as micro-segmentation—not flat 10.0.0.0/16 access.
  • VPC Lattice / App Mesh for service identity policies.
  • Conditional access — MFA for humans; aws:SourceVpc in policies.

Figure 1: Zero trust layers—edge authentication, service-level authorization, encrypted data with KMS.

6.3 Threat modeling with STRIDE​

Apply STRIDE per component or data flow:

ThreatExampleMitigation
SpoofingFake service calling APImTLS, IAM, JWT validation
TamperingModify S3 object in transitTLS, signed URLs, checksums
RepudiationDeny placing orderCloudTrail, signed audit logs
Information disclosureS3 bucket publicBlock Public Access, SCPs, encryption
Denial of serviceFlood ALBShield, WAF rate limits, autoscaling
Elevation of privilegeCompromised role gains adminLeast privilege, permission boundaries

Process: Diagram data flows → identify assets → STRIDE per flow → prioritize mitigations → verify in tests.

6.4 Encryption architecture​

In transit: TLS 1.2+ everywhere; ACM for public certs; internal mTLS for service mesh where needed.

At rest:

  • S3 SSE-S3, SSE-KMS, or SSE-C.
  • EBS/RDS KMS encryption.
  • Secrets Manager encryption with CMK.

Key management:

  • CMK rotation annual automatic (AWS-managed) or manual for customer keys.
  • Multi-Region Keys (MRK) for DR decrypt in secondary region.
  • Key policies + IAM policies both must allow—dual authorization.
  • CloudHSM when FIPS 140-2 Level 3 or contractual HSM required.

Principal rule: Encryption without access control is incomplete; KMS policies are authorization layer.

6.5 AWS security services map​

ServiceRole
IAM / SSOIdentity and access
KMSKey management
WAF + ShieldApplication DDoS and OWASP rules
GuardDutyThreat detection (ML on VPC Flow, DNS, CloudTrail)
Security HubFindings aggregation (CIS, PCI)
InspectorVulnerability scanning for EC2/ECR/Lambda
MacieSensitive data discovery in S3
ConfigConfiguration compliance rules
CloudTrailAPI audit trail
Secrets ManagerSecret rotation
Network FirewallIDS/IPS at VPC edge

Figure 2: AWS security control plane—preventive IAM/encryption; detective aggregation in Security Hub.

6.6 Compliance mapping (informative)​

Security architecture often maps to frameworks without being identical:

FrameworkAWS-aligned controls (examples)
CIS AWS FoundationsSecurity Hub benchmark, Config rules
PCI DSSNetwork segmentation, encryption, logging (scope reduction via tokenization)
SOC 2Access control evidence from CloudTrail, change management via IaC
GDPRData residency, encryption, breach notification procedures
HIPAABAA with AWS, KMS, access logging (not automatic compliance—architecture required)

Distinction: Compliance attestation is organizational; technical controls enable but do not guarantee audit success.

7. Step-by-Step Walkthrough​

Walkthrough A: Threat model a public API​

  1. Draw: Client → CloudFront → WAF → ALB → ECS → RDS.
  2. STRIDE on client→ALB: spoofing (JWT), tampering (TLS), DoS (WAF).
  3. STRIDE on ECS→RDS: info disclosure (SG rules), elevation (DB creds in env—use Secrets Manager).
  4. Prioritize: public S3 risk, SQL injection, IAM overpermission.
  5. Document mitigations in ADR; track in Security Hub.

Walkthrough B: IAM least privilege for Lambda​

  1. Start with AWS managed policy for prototyping only.
  2. Replace with inline policy listing specific ARNs: one DynamoDB table, one SQS queue.
  3. Add permission boundary on role max permissions.
  4. Enable IAM Access Analyzer — remove unused permissions quarterly.
  5. CloudTrail alerts on AttachUserPolicy with AdministratorAccess.

Walkthrough C: Encrypt data path end-to-end​

  1. ACM cert on ALB (TLS 1.3 policy).
  2. ALB → targets over TLS or within private VPC (threat model dependent).
  3. RDS storage encryption with CMK; rds:Encrypted in Config rule.
  4. S3 bucket policy denies aws:SecureTransport=false.
  5. KMS key policy allows only app role and backup role.

Walkthrough D: Respond to leaked access key​

  1. Disable key immediately in IAM.
  2. CloudTrail LookupEvents for key ID—scope API calls made.
  3. Rotate affected secrets; review S3/EC2 creations.
  4. GuardDuty findings for exfiltration patterns.
  5. Postmortem: key was in Git—implement git-secrets, OIDC for CI, no long-lived keys.

Walkthrough E: Organization guardrails​

  1. AWS Organizations with SCP: deny s3:PutBucketPublicAccessBlock disable, deny unapproved regions.
  2. Control Tower landing zone — centralized logging account.
  3. Config aggregator across accounts.
  4. Security Hub enabled org-wide with CIS benchmark.
  5. Security Hub custom insights route critical findings to ticketing with SLA by severity.

Walkthrough F: OAuth 2.0 / OIDC for API security on AWS​

Public APIs commonly use Amazon Cognito or external IdP (Okta, Auth0) with OAuth 2.0 authorization code flow + PKCE for mobile/SPA:

  1. Client obtains authorization code from IdP.
  2. Exchanges code for access token (short-lived) and refresh token (restricted storage).
  3. API Gateway JWT authorizer or application middleware validates signature, aud, exp, scopes.
  4. Fine-grained authorization at service layer—JWT scopes are coarse; map to RBAC/ABAC internally.
  5. Token revocation via short TTL + refresh rotation; Cognito global sign-out for compromise response.

mTLS complements OAuth for service-to-service calls where no human IdP exists—common in mesh architectures.

Walkthrough G: Encryption key lifecycle and DR​

  1. Create customer-managed CMK in primary region with automatic annual rotation enabled.
  2. Define key administrators (security team) separate from key users (application roles)—separation of duties.
  3. For multi-region DR, use Multi-Region Keys (MRK) so ciphertext from primary decrypts in DR region after failover.
  4. Key deletion requires waiting period—document break-glass if key compromise requires disable-not-delete first.
  5. CloudTrail logs all kms:Decrypt calls—alert on anomalous principals.

Key lifecycle is architecture, not a one-time setup task.

8. Invariants and Guarantees​

PropertyStatement
IAM explicit DenyOverrides Allow
KMS dual policyKey policy + IAM must both permit
TLS correct implementationProtects confidentiality on wire—not endpoint auth alone
CloudTrail immutabilityWith log file validation and restricted delete IAM

Cryptography provides computational guarantees; operational errors bypass crypto.

9. Failure Scenarios​

FailureImpactMitigation
Public S3 bucketMass data leakBlock Public Access, Macie, SCPs
Overprivileged roleLateral movementLeast privilege, Access Analyzer
Stale CVE in containerRCEECR scanning, patch pipeline
SSRF to IMDSCredential theftIMDSv2, hop limit 1, no public IPs
KMS key deletionData unrecoverableWaiting period, MRK, backups
WAF bypassApplication-layer attackApp validation, rate limits
Audit log gapNo forensicsOrg trail, log validation, S3 Object Lock
Supply chain poisonMalicious dependencySBOM, signed images, provenance

10. Performance Characteristics​

ControlOverhead
TLSCPU on handshake; session resumption mitigates
KMS encrypt/decryptAPI latency; data key caching in SDK
mTLS meshConnection setup; cert rotation automation
WAF inspectionLatency ms-level; rule complexity matters
GuardDutyNo inline traffic inspection—API analysis

Security controls add latency—budget in performance requirements.

11. Scalability Limits​

  • IAM policy size limits—use permission sets and ABAC patterns.
  • KMS request quotas—request increases for high-throughput encrypt.
  • WAF ACL rule limits—prioritize rules; use rule groups.
  • CloudTrail volume—management events only vs data events cost.
  • Centralized security account as bottleneck—automate with event-driven response.

12. Operational Considerations​

  • Security champions embedded in product teams.
  • Threat model per major feature at design review.
  • Vulnerability management SLA by severity (CVSS).
  • Penetration testing annual + after major changes.
  • Break-glass accounts in vault with MFA and logging.
  • Patch cadence for AMIs, EKS versions, Lambda runtimes.
  • Disaster recovery for KMS keys and certificate expiry calendars.

Figure 3: Layered response—WAF blocks obvious attacks; authZ limits blast radius; GuardDuty triggers IR.

13. Security Considerations​

This section is meta—security of security tools:

  • Restrict Security Hub / GuardDuty admin to security account.
  • CloudTrail log bucket — deny delete except break-glass; MFA delete on S3.
  • Secrets rotation without downtime—dual-secret pattern.
  • Third-party SaaS — OAuth scopes, data processing agreements.

14. Cost Considerations​

ItemNotes
GuardDuty / Security HubPer-account or volume pricing
KMS API callsHigh-throughput apps—cache data keys
WAFPer rule + request charges
CloudTrail data eventsExpensive—scope S3 object-level selectively
MacieSensitive data scanning at scale

Security spend is risk insurance—justify with threat model priorities.

15. Production Implementations​

PatternAWS implementation
Landing zoneControl Tower, SCPs, centralized logging
Microservice zero trustApp Mesh mTLS, IAM roles per task
Data lake securityLake Formation, column-level permissions
CI/CD securityOIDC to AWS, signed containers, CodePipeline scans
Hybrid identityIAM Identity Center + SAML to corporate IdP

Reference: AWS Security Reference Architecture.

16. Alternatives and Tradeoffs​

AlternativeWhen
VPN perimeter trustLegacy; insufficient alone for cloud
Hardware HSM on-premRegulatory; higher ops burden vs CloudHSM
Third-party CNAPPMulti-cloud unified posture
Mutual TLS everywhereHigh security microservices; ops complexity
Network ACL onlyInsufficient—stateless, coarse

Balance pragmatic layered controls vs perfect zero trust timeline.

17. Common Misconceptions​

MisconceptionReality
"VPC = secure"Misconfigured SGs, IAM, public resources
"Encryption = secure"Keys and access policies matter
"Compliance = security"Checkbox vs threat-informed design
"Security team owns all security"Builders own secure code; platform enables
"WAF stops all attacks"App-layer logic flaws remain

18. Principal Architect Perspective​

  • Embed threat modeling in architecture review gate—not optional for tier-1.
  • Identity is the perimeter in cloud—design roles per workload function.
  • Automate guardrails (SCPs, Config) over policy documents alone.
  • Measure MTTD for critical findings—not just vulnerability count.
  • Align with business risk—don't encrypt public marketing site with HSM.

19. Architecture Review Exercise​

Scenario: Team stores DB password in Terraform state plaintext, uses AdministratorAccess for CI role, disables CloudTrail to save cost, allows SSH from 0.0.0.0/0 on bastion.

Findings: Critical—state secrets, god CI role, no audit, open SSH.

Remediation: Remote state with encryption + locking; OIDC CI with least privilege; org CloudTrail; SSM Session Manager replacing SSH; Secrets Manager for DB creds referenced at runtime.

20. Whiteboard Explanation​

"Security architecture layers controls: identity with IAM roles and MFA, network segmentation in VPC, encryption with KMS for data at rest and TLS in transit, edge protection with WAF and Shield, and detection with GuardDuty and CloudTrail feeding Security Hub. We assume breach—zero trust means every service call is authenticated and authorized, not trusted because it's inside the VPC. Threat modeling with STRIDE on each data flow finds gaps before build. On AWS, shared responsibility means we own IAM config, encryption choices, and application security; AWS owns the hypervisor."

21. Interview Questions​

  1. CIA triad? — Confidentiality, integrity, availability.
  2. Zero trust principles? — Verify explicitly, least privilege, assume breach.
  3. STRIDE categories? — Six threat types.
  4. IAM role vs user? — Workloads use roles; humans use SSO.
  5. KMS key policy vs IAM? — Both must allow decrypt.
  6. mTLS vs TLS at ALB? — Mutual auth vs server-only.
  7. How detect credential leak? — CloudTrail anomalies, GuardDuty.
  8. S3 public access prevention? — Block Public Access, bucket policies, SCPs.
  9. Shared responsibility on EC2? — AWS: host; customer: OS, app, data.
  10. WAF vs Security Group? — L7 app rules vs L4 stateful firewall.
  11. Why IMDSv2? — SSRF credential theft mitigation.
  12. Defense in depth example? — Multiple independent layers.

22. Interview Follow-Ups​

  1. Design security for multi-tenant SaaS on AWS. — Row-level security, tenant IAM namespaces, encryption per tenant keys.
  2. MRK for DR encryption? — Replicate keys; decrypt in secondary region.
  3. OAuth vs SAML vs Cognito? — Protocol and use-case fit.
  4. Container escape mitigation? — Minimal images, read-only root, seccomp, EKS hardening.
  5. Balance security and developer velocity? — Platform golden paths, automated scans in CI.

22A. Production Low-Level Design (Interview + Game Day)​

Public PII REST API on AWS with defense-in-depth layers. Production LLD and Game Day Standard.

Control vs data plane​

PlaneComponents
ControlIAM, KMS, Cognito/OIDC, WAF rules, CloudTrail, GuardDuty
DataALB → private app tier → RDS (encrypted); S3 via VPC endpoint

Step-by-step request security path:

StepControlFailure mode
1WAF rate limit + OWASP rules429 abuse
2OIDC short-lived JWTRevoke on leak
3App-layer authZ (not network trust)IDOR blocked
4KMS CMK per tenant optionalKey policy audit
5CloudTrail + structured access logForensics on PII access

One SLO​

Security ops: 100% PII API paths behind authZ tests in CI; mean time to revoke compromised token < 15 minutes.


22B. Game Day Playbooks​

#DrillInjectDetectMitigateVerify
GD-1Leaked JWTSimulate token in logsGuardDuty / anomalyRevoke session; rotate signing keysStolen token rejected
GD-2WAF bypass attemptSQLi probe trafficWAF block metricTighten rule; block IPNo DB query executed
GD-3S3 bucket policy driftPublic ACL simulationConfig rule NON_COMPLIANTBlock Public Access; SCPBucket remains private

GD-1 — Credential leak response​

23. Strong Answer Example​

Question: "How would you secure a public-facing REST API on AWS handling PII?"

Answer this as a 45-minute greenfield design using the PRACTICE framework. Below is how a strong student sounds aloud—clarify first, layer controls, run STRIDE on a DFD, then defend tradeoffs and residual risk.

PRACTICE interview answer map for securing a PII REST API

Figure A: PRACTICE map — Problem → Requirements → Assumptions → Capacity → Topology → Invariants → Constraints → Evolution.


Student interview script (PRACTICE)​

P — Problem framing​

"We're securing a public REST API on AWS that stores and returns PII—names, emails, maybe government IDs or account identifiers. Attackers can hit the edge from the internet, so we assume breach is possible and design for prevention plus detection and containment.

Non-goals for v1: multi-region active-active auth, custom HSM appliances, and full DLP for every analytics warehouse. I'll call those out as later phases. I'll treat PII at rest and in transit, identity, and auditability as the core."

R — Requirements​

TypeRequirement
FRAuthenticated CRUD on user/profile resources; export/download paths are high-risk
NFRConfidentiality of PII; integrity of records; availability under abuse (rate limits)
ComplianceAudit who accessed which PII; encryption evidence for SOC2 / privacy regs
OpsSecrets rotation, incident runbook (token revoke), continuous findings triage

"I'll ask: B2B API keys or end-user OIDC? Which PII fields? Any PCI/card data mixed in? I'll assume OIDC users + service clients, PII but not full card PAN, AWS multi-account org available."

A — Assumptions (state aloud)​

AssumptionWhy it matters
AWS control plane (ACM, KMS, IAM, Cognito)Standard building blocks interviewers expect
API workloads in private subnetsNo public IPs on app tier
Short-lived JWTs (minutes), not long-lived API keys aloneLimits blast radius of stolen tokens
App-layer authZ requiredNetwork location ≠ authorization (zero trust)
Customer-managed KMS for PII storeKey policy + rotation + audit of decrypts

"If they say 'API keys only' or 'must support partner mTLS,' I'd add API Gateway usage plans / mutual TLS at the edge—but the private data plane + least privilege story stays."

C — Capacity (back-of-envelope + blast radius)​

Peak read QPS → 2,000–5,000 (say)
Auth: Cognito / JWT verify → local JWKS cache; avoid per-request Cognito call
WAF rate limit → per-IP + per-token soft limits; protect login & export
PII decrypt path → envelope encryption; KMS Decrypt not on every row if cached DEK
Blast radius of one task role → one table / one S3 prefix — not account admin
Log volume → CloudTrail + app audit; never log raw PII payloads

"Capacity here isn't just QPS—it's how much an attacker can exfiltrate if one credential or one pod is compromised."

T — Topology (draw this)​

Defense-in-depth topology for public REST API handling PII on AWS

Figure B: Edge (CloudFront + WAF) → TLS on ALB → private API → KMS-encrypted RDS/S3; identity via Cognito; secrets via Secrets Manager; detect with CloudTrail / GuardDuty / Security Hub.

Pattern choice: Defense in depth + zero trust at the request—not "VPC = secure."

LayerControl
EdgeCloudFront, WAF managed rules, Shield Standard/Advanced as needed
TransportTLS 1.2+ (prefer 1.3), ACM certs; HSTS
IdentityCognito (or IdP) OIDC; MFA for humans; no long-lived keys on servers
AuthZApp checks scopes + resource attributes; deny by default
NetworkPrivate subnets, SG least ports, VPC endpoints for AWS APIs
DataRDS/S3 encryption with CMK; field-level where high-risk
SecretsSecrets Manager / SSM; rotation; never bake into images
DetectOrg CloudTrail, GuardDuty, Config, Security Hub; Macie on S3

Zero-trust request path for a PII API call

Figure C: One request through verify → authorize → decrypt → audit; fail closed at token, WAF, scope, or IAM.

I — Invariants (safety)​

"Non-negotiable for PII:

  1. No plaintext PII at rest — CMK-backed encryption; key policy audited.
  2. AuthN ≠ AuthZ — valid JWT still fails without resource permission.
  3. Least privilege IAM — task roles scoped to table/prefix; no * on kms:Decrypt across all keys if avoidable.
  4. Never log secrets or raw PII — structured audit with subject id + action + resource id.
  5. Assume breach — short token TTL, revoke path, IMDSv2, no SSH bastions with standing access."

Run STRIDE threat model (interview whiteboard)​

"Before I lock mitigations, I'll run STRIDE—not as a checklist dump, but on a data-flow diagram with trust boundaries. Process: draw flows → name assets → STRIDE each critical flow → rank by impact × likelihood → map controls → leave residual risk explicit."

STRIDE six threat categories with property mapping

Figure D: STRIDE cheat sheet — Spoofing→identity, Tampering→integrity, Repudiation→non-repudiation, Info disclosure→confidentiality, DoS→availability, Elevation→authorization.

Step 1 — Draw the DFD and trust boundaries​

Data flow diagram with trust boundaries for PII REST API

Figure E: DFD — Internet / Edge / VPC / Data / Identity / Control-plane boundaries; flows F1–F6 carry JWT, PII, and key material.

Assets (say aloud): PII rows, export files, JWTs/refresh tokens, CMK/DEKs, DB credentials, CloudTrail evidence.

Highest-risk flows for interview depth: login/token (F1–F3) and PII export (F4–F5)—bulk disclosure and privilege abuse live here.

Step 2 — STRIDE each critical flow (student script)​

STRIDE run on login and PII export flows

Figure F: Worked STRIDE on Login/Token vs PII Export—threat → mitigation; prioritize export + elevation + info disclosure.

Flow A — Login / token issue & API auth (F1–F3)

STRIDEThreat (what I'd say)Mitigation
S SpoofingStolen / forged JWT; credential stuffingCognito MFA for humans; short-lived access tokens; iss/aud/exp checks; revoke refresh; WAF bot rules on /oauth
T TamperingRewritten JWT claims or request bodyAsymmetric JWT signature verify; TLS end-to-end to ALB; server-side schema validation
R RepudiationUser denies login or API callCognito auth events + app audit (sub, IP, request_id); CloudTrail for admin IdP changes
I Info disclosureToken in logs/URLs; verbose auth errorsNever log bearer tokens; generic 401/403; HttpOnly cookies if browser; short TTL
D DoSPassword spray / Cognito floodWAF rate limit per IP; Cognito advanced security / lockout; Shield
E Elevationrole=admin claim injected or confused clientIgnore unverifiable claims; map groups server-side; deny-by-default authZ

"On spoofing I'd stress: validating a JWT signature is authN—I still need authZ on the resource. That's the zero-trust punchline."

Flow B — PII read & export (F4–F5, KMS F6)

STRIDEThreat (what I'd say)Mitigation
S SpoofingCompromised task role calling RDS/S3 as the APIIMDSv2; no long-lived keys; optional mTLS service-to-service later
T TamperingAttacker alters export object or swaps object keySSE-KMS; bucket versioning; signed checksums; least-privilege s3:PutObject prefix
R RepudiationInsider denies bulk exportApp audit of export jobs + CloudTrail GetObject/Decrypt; immutable log bucket
I Info disclosurePublic bucket, over-broad Select *, Macie-findable dumpsBlock Public Access + SCP; CMK; field minimization; Macie on export bucket; row-level authZ
D DoSExport fan-out exhausts DB / KMSRate limit export API; async job quota; KMS request throttling awareness
E ElevationTask role with s3:* / kms:Decrypt on all keysTable/prefix-scoped IAM; key policy tying decrypt to API role; permission boundaries; Access Analyzer

Cross-boundary quick hits (show breadth without boiling the ocean):

FlowTop STRIDE risksControl highlight
F2 Edge→APIT, DTLS 1.3; WAF OWASP; only ALB SG to tasks
F6 API→KMSI, ECMK key policy; CloudTrail on Decrypt; no kms:*
Secrets pathE, ISecrets Manager rotation; inject at runtime

Step 3 — Prioritize (impact × likelihood)​

PriorityFindingWhy firstControl owner
P0Bulk PII export / public S3 (I + E)Regulatory + brand blast radiusPlatform + app
P0Over-broad task role / CMK (E)One compromise → full datastorePlatform IAM
P1Stolen JWT reuse (S)Common; contained if TTL + revoke workApp + IdP
P1Auth/export DoS (D)Availability + cover for exfilEdge + app
P2Repudiation gaps (R)Hurts IR and compliance evidenceSec + app

"I'd ship P0 controls in M1–M2, not after the pen test. STRIDE that doesn't change the roadmap is theater."

Step 4 — Residual risk (say this—interviewers love honesty)​

Accepted / deferredWhy
Determined insider with break-glassDetect via dual-control + audit; not fully preventable
Nation-state against KMS/HSMOut of v1 scope; AWS shared responsibility + CMK policy
Full field-level encryption everywhereLatency/cost; start with high-risk fields + CMK at store
Partner mTLSAdd when B2B requirement lands

C — Constraints (second C)​

ConstraintDesign response
LatencyVerify JWT locally; cache DEKs carefully with TTL
CostWAF + GuardDuty + Macie on sensitive buckets first—not everywhere day one
Developer velocityGolden path IaC module: private API + WAF + CMK + logging defaults
ComplianceSCPs: deny public S3, deny leaving org, require CloudTrail
Human errorNo admin CI role; OIDC deploy roles; break-glass with MFA + ticket

E — Evolution (phased harden + respond)​

Phased delivery:

PhaseDeliverable
M1Private API + TLS + Cognito JWT + SG baseline
M2WAF + rate limits; CMK on RDS/S3; Secrets Manager
M3Org CloudTrail, GuardDuty, Security Hub CIS; Macie on export bucket
M4Re-run STRIDE after major changes; pen test; dependency scanning in CI
M5Incident runbook: revoke tokens, rotate secrets, isolate task role

Incident snippet I'd mention:

"If we suspect token theft: revoke refresh tokens / user pool sessions, rotate client secrets, invalidate CloudFront if needed, query CloudTrail for kms:Decrypt and data-plane access from that principal, then scope IAM tighter."

Observability / evidence: auth failure rate, WAF blocked counts, anomalous Decrypt geography, GuardDuty findings SLA, Config non-compliance count, export-job audit completeness (repudiation control).


Closing line (interview)​

"So: CloudFront + WAF at the edge, TLS into a private API, Cognito short-lived JWTs with app-layer authZ, PII encrypted with customer-managed KMS, Secrets Manager + least-privilege task roles, and CloudTrail / GuardDuty / Security Hub so we detect misuse. I ran STRIDE on a DFD—prioritizing login/token and PII export—so P0 is bulk disclosure and over-broad IAM, not a random tool checklist. Zero trust means the VPC is not the trust boundary—the verified request is."

Scoring signals​

StrongWeak / red flag
Separates authN vs authZ"Put it in a VPC and use HTTPS"
Defense in depth layersEncryption mentioned with no key ownership
KMS CMK + no PII in logsLong-lived access keys on EC2
Detection + revoke runbookWAF only, no identity story
DFD + STRIDE per flow + P0 rankingNames STRIDE letters with no assets/flows
Explicit residual riskClaims "fully secure" after WAF

Compact outline (if time-boxed to 2 minutes)​

"Edge: CloudFront + WAF OWASP + rate limit. ALB TLS 1.3. API in private subnets, Cognito OIDC short JWTs, authZ in app. RDS/S3 PII with CMK; Secrets Manager rotation; least-privilege task roles. Org CloudTrail, GuardDuty, Security Hub; Macie on exports; SCPs block public S3. STRIDE on DFD: P0 = export info disclosure + IAM elevation; P1 = stolen JWT + DoS; residual = determined insider. Pen test + CI scans; revoke runbook."

24. Weak Answer Example​

Question: "How would you secure a public-facing REST API on AWS handling PII?"

"Use HTTPS, IAM, and enable encryption."

Why weak / red flags: No threat model, no authZ detail, no detection, no secret management, no zero trust—checklist words without architecture.

25. Hands-On Exercise​

  1. Deploy vulnerable-by-design app (e.g., AWS security workshop).
  2. Run STRIDE threat model; document mitigations.
  3. Enable GuardDuty and trigger test finding.
  4. Fix public S3 finding with Block Public Access.
  5. Implement IAM role least privilege; verify Access Analyzer clean.
  6. Enable CloudTrail log file validation.

26. Knowledge Check​

  1. Name STRIDE threats.
  2. What is zero trust?
  3. Difference authentication vs authorization?
  4. KMS CMK vs data key?
  5. Purpose of SCP?
  6. IMDSv2 benefit?
  7. CloudTrail vs Config?
  8. WAF layer in OSI model?
  9. Shared responsibility for Lambda?
  10. Why permission boundaries?
  11. MRK use case?
  12. Defense in depth example?

27. Flashcards​

FrontBack
CIA triadConfidentiality, Integrity, Availability
Zero trustNever trust network location; verify every request
STRIDESpoofing, Tampering, Repudiation, Info disclosure, DoS, Elevation
Least privilegeMinimum permissions required for function
mTLSBoth client and server present certificates
KMS CMKCustomer Master Key wrapping data keys
SCPOrganization policy guardrail on all accounts
GuardDutyAWS threat detection service
CloudTrailAPI audit logging
IMDSv2Session-oriented EC2 metadata access
WAFWeb Application Firewall at L7
Defense in depthMultiple independent security layers

28. Cheat Sheet​

PRINCIPLES
zero trust: verify every call
least privilege IAM
defense in depth
assume breach → detect + contain

AWS IDENTITY
humans: SSO + MFA
workloads: IAM roles (no long-lived keys)
SCPs: org guardrails

ENCRYPTION
transit: TLS 1.2+ (ACM)
rest: KMS (S3, EBS, RDS)
keys: rotation, MRK for DR

DETECTION
CloudTrail (audit)
GuardDuty (threats)
Security Hub (aggregate)
Config (compliance)

THREAT MODEL
diagram flows → STRIDE each → prioritize mitigations

COMMON FAILURES
public S3, open SG, admin CI role, secrets in code

30. References​

Primary sources​

Books​

  • Shostack, A. (2014). Threat Modeling: Designing for Security. Wiley.
  • Allen, E. (2020). AWS Security. O'Reilly.

Distinction​

  • Compliance frameworks (PCI, SOC2) — Audit requirements; map to technical controls.
  • AWS service capabilities — Verify current feature sets and regions.