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

Closed as not planned

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

Activity

  1. TessituraWayne commented on Jun 26, 2026

    @TessituraWayne
    Author

    Images are shown the wrong way around. the POST DELETE is the first image, the PRE DELETE is the second image

  2. self-assigned this
    on Jul 1, 2026
  3. added
    investigatingThis issue is being investigated and/or work is in progress to resolve the issue.
    p3This is a minor priority issue
    and removed
    needs-triageThis issue or PR still needs to be triaged.
    on Jul 1, 2026
  4. adev-code commented on Jul 1, 2026

    @adev-code
    Contributor

    Thanks for reaching out @TessituraWayne. To contact the EC2 team regarding this, please use the feedback button in the AWS Console while in EC2. You may also reach out to AWS Premium Support for a dedicated, service-related issue support.

  5. removed
    investigatingThis issue is being investigated and/or work is in progress to resolve the issue.
    on Jul 1, 2026
  6. github-actions commented on Jul 1, 2026

    @github-actions
    Contributor

    This issue is now closed. Comments on closed issues are hard for our team to see.
    If you need more assistance, please open a new issue that references this one.

  7. added
    service-apiThis issue is due to a problem in a service API, not the SDK implementation.
    on Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions