Skip to content

RFE: Cleanup orphan EC2 ssh key pairs #378

@cevich

Description

@cevich

When creating images in AWS EC2, packer creates a key-pair (object) to access it. However, if a image-build PR is forced-pushed or build task canceled/aborted packer can't remove it. A new periodic (or add to existing) job should be created to remove old key-pairs from EC2. They're always named packer_<some UUID>.

The danger here is hitting some restriction on the EC2-side for the maximum number of key-pairs. It's also a minor pain to remember to manually clean these things up every now and again (I just removed 22 of them going as far back as December 2023 😢

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions