认证考题 | 使用 Amazon VPC SG 控制应用层之间的网络流量


  题目

A company is reviewing a recent migration of a three-tier application to a VPC. The security team discovers that the principle of least privilege is not being applied to Amazon EC2 security group ingress and egress rules between the application tiers.
What should a solutions architect do to correct this issue?
A. Create security group rules using the instance ID as the source or destination.
B. Create security group rules using the security group ID as the source or destination.
C. Create security group rules using the VPC CIDR blocks as the source or destination.
D. Create security group rules using the subnet CIDR blocks as the source or destination.

  参考答案

B

  参考解析

技巧:排除明显错误选项,在没有明显错误的选项中选择最合理的选项。

A. 不正确。使用实例ID作为源或目标创建安全组规则。实例ID与特定实例绑定,不便于管理和扩展,当实例变化时规则需频繁修改,无法有效遵循最小权限原则,该选项不正确。
B. 正确。使用安全组ID作为源或目标创建安全组规则。通过引用安全组ID,可以精确控制与特定安全组关联实例间的流量,便于管理且能确保只允许必要流量在应用程序各层流动,符合最小权限原则,该选项正确。
C. 不正确。使用VPC的CIDR块作为源或目标创建安全组规则。VPC CIDR块范围过大,会导致过多流量被允许,无法实现最小权限控制,该选项不正确。
D. 不正确。使用子网的CIDR块作为源或目标创建安全组规则。子网CIDR块包含的实例较多,使用它会允许过多流量,不能精确控制流量,不符合最小权限原则,该选项不正确。