Drop Nuclear Bomb on your AWS account. How to clear your entire AWS services in 3 seconds.

Prerequisite

  • Make sure you are a mac user.

Install Brew

# Run the command below
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install ‘cloud-nuke’ with ‘brew’

# install cloud-nuke
brew install cloud-nuke

Prepare your credential

# Run this command on terminal
export AWS_ACCESS_KEY="YOUR_AWS_ACCESS_KEY"
export AWS_SECRET_KEY="YOUR_AWS_SECRET_KEY"
export AWS_REGION="YOUR_REGION"

Completely Clear Your Account With a Single Commandline!

# Run the command and say goodbye to your existing services
cloud-nuke aws

Explore Additional Features

# Delete all services in Seoul, (delete specific region)
cloud-nuke aws --region ap-northeast-3
# List all available resources
cloud-nuke aws --list-resource-types
# Exclude some resources
cloud-nuke aws --exclude-resource-type s3 --exclude-resource-type ec2
# Simulate `cloud-nuke` with `--dry-run`. It's going to tell you what's going to happen by not actually deleting your resources
cloud-nuke aws --resource-type ec2 --dry-run

How Do I Get AWS Credential? — OPTIONAL

AWS Dashboard, Go to IAM
Tab “Users” on the left menu and Click “Add users”.
Enter username and check Programmatic access
Click “Create group”
Give “AdministratorAccess” to use “cloud-nuke”
Add tags.. Skip it
Check your Access Key and Secret Access Key

Conclusion

  • install cloud-nuke
  • Provide aws credentials
  • run cloud-nuke aws

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
KD Knowledge Diet

KD Knowledge Diet

2.4K Followers

Software Engineer, Mobile Developer living in Seoul. I hate people using difficult words. Why not using simple words? Keep It Simple Stupid!