Digital Marketing

How to Revoke all ingress rules of an AWS security group

 groupId="sg-your-group-id"

aws ec2 describe-security-groups --output json --group-ids $groupId --query "SecurityGroups[0].IpPermissions"

aws ec2 revoke-security-group-ingress --dry-run --group-id $groupId \

  --ip-permissions \

  "`aws ec2 describe-security-groups --output json --group-ids $groupId --query "SecurityGroups[0].IpPermissions"`"

Comments

Popular posts from this blog

MySQL Sandbox with the Sakila sample database