{"id":13646802,"url":"https://github.com/jckuester/awsrm","last_synced_at":"2025-07-02T02:01:43.730Z","repository":{"id":43892899,"uuid":"267948803","full_name":"jckuester/awsrm","owner":"jckuester","description":"A remove command for AWS resources","archived":false,"fork":false,"pushed_at":"2023-09-13T09:23:22.000Z","size":20132,"stargazers_count":98,"open_issues_count":5,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-30T13:46:44.946Z","etag":null,"topics":["aws","cleaning","cli","delete","golang","terraform"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jckuester.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-29T20:28:08.000Z","updated_at":"2024-10-29T09:47:07.000Z","dependencies_parsed_at":"2024-01-14T10:10:42.462Z","dependency_job_id":"6bc3297a-5c0a-4762-ae47-89d223b67cdd","html_url":"https://github.com/jckuester/awsrm","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/jckuester/awsrm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jckuester%2Fawsrm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jckuester%2Fawsrm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jckuester%2Fawsrm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jckuester%2Fawsrm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jckuester","download_url":"https://codeload.github.com/jckuester/awsrm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jckuester%2Fawsrm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263061400,"owners_count":23407604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cleaning","cli","delete","golang","terraform"],"created_at":"2024-08-02T01:03:07.414Z","updated_at":"2025-07-02T02:01:43.496Z","avatar_url":"https://github.com/jckuester.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# awsrm\n\nA remove command for AWS resources\n\n[![Release](https://img.shields.io/github/release/jckuester/awsrm.svg?style=for-the-badge)](https://github.com/jckuester/awsrm/releases/latest)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=for-the-badge)](/LICENSE.md)\n[![Travis](https://img.shields.io/travis/com/jckuester/awsrm/master.svg?style=for-the-badge)](https://travis-ci.com/jckuester/awsrm)\n\nThis command line tool follows\nthe [Unix Philosophy](https://en.wikipedia.org/wiki/Unix_philosophy#Do_One_Thing_and_Do_It_Well)\nof `doing only one thing and doing it well`:\n\nIt simplifies deleting over [250 AWS resource types](#supported-resources) across multiple accounts and regions.\n\nLike other Unix-like tools, `awsrm` reveals its full power when combining it via pipes with other tools, such\nas [`awsls`](https://github.com/jckuester/awsls) for listing AWS resources and `grep` for filtering by resource\nattributes.\n\n## Example\n\n### Delete resources by tags (or other attributes)\n\nTo delete, for example, all EC2 instances with tag `Name=foo`, run\n\n      awsls instance -a tags | grep Name=foo | awsrm\n\nTo filter on multiple attributes, display them with `awsls` via the `-a (--attributes) \u003ccomma-separated list\u003e` flag.\nEvery attribute in the Terraform documentation\n([here](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance#attributes-reference) are\nthe attributes for `aws_instance`) can be used:\n\n![](https://raw.githubusercontent.com/jckuester/awsrm/master/.github/img/awsrm-grep.gif)\n\n1. List resources via [`awsls`](https://github.com/jckuester/awsls) with the attributes you want to filter on\n   (here: `-a tags`)\n2. Use standard tools like `grep` to filter resources\n3. Pipe result to `awsrm` (nothing is deleted until you confirm)\n\n**Note**: `awsls` output passes on profile and region information, so that `awsrm` knows for each resource in what\naccount and region to delete it.\n\nDepending on the type of resource, deletion can take some time. This GIF runs faster than EC2 instances are actually\nterminated; the shell prompt shows the real execution times in seconds.\n\n### Delete across multiple accounts and regions\n\nList all instances with `awsls` in the AWS accounts associated with profile `myaccount1` and `myaccount2` in both\nregions `us-west-2` and `us-east-1` and pipe the result to `awsrm`:\n\n    awsls -p myaccount1,myaccount2 -r us-west-2,us-east-1 instance | awsrm\n\n![](https://raw.githubusercontent.com/jckuester/awsrm/master/.github/img/awsrm-multi-profile-region.gif)\n\n### Delete by IDs\n\nDelete specific resources by ID, for example, some IAM roles\n\n    awsrm iam_role db-cluster elb nginx\n\nor VPCs\n\n    awsrm vpc vpc-1234 vpc-3456 vpc-7689\n\n![](https://raw.githubusercontent.com/jckuester/awsrm/master/.github/img/awsrm-args.gif)\n\n1. List resources via [`awsls`](https://github.com/jckuester/awsls) to find out what resources to delete.\n2. Use `awsrm` to delete the resources by resource type and ID(s)\n\n## Usage\n\nInput via arguments:\n\n\tawsrm [flags] \u003cresource_type\u003e \u003cid\u003e [\u003cid\u003e...]\n\nInput via pipe:\n\n    awsls [flags] \u003cresource_type\u003e | awsrm\n\nor\n\n    echo \"\u003cresource_type\u003e \u003cid\u003e \u003cprofile\u003e \u003cregion\u003e\" | awsrm\n\nTo see options available run `awsrm --help`.\n\n## Installation\n\n### Binary Releases\n\nYou can download a specific version on the [releases page](https://github.com/jckuester/awsrm/releases) or use the\nfollowing way to install to `./bin/`:\n\n```bash\ncurl -sSfL https://raw.githubusercontent.com/jckuester/awsrm/master/install.sh | sh -s v0.2.0\n```\n\n### Homebrew\n\nHomebrew users can install by:\n\n```bash\nbrew install jckuester/tap/awsrm\n```\n\nFor more information on Homebrew taps please see the [tap documentation](https://docs.brew.sh/Taps).\n\n## Supported resources\n\nThis tool can not only delete any resource type that\nis [supported by awsls](https://github.com/jckuester/awsls#supported-resources), but any resource\ntype [covered by the Terraform AWS Provider](https://registry.terraform.io/providers/hashicorp/aws/latest/docs).\n\nNote: the prefix `aws_` for resource types is optional. This means, for example, `awsrm aws_instance \u003cid\u003e` and\n`awsrm instance \u003cid\u003e` are both valid commands.\n\n## Disclaimer\n\nYou are using this tool at your own risk! I will not take responsibility if you delete any critical resources in your\nproduction environments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjckuester%2Fawsrm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjckuester%2Fawsrm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjckuester%2Fawsrm/lists"}