AWS Builder Center

Why Cloud Breaches Happen at the Seams: A First-Principles Guide to AWS Shared Responsibility and Trust Boundaries

Where AWS Stops and Your Pager Starts: Threat Modeling Trust Boundaries Across IaaS, Container, and Abstract Services



AWS Security from First Principles, Part 1: How to Draw Trust Boundaries and Map Shared Responsibility Before Writing a Single IAM Policy



Hypothetical scenario: A fintech team migrates an internal PostgreSQL database to Amazon RDS, passes their SOC 2 infrastructure audit using inherited AWS compliance reports, and suffers a full data breach three weeks later because an over-permissive Lambda execution role sat in the same AWS account with zero resource boundary. Compliance checks whether a control exists on paper; attackers exploit the unmarked seams where your responsibility begins. You cannot secure a system until you know exactly where your jurisdiction starts and where trust changes hands.


The Problem: What Security Question Are We Actually Solving?

Every cloud architecture review eventually collides with the same two foundational questions: Who owns the risk at this layer of the stack? and Where does a request cross from a zone we do not trust into a zone we do?

Most engineers jump straight to controls. They enable encryption checkboxes, attach managed policies, or deploy web application firewalls without first mapping the system. When you add controls before defining boundaries, you spend half your engineering budget defending components your cloud provider already secures, while leaving wide-open gaps at the handoff points only you can configure.

Before evaluating a single identity policy, network rule, or encryption key, a security engineer must solve a simpler problem: defining jurisdiction (who secures what) and privilege transitions (where untrusted input meets trusted execution).


The First Principle: Jurisdiction and Trust Boundaries

Strip away every cloud vendor term and security comes down to two first principles: shared jurisdiction and trust boundaries.

Think of cloud infrastructure like leasing a floor in a commercial high-rise building. The landlord pours the concrete foundation, maintains the structural steel, guards the lobby entrance, and keeps the water mains pressurized. You lease the tenth floor. The landlord's badge system in the lobby does not stop a visitor you invited upstairs from walking into your unlocked file room. The physical building has one set of owners; the rooms, safes, and guest badges inside your leased floor have another.

A trust boundary is any line drawn across a system where the level of trustor the party responsible for enforcing it changes. Whenever data, a network packet, or an identity credential crosses a trust boundary, the receiving side must authenticate the caller, authorize the action, and validate the payload.

Threat modeling is the structured engineering practice of finding those boundaries and asking how they fail before an attacker does. In plain language, effective threat modeling answers four questions popularized by Adam Shostack:

  1. What are we working on? Map the components, data stores, actors, and data flows, then draw a line everywhere trust changes.
  1. What can go wrong? Examine every trust boundary for Spoofing (impersonating an identity), Tampering (modifying data in transit or at rest), Repudiation (performing actions without an audit trail), Information Disclosure (reading unauthorized data), Denial of Service (exhausting availability), and Elevation of Privilege (gaining unauthorized permissions) collectively known as STRIDE.
  1. What are we going to do about it? Assign each threat a clear outcome: mitigate it with a control, transfer the risk, accept the risk within defined thresholds, or eliminate the feature.
  1. Did we do a good enough job? Verify that the controls hold up as the architecture changes.
First Principle: Security failures rarely happen inside a single well-understood component; they happen at the boundaries where one component, team, or provider hands off trust to another.

The AWS Mechanism: How AWS Implements Jurisdiction and Boundaries

AWS translates these first principles into two operational frameworks: the AWS Shared Responsibility Model (which defines jurisdiction across the stack) and Data Perimeters within the AWS Well-Architected Security Pillar (which enforce trust boundaries across identities, resources, and networks).


1. The Shifting Line of the Shared Responsibility Model

AWS divides security into Security of the Cloud (AWS's responsibility) and Security in the Cloud (the customer's responsibility). AWS secures the physical data centers, hardware, global networking, and virtualization hypervisors (such as the AWS Nitro System).

