Properties validation failed for resource OrgAccount with message: #/ParentIds/0: failed validation constraint for keyword [pattern]
Error message for simple Organizations Account template that worked before
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
⚙️ Check out my series on Automating Cybersecurity Metrics | Code.
🔒 Related Stories: Bugs | AWS Security | Secure Code | CloudFormation
💻 Free Content on Jobs in Cybersecurity | ✉️ Sign up for the Email List
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you’ve been following along with my latest series you know that I successfully added some new accounts in the past using a particular template and script.
Now I’m running the same code again (in theory because AWS CloudShell seems to be mangling my code — I’m only using it on a temporary basis) and I’m getting this error:
Properties validation failed for resource OrgAccount with message: #/ParentIds/0: failed validation constraint for keyword [pattern]
So I check the parent ID and it is fine. I check the script and the template and I can’t see the problem initially.
What is odd is that I had this script working before. Hmm. Did I not check in the code?
At any rate I scrutinize the property and see that I have an If statement. Once again, my ! is missing at the start of a condition.
As mentioned in the last post, it seems like CloudFormation could figure out this is an IF statement and give an error message indicating that an IF construct is not properly formed.
Perhaps it could say “Did you mean !If?”
This error message relates to any myriad of problems you may have formulating the property value. It is not specific to If conditions. So if you see this error, scrutinize the value you are assigning to the property for any syntax errors. This is just one possible problem.
At least it tells you which property value is the problem!
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 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
