Using Console
Using CLI
<security-group-id>
with the actual ID of the identified security group.<security-group-id>
with the actual ID of the identified security group.Using Python
describe_security_groups
method to get a list of all security groups in the account. It then iterates through each security group, and checks if there are any outbound rules defined for the group. If there are, it removes them using the revoke_security_group_egress
method. Finally, it prints a message indicating whether outbound rules were removed or not for each security group.