Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I know that you can set Security Group rules with ec2-authorize and ec2-revoke. How do you view the rules of a given security group?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

All commands available within the Amazon EC2 API Tools are documented in the Amazon EC2 Command Line Reference - informational commands usually follow the ec2-describe-* pattern, and the one you are looking for is ec2-describe-group:

Returns information about security groups in your account. This includes both EC2 security groups and VPC security groups. For information about how the two types of groups differ, go to Security Groups in the Amazon Virtual Private Cloud User Guide.

share|improve this answer
    
Thanks for the great link. –  kalaracey May 13 '12 at 13:53
    
hi Steffen, would you provide a full command-line example, including which environment variables to specify? –  Seamus Abshere Jul 20 '12 at 20:16
~$ ec2-describe-group |grep GROUP

will show the list of all security groups

~$ ec2-describe-group |grep GROUP|cut -f4

to get only security groups names

~$ ec2-describe-group|grep <YOUR_GROUP_NAME>

to get the policies for that sec group

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.