
Your AWS VPC is a Castle Without Walls (Enter Zero Trust)
Relying on a VPN and a private subnet gives you a false sense of security against stolen credentials. Learn how to abandon the outdated castle-and-moat model and build a true Zero Trust architecture on AWS using identity, micro-segmentation, and strict data perimeters.
The Most Dangerous Word in Cloud Security is "Internal"
For a decade, we built cloud networks like medieval castles. We dug a deep moat (the firewall), built thick walls (the VPC), and installed a massive drawbridge (the VPN).
The logic was simple. If you are outside the castle, you are a threat. If you are inside, you are trusted.
That model is broken.
The 2019 Capital One breach proved exactly why. A hacker exploited a Server Side Request Forgery (SSRF) vulnerability. But the catastrophic damage occurred because a trusted "internal" EC2 instance, using the legacy IMDSv1 metadata service and an over-permissive IAM role, was allowed to query highly sensitive S3 buckets. The system trusted the internal network implicitly.
According to industry reports, the vast majority of breaches now involve compromised credentials. Attackers do not break in anymore. They log in.
To secure a modern AWS architecture, you must abandon the castle. You must adopt Zero Trust, aligning with frameworks like NIST SP 800-207. Identity becomes your primary control plane, supported by deep network segmentation and continuous verification.
Pillar 1: Verify Explicitly (Identity & Credential Hygiene)
Zero Trust operates on a single assumption. The network is already compromised.
Instead of relying on IP addresses, you rely on cryptographic proof of identity for both humans and machines.
- Human Identity: Stop creating long-lived IAM users with static access keys. Deploy AWS IAM Identity Center with phishing-resistant MFA. Issue short-lived STS credentials exclusively.
- Workload Identity: EC2 instances must use IMDSv2, which requires session tokens and eliminates SSRF vulnerabilities. Containers should use EKS Pod Identity.
- User-to-App Access: While VPNs still have their place for complex routing, you can replace broad VPN access for web applications with AWS Verified Access. It evaluates identity and device health in real-time for HTTP/HTTPS requests.
- Kill the Bastion Host: Stop opening port 22 to the internet. Use AWS Systems Manager (SSM) Session Manager for secure, auditable shell access tied directly to IAM.
Pillar 2: Micro-Segmentation & The Data Perimeter
If a web server is compromised, it should not automatically have network access to the database just because they share a VPC. The strongest isolation boundary in AWS is the Account, which is why a multi-account strategy via AWS Control Tower is foundational. Inside those accounts, you must build a Data Perimeter.
- Security Group Referencing: A database security group should not allow traffic from a broad
10.0.0.0/16CIDR block. It should only allow ingress from the specific Web Server Security Group ID (e.g.,sg-0123456789). - VPC Endpoints & PrivateLink: Keep traffic off the public internet. Use Gateway Endpoints for S3 and DynamoDB, and Interface Endpoints (PrivateLink) for other services. Crucially, attach VPC Endpoint Policies to restrict exactly who can use them.
- VPC Lattice: For complex microservices, Amazon VPC Lattice connects and monitors communication at the application layer, applying identity-based policies regardless of underlying network topology.
The Data Perimeter in Action:
You can use a VPC Endpoint Policy to ensure that even if someone steals valid credentials, they cannot extract data unless they are inside your specific AWS Organization.
You can use a VPC Endpoint Policy to ensure that even if someone steals valid credentials, they cannot extract data unless they are inside your specific AWS Organization.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "s3:*",
"Resource": "*",
"Condition": {
"StringEquals": {
"aws:PrincipalOrgID": "o-xxxxxxxxxx"
}
}
}
]
}
Pillar 3: Assume Breach (Encryption, Detection, Response)
"Assume breach" means limiting the blast radius and guaranteeing that stolen data is useless. It also means you need eyes on the inside.
- Encryption Everywhere: AWS KMS handles encryption at rest. But in a hostile network, you must enforce TLS 1.2+ for all traffic in transit, utilizing mTLS (mutual TLS) for service-to-service authentication.
- Verification Telemetry: "Always verify" requires evidence. You must enable an AWS Organizations-level CloudTrail to log every API call.
- Intelligent Detection: Feed those logs into Amazon GuardDuty and AWS Security Hub to detect anomalous behavior, like a developer role suddenly spinning up GPU instances in a new region.
The Architectural Trade-offs
Zero Trust is not free.
Implementing Amazon VPC Lattice, Verified Access, and dozens of Interface Endpoints introduces new architectural complexity. It also introduces cost. These services bill hourly per endpoint, plus data processing charges per gigabyte.
You must weigh the cost of the architecture against the cost of a breach.
The Brownfield Migration Roadmap
You do not need a massive budget to start. You just need sequencing. Recently, while running a hands-on lab on EC2 metadata security to demonstrate cloud vulnerabilities, I showed a junior engineer how quickly a legacy environment falls apart. We locked it down in phases.
| Phase | Focus Area | Key Actions |
|---|---|---|
| Phase 1: Foundations | Identity & Access | Enforce MFA, deploy IAM Identity Center, mandate IMDSv2 on all EC2 instances, remove unused IAM roles using IAM Access Analyzer. |
| Phase 2: Network Baselines | Segmentation | Remove Bastion hosts for SSM Session Manager, implement Security Group referencing, deploy AWS Network Firewall. |
| Phase 3: The Data Perimeter | Endpoints & Guardrails | Deploy VPC Endpoints with strict policies, implement Service Control Policies (SCPs) blocking public S3 buckets, enforce TLS in transit. |
| Phase 4: Advanced Zero Trust | Application Layer | Implement AWS Verified Access for corporate apps, deploy VPC Lattice for microservice-to-microservice ABAC (Attribute-Based Access Control). |
5 Things to Do This Week
- Run IAM Access Analyzer to find and delete roles that have not been used in 90 days.
- Update your EC2 launch templates to require IMDSv2.
- Replace one internet-facing Bastion host with SSM Session Manager.
- Verify that your S3 Gateway Endpoints have a policy restricting access to your specific buckets.
- Turn on Amazon GuardDuty for intelligent threat detection.
Identity is the new perimeter. Defend it ruthlessly.

From castle walls to verified identities: the shift behind Zero Trust on AWS.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article