However, the boundary between AWS and the customer is not static. It shifts upward or downward depending on the service category you select:

  • Infrastructure Services (IaaS): Services such as Amazon EC2 and Amazon EBS. AWS stops at the virtualization layer. You own the guest operating system, OS patching, host firewall configuration, network routing, application code, IAM permissions, and data encryption.
  • Container Services: Services such as Amazon RDS, Amazon ECS on AWS Fargate, and Amazon Elastic Beanstalk. AWS manages the underlying OS and database engine patching, while you remain responsible for network zoning (Security Groups, subnets), database user permissions, encryption configuration, and data governance.
  • Abstract Services: High-level storage, database, and serverless services such as Amazon S3, Amazon DynamoDB, and AWS Lambda. AWS operates the infrastructure, operating system, and service platform. You do not patch servers, but you own resource configurations, access policies, endpoint restrictions, and data classification.
AWS further classifies compliance controls into three types:

  • Inherited Controls: Fully inherited from AWS, such as physical data center security and environmental safeguards.
  • Shared Controls: AWS and the customer each secure their side of the same discipline. For example, in Patch Management, AWS patches host systems and RDS engine versions, while you patch your EC2 guest operating systems and application dependencies.
  • Customer-Specific Controls: Entirely yours, such as data classification, IAM least-privilege policies, and application-level input validation.

2. Enforcing Trust Boundaries on AWS: Accounts and Data Perimeters

In the AWS Well-Architected Framework Security Pillar ( SEC01-BP01  and  SEC01-BP07 ), AWS recommends aligning threat model trust boundaries with concrete cloud boundaries.


Plaintext
+-------------------------------------------------------------------------+
| AWS ORGANIZATION (Governance Boundary) |
| Enforced via: SCPs (Identity Outbound) + RCPs (Resource Inbound) |
| + Declarative Policies (Service Baseline Config) |
| |
| +-------------------------------+ +-----------------------------+ |
| | WORKLOAD ACCOUNT A (Prod) | | WORKLOAD ACCOUNT B (Dev) | |
| | Hard Isolation Boundary | | Hard Isolation Boundary | |
| | | | | |
| | +-------------------------+ | | Cannot access Account A | |
| | | VPC / VPC Endpoints | | | resources without explicit | |
| | | (Network Boundary) | | | cross-account trust + | |
| | +-------------------------+ | | satisfying Org RCPs/SCPs | |
| +-------------------------------+ +-----------------------------+ |
+-------------------------------------------------------------------------+
| AWS GLOBAL INFRASTRUCTURE ("Security OF the Cloud") |
| Physical Facilities, Hardware, Global Network, Nitro System |
+-------------------------------------------------------------------------+

To enforce these boundaries at scale, AWS defines a Data Perimeter built around three preventive questions:

  1. Identity Boundary (Are these my trusted identities?): Enforced using Resource Control Policies (RCPs) and resource-based policies combined with the  aws:PrincipalOrgID  condition key.
  1. Resource Boundary (Are these my trusted resources?): Enforced using Service Control Policies (SCPs) and VPC Endpoint Policies combined with  aws:ResourceOrgID  so your principals cannot exfiltrate data to external S3 buckets or external accounts.
  1. Network Boundary (Is this my expected network?): Enforced using condition keys such as  aws:SourceIp ,  aws:SourceVpc ,  aws:SourceVpce , and  aws:VpceOrgID .
A critical recent evolution in AWS governance is the introduction of Resource Control Policies (RCPs) and Declarative Policies in AWS Organizations. Historically, establishing a resource-centric perimeter required attaching custom policies to every individual S3 bucket, KMS key, or SQS queue or relying exclusively on SCPs, which only restrict principals inside your organization. RCPs allow you to centrally enforce preventive, deny-only guardrails directly on supported resources across member accounts from AWS Organizations, restricting external principals even if an engineer in a member account accidentally attaches a  "Principal": "*"  resource policy. Meanwhile, Declarative Policies let you centrally declare and lock baseline configuration states for supported AWS services (such as enforcing EC2 Block Public Access for AMIs or IMDSv2 defaults) across your organization so configurations cannot drift, even if new APIs are added later.


Decision Table: Choosing Your AWS Boundary Mechanism

When you identify a trust boundary in your threat model, use this decision matrix to select the right AWS enforcement mechanism.

