โœŒ๏ธ
yash and stuff.
  • ๐Ÿ home
  • ๐Ÿชจabove minimum
  • ๐ŸŒ2024
  • ๐ŸงชPRODUCTS
    • ๐ŸŽนsong of the day
  • ๐Ÿฅžfood
    • ๐ŸŒ„dehradun: where to eat?
    • ๐Ÿฅ›chole bhature on a sunday
    • โ˜•brahmin's coffee bar
  • TECH STUFF
    • ๐Ÿ’ฃi nuked everything on my aws account
Powered by GitBook
On this page
  1. TECH STUFF

i nuked everything on my aws account

using this scary tool called aws-nuke

I've been using serverless framework for a while now - and using that I've created a lot of resources and most of them are duplicates - containing staging, prod and dev environments.

There's a lot of clutter in my AWS account - and so this good Saturday I tried to clean it all up. But how do I do it? I googled nuke all aws resources and I found this tool called aws-nuke - ngl it looked super scary.

I use another profile on my office mac to create my side projects. Couldn't install brew right away so I switched to doing it using one of the releases on GitHub.

For some reason - even after 3-4 years of development, I still have to google every time i set environment variables - be it on windows, mac or linux.

After first few lines on the documentation there was a caution which said:

Be aware that aws-nuke is a very destructive tool, hence you have to be very careful while using it. Otherwise you might delete production data.

well, i'll be careful...

so, i wrote the config which looked very, um, simple:

regions:
- global

account-blocklist:
- "000453719161" # production

accounts:
 "010983546564": {}

and then there was the command:

aws-nuke -c ./config.yml --profile bomber

It then asks me: Do you want to continue? Enter account alias to continue.

I entered it... it was potatochips

ok, i pressed enter and it it listed a lot of things and said would remove to all of them - i kept scrolling. and then at the end it says:

The above resources would be deleted with the supplied configuration. Provide --no-dry-run to actually destroy resources.

um, i read the documentation folks, calm down - i got this.

and then i finally did enter it.

i entered --no-dry-run at then end of the last command

I'm waiting after entering potatochips

still waiting in anticipation....

ooh it asks me again. it wants me to enter potatochips again.

GUYS, GUYS, GUYS....

i forgot that I had scraped data in my DB - and an active API that was being used. It obviously stopped working because of this.

--

brb - more content to come soon.

Previousbrahmin's coffee bar

Last updated 1 year ago

๐Ÿ’ฃ
Page cover image