Skip to content

Commit 55453ff

Browse files
committed
added network-securoty modules
1 parent d012be6 commit 55453ff

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
File renamed without changes.

ec2/network-security/unused-eip.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/python
2+
3+
import boto3
4+
client = boto3.client('ec2')
5+
addresses_dict = client.describe_addresses()
6+
7+
for eip in addresses_dict['Addresses']:
8+
if "InstanceId" not in eip:
9+
if "NetworkInterfaceId" not in eip:
10+
print("Unused EIP:",eip['PublicIp'])

0 commit comments

Comments
 (0)