Boundary Control
What It Restricts
Direction of Control
When to Use It
Key Limitation to Remember
AWS Account
Blast radius, billing, quotas, default IAM visibility
All-around workload isolation
Separating production from non-production or isolating workloads with distinct threat profiles ( SEC01-BP01 )
Does not block a developer from manually adding a public or cross-account resource policy inside the account
Service Control Policy (SCP)
IAM users and roles inside your AWS Organization
Outbound from your identities ( Identity → Resource )
Preventing your own principals from disabling security tools or writing to untrusted external resources
Does not apply to external principals accessing your resources via resource-based policies, or to the management account
Resource Control Policy (RCP)
Supported resources inside your AWS Organization
Inbound to your resources ( Caller → Resource )
Enforcing an organization-wide resource perimeter so external principals cannot access your resources ( aws:PrincipalOrgID )
Applies only to supported services (such as S3, STS, KMS, SQS, Secrets Manager); does not apply to the management account or service-linked roles
VPC Endpoint Policy
Traffic traversing a specific VPC Endpoint
Transit across the network conduit ( VPC → AWS Service )
Ensuring your private network can only be used by your org's principals to reach your org's resources
Only inspects traffic that actually routes through that specific VPC endpoint
Declarative Policy
Service-level baseline settings across an AWS Organization
Configuration state of supported AWS services
Enforcing always-on baseline posture (e.g., blocking public AMI sharing or enforcing IMDSv2) regardless of API path
Scoped to specific supported service settings rather than arbitrary IAM actions

Failure Modes: 3 Real-World Mistakes and Why They Happen

1. Mistaking "Managed Service" for "Managed Security Configuration"

Teams moving from EC2 to Amazon S3, Amazon RDS, or Amazon Bedrock often assume that because AWS manages the underlying platform, the service is secure out of the box. They skip threat modeling data access paths. While S3 now enables Block Public Access and server-side encryption ( SSE-S3 ) by default on new buckets, AWS cannot know which IAM roles inside your account should read sensitive payroll objects versus public marketing assets. Over-scoped IAM roles inside the same account bypass network firewalls entirely by calling the AWS API control plane directly.


2. Relying on SCPs Alone to Stop Inbound Resource Sharing

A common architectural mistake is writing an SCP to block external access to S3 buckets or KMS keys and assuming the organization is sealed. SCPs only constrain principals that belong to your AWS Organization. If a developer attaches a bucket policy granting read access to an external AWS account—or if an external attacker assumes a misconfigured role—an SCP on your account will not block that external principal from reading the bucket. Stopping inbound external access at the organization level requires Resource Control Policies (RCPs), S3 Block Public Access, and detective verification with IAM Access Analyzer.


3. Breaking AWS Service Integrations with Overly Rigid Perimeter Policies

When engineers first deploy RCPs or SCPs using  "aws:PrincipalOrgID"  or  "aws:SourceVpce" , they frequently break AWS services that act on their behalf—such as AWS CloudTrail writing logs to S3, AWS Backup snapshotting volumes, or Amazon EventBridge invoking targets. Why? Because AWS service principals do not reside inside your organization's  PrincipalOrgID , and their backend calls do not originate from your VPC endpoint. A production-grade data perimeter must explicitly account for trusted AWS service calls using global condition keys like  aws:PrincipalIsAWSService  and  aws:ViaAWSService .


Exam Trap: 2 Conceptual Traps to Watch For

Trap 1: Confusing "Inherited Compliance" with "Workload Compliance"

When a scenario mentions that an organization requires PCI DSS or HIPAA compliance on AWS, candidates often look for an option where AWS "certifies" the customer's workload. Conceptually, AWS Artifact provides AWS's own audit reports (such as SOC 1/2/3, PCI DSS, and ISO 27001) so you can verify the controls you inherit from AWS (Security of the Cloud). However, compliance is never 100% inherited. Even on serverless or abstract services, you must independently validate and document your customer-specific controls (IAM policies, key rotation, logging, data classification) to achieve workload compliance.


Trap 2: Treating a VPC as the Ultimate Boundary for Abstract Services

