Skip to content

Commit 68fb348

Browse files
committed
initial
0 parents  commit 68fb348

File tree

20 files changed

+14528
-0
lines changed

20 files changed

+14528
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.txt
2+
*.json
3+
bin

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# EC2 Security Group Tool
2+
3+
This app uses the [AWS Go SDK](https://github.com/aws/aws-sdk-go/wiki/Getting-Started-Credentials) to perform some basic operations.
4+
5+
Currently, it queries existing security groups, listing the total number of Incoming IP Permissions, Outgoing IP Permissions and the EC2 Instances using them. Additionally, it outputs an AWS CLI to delete unused security groups.
6+
7+
This can be run with the [shared AWS credentials file](https://github.com/aws/aws-sdk-go/wiki/Getting-Started-Credentials) (more info at [configuring the aws cli](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html))
8+
9+
## Examples
10+
11+
Using the default profile
12+
13+
```
14+
awstool
15+
```
16+
17+
Using a profile
18+
19+
```
20+
AWS_PROFILE=bespoke awstool
21+
```
22+
23+
## output
24+
25+
```bash
26+
$ AWS_PROFILE=bespoke awstool
27+
id name in out i
28+
sg-5e866b36 quicklaunch-1 2 0 0
29+
tcp 22- 22 0.0.0.0/0
30+
tcp 80- 80 0.0.0.0/0
31+
sg-4bd5b526 cmdline-test 1 0 0
32+
tcp 80- 80 0.0.0.0/0
33+
sg-dc876ab4 default 3 0 0
34+
icmp -1- -1 all
35+
tcp 0-65535 all
36+
udp 0-65535 all
37+
sg-094e6562 doge-launch1 1 0 0
38+
tcp 22- 22 0.0.0.0/0
39+
sg-d7406bbc lite-launch-1 1 0 0
40+
tcp 22- 22 0.0.0.0/0
41+
sg-96cdb6fe pega 4 0 0
42+
tcp 80- 80 0.0.0.0/0
43+
tcp 3389-3389 0.0.0.0/0
44+
tcp 9090-9090 0.0.0.0/0
45+
tcp 9443-9443 0.0.0.0/0
46+
aws ec2 delete-security-group --group-id sg-5e866b36 --dry-run
47+
aws ec2 delete-security-group --group-id sg-4bd5b526 --dry-run
48+
aws ec2 delete-security-group --group-id sg-dc876ab4 --dry-run
49+
aws ec2 delete-security-group --group-id sg-094e6562 --dry-run
50+
aws ec2 delete-security-group --group-id sg-d7406bbc --dry-run
51+
aws ec2 delete-security-group --group-id sg-96cdb6fe --dry-run
52+
```

pkg/darwin/amd64/github.com/aws/aws-sdk-go/aws.a

Lines changed: 813 additions & 0 deletions
Large diffs are not rendered by default.
68.4 KB
Binary file not shown.
64.8 KB
Binary file not shown.

pkg/darwin/amd64/github.com/aws/aws-sdk-go/aws/credentials.a

Lines changed: 595 additions & 0 deletions
Large diffs are not rendered by default.
36.1 KB
Binary file not shown.

pkg/darwin/amd64/github.com/aws/aws-sdk-go/internal/protocol/ec2query.a

Lines changed: 493 additions & 0 deletions
Large diffs are not rendered by default.
Binary file not shown.

pkg/darwin/amd64/github.com/aws/aws-sdk-go/internal/protocol/rest.a

Lines changed: 596 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)