Deleting AWS Account Stacks
Just figured something out about deleting AWS CloudFormation Organizations Accounts stacks
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
⚙️ Check out my series on Automating Cybersecurity Metrics | Code.
🔒 Related Stories: Bugs | AWS Security | Secure Code
💻 Free Content on Jobs in Cybersecurity | ✉️ Sign up for the Email List
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I’ve had issues trying to create, delete, and recreate AWS accounts using AWS CloudFormation in the past. I think AWS may have fixed some, but not all of the issues.
Once I deleted an account I was able to create a new account with the same name and email which is cool. I’m about to try it again to make sure I’m not hallucinating.
However, I had an issue before where a stack was in a bad state and I couldn’t delete it or adjust the account.
I figured out that I cloud close the account, and then I couldn’t delete the stack. I noticed the account closure was in a pending state. I know I deleted a stack for a closed account just the other day, so I went off and did some other things and came back to it, but I still couldn’t delete the stack from the main page with the list of events.
But when I clicked into the details of the stack, there’s another delate button. When I clicked that button, I was able to delete the stack.
The status then changed to DELETE_IN_PROGRESS which it never did from the main page.
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*hIXKzuDYvi2UW37zTWqsEg.png)
Is this a bug? It seems like a bug.
Then on this screen, I can see the status eventually change back with an error that something is relying on an export. Aha. Got it.
Well, I fixed that issue but now I’m back to this frustrating problem — which I cannot fix.
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*iag5TjvAyFKVDuBV4fWFPg.png)
As you can see from the screens above you can only change the alternate contacts not the AWS account primary email in the console.
Since I already closed the account I couldn’t login and change it that way. I thought since the accounts could have the same names after closing and opening a new one they could have the same emails now too but nope. Annoying. This messes up my whole naming scheme and this account will be stuck associated with my account for like 90 days.
Follow for updates.
Teri Radichel | © 2nd Sight Lab 2023
About Teri Radichel:
~~~~~~~~~~~~~~~~~~~~
⭐️ Author: Cybersecurity Books
⭐️ Presentations: Presentations by Teri Radichel
⭐️ Recognition: SANS Award, AWS Security Hero, IANS Faculty
⭐️ Certifications: SANS ~ GSE 240
⭐️ Education: BA Business, Master of Software Engineering, Master of Infosec
⭐️ Company: Penetration Tests, Assessments, Phone Consulting ~ 2nd Sight Lab
Need Help With Cybersecurity, Cloud, or Application Security?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
🔒 Request a penetration test or security assessment
🔒 Schedule a consulting call
🔒 Cybersecurity Speaker for Presentation
Follow for more stories like this:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
❤️ Sign Up my Medium Email List
❤️ Twitter: @teriradichel
❤️ LinkedIn: https://www.linkedin.com/in/teriradichel
❤️ Mastodon: @teriradichel@infosec.exchange
❤️ Facebook: 2nd Sight Lab
❤️ YouTube: @2ndsightlab
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*4oxP4LXk8l8c3mpRvO7ejg.png)