Skip to content

When an EC2 has a shared and a in account security group with identical names deleting one from "Change Security Groups" will delete both #10436

Description

@TessituraWayne

Describe the bug

When 2 (I assume or more) Security groups with an identical name are assigned to an ENIs security group list, deleting one, will delete all of the same name.

Image Image

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

I expected to only delete security group ID sg-075407198e27a64bc, but it also deleted sg-0811e4163b09b96c7

Current Behavior

It deletes all security groups with the identical name, which is incorrect, it should delete only the selected item.

Reproduction Steps

This is done via the GUI

I believe this was the order this will work in. It requires the same region and 2 different AWS accounts.

Create and share a vpc and at least 1 subnet in account 1
Share this with account 2 via RAM

Create a SG in account 1 name it "My SG"
Create a SG in account 2 name it "My SG" (must be the same name)
Share the new SG from account 2 to account 1 with RAM

Back in account 1 add BOTH newly created SG to any eni and save it.
Edit the ENIs security groups again and remove the shared one. You will find that both SG disappear.
It looks like the deletion is being done on Security Group Name, NOT Security group ID

Image Image

Possible Solution

ensure the Remove button on the GUI removes by ID, not name

Additional Information/Context

No response

CLI version used

N/A

Environment details (OS name and version, etc.)

N/A

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.ec2p3This is a minor priority issueservice-apiThis issue is due to a problem in a service API, not the SDK implementation.

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions