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 in AWS by akhtar
• 17,690 points
55 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 by MD
• 40,740 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
• 57,550 points
2,175 views
0 votes
1 answer
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 in AWS by MD
• 40,740 points
167 views
0 votes
1 answer

How to create key from aws cli?

Hi@akhtar, You can use the bellow given command ...READ MORE

answered Apr 27 in AWS by MD
• 40,740 points
57 views