Skip to content

This automation can be used to add security group rules from the data provided in csv files.

Notifications You must be signed in to change notification settings

ranopriyo-neogy/aws-csv-to-sg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

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,,,

To setup the project

  • 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 and egress rules for Security group data provided in the Dev.csv file.

Developer

About

This automation can be used to add security group rules from the data provided in csv files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published