【发布时间】:2017-03-15 08:16:45
【问题描述】:
有没有办法描述特定 VPC 中的安全组?
这是我要运行的内容:
aws ec2 describe-security-groups --group-name "<group-name>" --filter Name=vpc-id,Values=<my-vpc-id>
但它返回此错误:
A client error (VPCIdNotSpecified) occurred when calling the DescribeSecurityGroups operation: No default VPC for this user
感谢您的帮助,
谢谢
【问题讨论】:
-
再次查看文档后,如果我们要查询非默认 VPC,似乎需要通过“group-id”进行描述。参考:docs.aws.amazon.com/cli/latest/reference/ec2/…
-
您是在问如何描述一个特定安全组,还是给定VPC中的所有安全组?如果是特定的安全组,您希望提供该组的名称还是 ID?
标签: amazon-web-services amazon-cloudformation aws-cli aws-security-group