Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>THis would need some basic scripting and AWS SDK. you can do this with pretty much all the SDK provided by AWS.</p> <p>I would prefer <code>AWS-CLI</code> as i already have it installed and configured. This is what I would do:</p> <ol> <li>list all the SGs with <a href="http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-security-groups.html" rel="nofollow">describe-security-groups</a></li> <li>Install <a href="http://stedolan.github.io/jq/download/linux32/jq" rel="nofollow">jq</a> (the Json parser for BASH)</li> <li>Pull the SG IDs (check <a href="http://xmodulo.com/2013/05/how-to-parse-json-string-via-command-line-on-linux.html" rel="nofollow">this</a> for <code>jq</code> syntax)</li> <li>Once you have the SG IDs, run <a href="http://docs.aws.amazon.com/cli/latest/reference/ec2/delete-security-group.html" rel="nofollow">delete-security-group</a> by usig a <code>for</code> loop.</li> </ol> <p>This is fairly simple and straight forward way of doing wat you want to do. THis can be done by any of the AWS SDKs. </p> <p>These are just a couple of commands which can be constructed into a Bash script, provided:</p> <ol> <li>You have <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html" rel="nofollow">aws-cli</a> installed and configured</li> <li>you have <code>jq</code> installed on your system.</li> </ol> <p>If you already have some other AWS SDK installed, then you are better off with that as java/python/ruby...etc all have their own inbuilt way of parsing JSON/HASH/DataStructure.</p> <p>Hope this helps.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload