A stack named [x] already exists
An error occurred: (InvalidParametersException) when calling the ProvisionProduct operation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
⚙️ 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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
While trying to create a new AWS account using a Lambda function which I’ve been writing about in a series of blog posts I hit this error:

“errorMessage”: “An error occurred (InvalidParametersException) when calling the ProvisionProduct operation: A stack named keys already exists.”,
“errorType”: “InvalidParametersException”If you’ve used AWS for any length of time you think, oh that must be CloudFormation. Also, I know that under the hood Service Catalog is using Cloud Formation and Control Tower uses Service Catalog. Confused yet? Yeah, I feel your pain.
After digging around in CloudFormation for a while I couldn’t find the stack:

I went to Service Catalog and couldn’t find it there either clicking around on lots of things. Finally, I noticed this filter at the top of Provisioned Products:

Click on User and change to Account, scroll down.
There I could find the “stack” which has an error. I’d need to delete this in order to try the command again. Of course you’ll want to figure out what caused the error and fix that first.

Click the radio button next to the account you wish to create and choose “Terminate.”

Type “terminate” and click “Terminate provisioned product.”

Related story if you’re learning CloudFormation:
Follow for updates.
Teri Radichel | © 2nd Sight Lab 2022
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 LabNeed Help With Cybersecurity, Cloud, or Application Security?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
🔒 Request a penetration test or security assessment
🔒 Schedule a consulting call
🔒 Cybersecurity Speaker for PresentationFollow 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






