aws-nuke: Safely Remove All Resources from an AWS Account

Summary
aws-nuke is a powerful command-line tool designed to remove all resources from an AWS account, ensuring a clean slate. Rewritten in Version 3 using libnuke, it offers enhanced stability, new features, and improved maintainability for efficient cloud resource management. This tool is ideal for development, testing, or decommissioning AWS environments.
Repository Info
Tags
Click on any tag to explore related repositories
Introduction
aws-nuke is an open-source command-line interface (CLI) tool developed by ekristen, designed to systematically remove all resources from an AWS account. This powerful utility is particularly useful for cleaning up development or testing environments, ensuring no lingering resources incur unexpected costs, or for completely decommissioning an AWS account. Version 3 represents a significant rewrite, leveraging the libnuke library for improved stability, test coverage, and a host of new features.
Installation
To get started with aws-nuke, it is recommended to follow the detailed installation instructions provided in the official documentation. The tool offers various installation methods, including a published Homebrew Tap for macOS users.
For comprehensive installation guides, please refer to the official aws-nuke documentation (opens in a new tab).
Examples
aws-nuke operates by identifying and deleting resources across your AWS account. Its primary function is executed via the run subcommand. Before performing any destructive actions, it's crucial to understand the configuration and potential impact.
A typical workflow involves:
- Configuring the tool with a YAML file to specify regions and resources to target or exclude.
- Using the
explain accountandexplain configcommands to understand what will be affected. - Executing the
aws-nuke runcommand to initiate the deletion process.
For detailed usage examples and configuration options, consult the official aws-nuke documentation (opens in a new tab).
Why Use It?
aws-nuke provides a robust and reliable solution for managing AWS account cleanup. Key benefits include:
- Comprehensive Cleanup: Ensures all provisioned resources are removed, preventing orphaned resources and unexpected billing.
- Enhanced Stability: The Version 3 rewrite with
libnukebrings over 95% test coverage to the core library, leading to greater reliability. - New Features: Includes signed Darwin Binaries for macOS, a Homebrew Tap, global filters, the ability to run against all enabled regions, and improved CloudFormation stack handling.
- Maintainability: Designed for easier maintenance and bug fixing, with ongoing development to add more resource types and features.
- Safety Features: While powerful, it encourages careful configuration and explanation commands to prevent accidental deletions.
Links
- GitHub Repository:
ekristen/aws-nuke(opens in a new tab) - Official Documentation:
aws-nukeDocumentation (opens in a new tab)