A remove command for AWS resources
Work in progress
The Unix Philosophy suggests
writing programs which do one thing and do it well
, rather than adding more features to existing programs.
awsrm
does one thing: deleting AWS resources via the command line.
Like other Unix-like tools, awsrm
shows its real power when being combined via pipes with other tools,
such as awsls
for listing resources or grep
for filtering resources.
- List resources via
awsls
with the attributes you want to filter on (here:-a tags
) - Use standard tools, such as grep, to filter the resources to delete
- Pipe result into
awsrm
(nothing is deleted until you confirm)
The following example deletes all AWS instances with tag Name=foo
in the AWS accounts associated with
profile myaccount1
and myaccount2
in both regions us-west-2
and us-east-1
:
awsls -p myaccount1 -r us-west-2 instance -a tags | grep Name=foo | awsrm
Until the first release:
go build
cp awsrm ~/bin