How to remove a rule from a security group from AWS CLI

0 votes

Hi Guys,

I have installed AWS CLI in my Windows system. I created one ingress rule in my security group from CLI. Now I want to remove this from CLI. How can I do that?

Jul 7, 2020 in AWS by akhtar
• 38,210 points
1,364 views

1 answer to this question.

0 votes

Hi@akhtar,

You can remove the ingress rule from your security group using the revoke-security-group-ingress tag. Use the below-given command in your AWS CLI.

$ aws ec2 revoke-security-group-ingress --group-name MySecurityGroup --protocol tcp --port 22 --cidr 203.0.113.0/24

I hope this will help you.

answered Jul 7, 2020 by MD
• 95,300 points

Related Questions In AWS

0 votes
1 answer
+2 votes
2 answers

How do we move a domain from Hostgator to AWS Route 53?

I found this  Before transferring a domain, make ...READ MORE

answered Aug 3, 2018 in AWS by Priyaj
• 58,140 points
3,235 views
0 votes
1 answer
0 votes
1 answer

How to create a security group in AWS with Boto3?

Hi@akhtar, You can create a new security group ...READ MORE

answered Oct 10, 2020 in AWS by MD
• 95,300 points
902 views
0 votes
1 answer

not able to delete a security group for my Amazon VPC in AWS?

Hi@akhtar, When you try to delete that security ...READ MORE

answered Mar 18, 2020 in AWS by MD
• 95,300 points
581 views