- Newest
- Most votes
- Most comments
Hello.
VPC peering allows you to reference security groups across accounts if the VPCs are in the same region.
If the VPCs of Account A and Account B are in the same region, it should be possible to configure an inbound rule in the security group of the RDS in Account B to reference the security group of the VPN Client's ENI in Account A.
https://docs.aws.amazon.com/vpc/latest/peering/vpc-peering-security-groups.html
The peer VPC can be a VPC in your account, or a VPC in another AWS account. To reference a security group that is in another AWS account but the same Region, include the account number with the ID of the security group. For example, 123456789012/sg-1a2b3c4d.
If the regions are different, security groups cannot be referenced, so the CIDR must be allowed in the security group's inbound rules.
In this case, if you create a subnet for ClientVPN and allow only the CIDR of that subnet in the security group, you can narrow the access range more than by allowing the CIDR of the VPC source.
Relevant content
asked 3 years ago
- AWS OFFICIALUpdated 4 years ago

Thank you very much for the answer. Unfortunately, our resource on the far side will be in a different region but I did not know about the account id as part of the security group so this is great information. Thank you.