Triage and Remediation
Remediation
Using Console
Using Console
Here are the step by step instructions to remediate the “Security Group Name Prefixed With launch-wizard Should Not Be Used” misconfiguration in AWS using the AWS console:
- Log in to the AWS Management Console.
- Go to the EC2 Dashboard.
- Click on the “Security Groups” option in the left-hand menu.
- Identify the security group(s) that have a name prefixed with “launch-wizard”.
- Select the security group(s) that need to be remediated.
- Click on the “Actions” button, and then select “Edit Group Name”.
- Rename the security group(s) to a more descriptive and meaningful name that does not include the “launch-wizard” prefix.
- Click on the “Save” button to save the changes.
Using CLI
Using CLI
To remediate the misconfiguration “Security Group Name Prefixed With launch-wizard Should Not Be Used” for AWS using AWS CLI, follow these steps:
- Open the AWS CLI on your local machine or on the AWS EC2 instance.
-
Run the following command to list all the security groups in your account:
- Identify the security group that has a name prefixed with “launch-wizard”.
-
Run the following command to rename the security group:
Replace
<security-group-id>
with the ID of the security group that you want to rename, and<new-security-group-name>
with a new name for the security group that does not have “launch-wizard” prefix. For example: -
Verify that the security group has been renamed successfully by running the following command:
Replace
<security-group-id>
with the ID of the security group that you have renamed. The output should show the new name of the security group.
Using Python
Using Python
To remediate the security group name prefixed with
launch-wizard
in AWS using Python, you can follow the below steps:- Import the required modules:
- Connect to the AWS account:
- Get all the security groups:
- Loop through all the security groups and check if the name is prefixed with
launch-wizard
:
- The above code will delete all the security groups that have a name prefixed with
launch-wizard
. If you want to rename the security group, you can use the below code:
- The above code will rename all the security groups that have a name prefixed with
launch-wizard
tonew-name
. You can also update the description of the security group as per your requirement.