This automation can be used to copy data from csv files
to security group rule
in AWS. The paramenters required for input includes a csv file with the data and values in .env
.
The header for the csv file should be in the below format as the column names are used to fetch the data:
GroupId,GroupName,Type,IpProtocol,FromPort,ToPort,IpRanges,Ipv6Ranges,PrefixListIds,UserIdGroupPairs
sg-0034,SG-PIM,Inbound/Ingress,tcp,80,80,10.1.2.0/8,,,
sg-0034,SG-PIM,Inbound/Ingress,tcp,80,80,10.10.4.20/32,,,
- Clone the repo.
- Copy data from your csv file to the file
Dev.csv
in the root folder. Make sure the columns have same name as mentioned above. - Update the
.env
file in root folder with AWS Account credentials. - Execute
python3 lambda_function.py
in root directory. - The execution should create the
ingress
andegress
rules for Security group data provided in theDev.csv
file.