使用对等 VPC 安全组进行启动配置
Using peered VPC security groups for Launch Configuration
我有两个 VPC,VPC-A 和 VPC-B,它们处于活动状态。
VPC-A 的安全组 'Bastion-SG' 具有来自我的本地网络的入站规则。 VPC-B 的安全组 'Support-SG' 对 VPC-B 中的其他安全组具有安全组规则。
堡垒位于 VPC-A 的 ASG 中,我想为这台 EC2 机器提供 Bastion-SG 和 Support-SG,以便它可以从本地访问 VPC-B 资源(通过对等互连)。
但是,启动配置不允许这样做:
All security groups should have the same VPC id (Service: AmazonAutoScaling; Status Code: 400; Error Code: ValidationError
对我来说 link 两个安全组到我的启动配置的最佳方法是什么?
我可以将所有安全组规则从 Support-SG 添加到 Bastion-SG,因为规则本身可以引用对等 VPC 组。
但是 因为 VPC 是不同堆栈的一部分,所以我真的更愿意将安全组分开。
我有什么方法可以跨 VPC link 这些安全组吗?
I want to assign a SG from VPC-B to my launch configuration in VPC-A
遗憾的是,您不能这样做。 SG 只能在创建它的 VPC 中使用。来自 AWS 文档:
A security group can only be used in the VPC that you specify when you create the security group.
只能在其他VPC中引用:
If your VPC has a VPC peering connection with another VPC, a security group rule can reference another security group in the peer VPC
我有两个 VPC,VPC-A 和 VPC-B,它们处于活动状态。
VPC-A 的安全组 'Bastion-SG' 具有来自我的本地网络的入站规则。 VPC-B 的安全组 'Support-SG' 对 VPC-B 中的其他安全组具有安全组规则。
堡垒位于 VPC-A 的 ASG 中,我想为这台 EC2 机器提供 Bastion-SG 和 Support-SG,以便它可以从本地访问 VPC-B 资源(通过对等互连)。
但是,启动配置不允许这样做:
All security groups should have the same VPC id (Service: AmazonAutoScaling; Status Code: 400; Error Code: ValidationError
对我来说 link 两个安全组到我的启动配置的最佳方法是什么?
我可以将所有安全组规则从 Support-SG 添加到 Bastion-SG,因为规则本身可以引用对等 VPC 组。
但是 因为 VPC 是不同堆栈的一部分,所以我真的更愿意将安全组分开。
我有什么方法可以跨 VPC link 这些安全组吗?
I want to assign a SG from VPC-B to my launch configuration in VPC-A
遗憾的是,您不能这样做。 SG 只能在创建它的 VPC 中使用。来自 AWS 文档:
A security group can only be used in the VPC that you specify when you create the security group.
只能在其他VPC中引用:
If your VPC has a VPC peering connection with another VPC, a security group rule can reference another security group in the peer VPC