This script edits EC2 security group rules using the AWS SDK for JavaScript v3.
- AWS account with permissions to modify security groups
- Node.js 12+
- Clone this repository
- Run
npm install
oryarn
to install dependencies - Create a
.env
file with your credentials:
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_REGION=
- Update
updateSecurityGroupRule/securityGroups.js
with the security groups and rules to modify
Run the script with:
yarn update-security-groups-rules
The script will modify the rules for the security groups specified in updateSecurityGroupRule/securityGroups.js
.
Logs will show progress and any errors.
This project is under the MIT License. See the LICENSE file for details.
If you have any questions or suggestions open an issue in this repository.
I hope this README helps you use the script! Let me know if you need any part explained further.