Assessing Risk with Threat Modelling
This lesson explains how to build a threat model with trust boundaries and STRIDE, prioritise threats by risk, and map them to AWS mitigations, including threats specific to AI systems.
Learning outcomes
After completing this lesson, you will be able to:
- Explain how trust boundaries and STRIDE structure a threat model.
- Prioritise threats by likelihood and impact.
- Map threats, including AI-specific ones, to AWS controls.
Building a threat model
A threat model starts with a diagram of the system: its components, the data flows between them and the trust boundaries where data crosses from one level of trust to another, such as from the internet to the edge, from a VPC to a partner, between accounts, or from untrusted content into an AI model. For each element, the team asks what can go wrong. STRIDE structures the question with six threat categories.
| STRIDE category | Threat | Typical AWS mitigations |
|---|---|---|
| Spoofing | Pretending to be another user or service | Federation, MFA, IAM roles, mutual TLS |
| Tampering | Changing data or code | Signing, integrity validation, Object Lock, least-privilege writes |
| Repudiation | Denying an action | CloudTrail, application audit logs, log file validation |
| Information disclosure | Exposing data | Encryption, least privilege, data perimeters, private networking |
| Denial of service | Making the system unavailable | Shield, AWS WAF, throttling, quotas, Auto Scaling |
| Elevation of privilege | Gaining more permissions | Permissions boundaries, SCPs, separation of duties |
STRIDE
Prioritising and mitigating
Each threat is rated by likelihood and impact, so effort goes to the highest risks first; the remaining risks are explicitly accepted, transferred or scheduled. Mitigations are mapped to preventive, detective and responsive controls and tracked like other work. The model is a living document that is revisited when the design changes, and tools such as Threat Composer help teams create and share models. The Well-Architected Framework security pillar provides a checklist of controls to consider.
Threats specific to AI systems
- Prompt injection, direct or hidden in retrieved documents, emails or web pages, that makes the model ignore its instructions.
- Excessive agency, where an agent's tools can do more damage than its task needs.
- Sensitive data disclosure through answers or logs.
- Mitigations: guardrails with prompt attack filters, least-privilege tools, AgentCore Policy, human approval and masked logging.
A partner integration
A logistics company will let 200 partners upload shipment files through an SFTP endpoint, which a pipeline loads into its order database.
The threat model shows trust boundaries at the SFTP endpoint and between the upload bucket and the pipeline. High-rated threats are a partner spoofing another partner, a malicious file that tampers with orders, and a partner denying that it uploaded a file.
Mitigations follow: Transfer Family with per-partner keys and home directories, validation and quarantine before loading, S3 data events and immutable logs for non-repudiation, and per-partner rate limits. A low-rated threat, partners uploading duplicate files, is accepted and handled by idempotent loading.
Which STRIDE category does 'a user denies approving a payment' belong to, and which control addresses it?
Show answer
Repudiation. Tamper-evident audit logs that record the authenticated identity, such as CloudTrail with log file validation, address it.
Exam Tips
Remember for the exam
- Identify threats systematically at design time: threat modelling with STRIDE across trust boundaries.
- Prioritise by likelihood and impact, and record accepted risks explicitly.
- Repudiation threats: tamper-evident logs that attribute actions to identities.
- AI threats: prompt injection and excessive agency; limit tools and add approval.