In traditional data centers, the network firewall is the primary trust boundary. On AWS, services like S3, DynamoDB, STS, and KMS live on the AWS public service network—outside your VPC—even when accessed privately via VPC Endpoints. Putting an application inside a private subnet does not protect an S3 bucket if that bucket's resource policy or an IAM role's stolen credentials can be used from outside the VPC. On AWS, identity and resource policies are perimeter controls on par with network controls.


Interview Corner: 3 Hiring Manager Questions and Model Answers

Q1: "We use serverless and managed services almost exclusively Lambda, DynamoDB, and S3. How does our threat model change compared to an EC2-heavy architecture?"

Model Answer: "Moving to abstract and container services shifts our operational burden upward in the Shared Responsibility Model, eliminating OS patching, hypervisor hardening, and host-level agent management. However, it concentrates our threat surface into three areas: identity permissions, service-to-service event injection, and data perimeter configuration. In a serverless threat model, every Lambda execution role is its own micro-perimeter. Instead of spending time threat-modeling SSH bastion hosts or OS kernel exploits, I focus on whether Lambda Function A shares an overly broad IAM role with Function B, whether untrusted event payloads (from API Gateway, SQS, or S3 events) can trigger downstream injection, and whether RCPs and VPC Endpoint policies prevent credential exfiltration outside our organization boundary."
Q2: "What is the difference between a Service Control Policy (SCP) and a Resource Control Policy (RCP), and why would an enterprise need both?"

Model Answer: "SCPs and RCPs are complementary halves of an organizational data perimeter. An SCP is identity-centric: it restricts the maximum permissions of IAM users and roles that belong to accounts inside our AWS Organization. An RCP is resource-centric: it restricts who can access supported resources inside our organization, regardless of which account the caller belongs to. If an engineer accidentally attaches a resource policy with  Principal: '*'  to an S3 bucket, an SCP will not stop an external AWS account from reading that bucket because the caller is outside our organization. An RCP enforcing  aws:PrincipalOrgID  blocks that external caller at the resource boundary, while an SCP prevents our own internal roles from writing data to an external attacker's bucket."
Q3: "Walk me through how you start a threat model for a new AWS workload when the engineering team only has 45 minutes."

Model Answer: "I use Shostack's four-question framework scoped to the AWS Well-Architected Security Pillar ( SEC01-BP07 ). In the first 15 minutes, we whiteboard the data flow diagram and explicitly draw dotted lines at every trust boundary: public internet to CloudFront/ALB, compute role to data store, cross-account API calls, and CI/CD deployment roles. In the next 20 minutes, we apply STRIDE strictly to those boundary crossings asking how an attacker could spoof the caller, tamper with the payload, or elevate privileges if a credential at that boundary leaks. In the final 10 minutes, we map the highest-impact risks to concrete AWS controls Clarifying which risks AWS handles via the Shared Responsibility Model and assigning action items for the ones we own."

Key Takeaways

  • AWS secures the cloud's foundation, but you secure every door, badge, and window you configure inside it.
  • A security control without a threat model is an expensive guess; draw your trust boundaries before you write your policies.
  • In the cloud, identity, resource, and network boundaries form a single perimeter SCPs guard what your identities can touch, while RCPs guard who can touch your resources.

References

  1. AWS Compliance Shared Responsibility Model:  https://aws.amazon.com/compliance/shared-responsibility-model/ 
  1. AWS Well-Architected Framework Security Pillar ( SEC01-BP07 : Identify threats and prioritize mitigations using a threat model):  https://docs.aws.amazon.com/wellarchitected/latest/security-pillar/sec\_securely\_operate\_threat\_model.html 
  1. AWS Security Blog How to approach threat modeling:  https://aws.amazon.com/blogs/security/how-to-approach-threat-modeling/ 
  1. AWS Organizations User Guide Resource control policies (RCPs):  https://docs.aws.amazon.com/organizations/latest/userguide/orgs\_manage\_policies\_rcps.html 
  1. AWS Security Blog Establishing a data perimeter on AWS:  https://aws.amazon.com/blogs/security/establishing-a-data-perimeter-on-aws/ 
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article