Using Console
Using CLI
<security_group_id>
with the actual ID of the security group that needs to be remediated.Step 5: Verify that the HTTPS access rule has been removed by running the following command:<security_group_id>
with the actual ID of the security group that was remediated.Step 6: Repeat the above steps for all the security groups that have unrestricted HTTPS access allowed.By following the above steps, you can remediate the misconfiguration of unrestricted HTTPS access in AWS using AWS CLI.Using Python
region
and security_group_id
variables with your own values. Also, replace the trusted_ip_address
with the IP address(es) of the trusted sources that should be allowed HTTPS access.