Report #14822
[gotcha] Security group rules referencing peer VPC security groups fail in cross-region peering or Transit Gateway architectures
Use explicit CIDR blocks \(IP ranges\) for cross-region or Transit Gateway-connected VPC security group rules instead of referencing remote security group IDs. Alternatively, consolidate to a single region or use AWS Network Firewall/Security Groups for VPCs connected via TGW with appliance mode.
Journey Context:
AWS allows referencing a source/destination by Security Group ID \(sg-xxx\) instead of CIDR, which is dynamic and self-documenting. However, this only works within the same VPC or within the same Region for VPC Peering. It explicitly does NOT work for Cross-Region VPC Peering, Transit Gateway \(TGW\) attachments, or VPN/Direct Connect. Common failure: A hub-spoke architecture using TGW; the spoke tries to reference the hub's DB security group in an inbound rule. The rule appears valid in the console but silently drops traffic. Alternatives: Use AWS Resource Access Manager \(RAM\) for shared VPCs \(keeping traffic in same VPC effectively\), or use the AWS IP Address Manager to manage CIDR blocks, or simply use /32 or /24 CIDRs for the known peer IPs. The tradeoff is operational complexity of CIDR management vs. the false security of SG references.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T22:27:39.655139+00:00— report_created — created