88

In AWS EC2, I start a Classical Load Balancer in front of EC2 instance (security group of EC2 instance is launch-wizard-3).

I want to change the inbound rule of Security Group of EC2 instance . A security group for Classical Load Balancer (its name is my-first-load-balancer-sg) was also started. When I am changing source of an inbound rule of launch-wizard-3 to the my-first-load-balancer-sg, following error is prompted.

You may not specify a referenced group id for an existing IPv4 CIDR rule.

the inbound rule as follows

(type-HTTP, protocol-TCP, port rang-80, Source type- Custom, Source- my-first-load-balancer-sg(what i want to place) )

I tried many times to solve it, but I couldn't.

M--
  • 25,431
  • 8
  • 61
  • 93
sajeewaI-
  • 3,755
  • 2
  • 5
  • 11
  • 3
    try adding a new rule instead, and then removing hte CIDR (eg subnet/ip) based rule afterwards. – erik258 Jul 24 '21 at 15:02

6 Answers6

276

I solved this from deleting the existing rule and creating a new rule

sajeewaI-
  • 3,755
  • 2
  • 5
  • 11
  • 2
    Fine, but how did you find the existing rule? It doesn't tell you what that is. – ijt Mar 15 '22 at 15:55
  • But why must it be this way? Is Amazon not a billion dollar company that could solve this issue? – Randall Coding Aug 20 '22 at 02:59
  • 3
    With existing rule you already have a Security group rule ID assigned that is causing problem/conflict. When you create a new rule then this Security group rule ID is not yet assigned. That's why you are not able to edit an existing rule but by creating a new rule works. – Muhammad Qasim Feb 10 '23 at 02:53
12

Simply delete and Add a new rule with the options you require.

Blastiq
  • 119
  • 1
  • 4
  • 2
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 01 '22 at 12:08
4

AWS Database security group configuration

Please follow the below process:

M--
  • 25,431
  • 8
  • 61
  • 93
sankalp
  • 617
  • 5
  • 14
1

Your new rule is conflicting with the existing rules, so modify the existing rule or delete and save and then create a new rule altogether.

Adarsh
  • 79
  • 1
  • 2
0

Delete the existing rule and add a new rule. It would work.

Nirbhay Rana
  • 4,229
  • 2
  • 18
  • 4
0

Delete your second default-created inbound rules and recreate new inbound rules

Sarthak Raval
  • 1,001
  • 1
  • 10
  • 23