创建安全组和添加 inbound/outbound 规则所需的 AWS IAM 策略权限是什么?

What are the required AWS IAM policy permissions to create security group and adding inbound/outbound rules?

我正在编写 IAM 策略来部署 EC2 实例以及使用 Terraform 创建安全组,我不想授予 EC2 完全访问权限。遵循最小权限原则,创建安全组并添加入站和出站规则所需的权限是什么?

IAM actions for EC2 的列表应该是一个有用的参考。

创建安全组的动作是CreateSecurityGroup. Note: that action alone will not suffice if you need to create ingress and egress rules on the security group. For those, you will need to add AuthorizeSecurityGroupIngress and AuthorizeSecurityGroupEgress