avatarTeri Radichel

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

1780

Abstract

</div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*L9lEIsaWt6xm2Op2ww-G5w.png)"></div> </div> </div> </a> </div><p id="9973">Got this error deploying a CloudFormation Template:</p><blockquote id="7e98"><p>An error occurred (ValidationError) when calling the CreateChangeSet operation: Template error: the attribute in Fn::ImportValue must not depend on any resources, imported values, or Fn::GetAZs</p></blockquote><p id="d97f">The error message is misleading because I’m not doing any of those things. I am using a !Sub with an Fn::ImportValue and I simply have a typo in one of the values I want to replace with a parameter.</p><p id="5bc5">This:</p><figure id="d0f0"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*kFULgB_UwnzOwYgs2RcsDQ.png"><figcaption></figcaption></figure><p id="9396">Should be this (minus the extra “P”):</p><figure id="09d0"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*AFjQo0lNTWxgSakDu3ZOfw.png"><figcaption></figcaption></figure><p id="cf4e">So if you get this long winded error message, look for typos.</p><p id="1996">A better error message would be:</p><p id="fd75"><i>“VPCPNameParam is invalid. Do you have a typo in your parameter name?”</i></p><div id="4d06" class="link-block"> <a href="https://readmedium.com/thoughtful-error-handling-ca1064cda8da"> <div> <div> <h2>Thoughtful Error Handling</h2> <div><h3>Your error handler is one of your most important security defenses</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: # Options url(https://miro.readmedium.com/v2/resize:fit:320/1*hWOdEC85WwPVAPmT9JlrBA.png)"></div> </div> </div> </a> </div><p id="f351">Follow for updates.</p><p id="4a3a">Teri Radichel | <i>© <a href="https://2ndsightlab.com/?source=post_page---------------------------">2nd Sight Lab</a> 2023</i></p><div id="8b5f"><pre><span class="hljs-section">About Teri Radichel: ~~~~~~~~~~~~~~~~~~~~</span> ⭐️ 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</pre></div><div id="caae"><pre><span class="hljs-section">Need Help With Cybersecurity, Cloud, or Application Security? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span> 🔒 Request a penetration test or security assessment 🔒 Schedule a consulting call 🔒 Cybersecurity Speaker for Presentation</pre></div><div id="6f9d"><pre>Follow <span class="hljs-keyword">for</span> more stories like <span class="hljs-keyword">this</span>: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ❤️ Sign Up my Medium Email List ❤️ Twitter: <span class="hljs-meta">@teriradichel</span> ❤️ LinkedIn: https:<span class="hljs-comment">//www.linkedin.com/in/teriradichel</span> ❤️ Mastodon: <span class="hljs-meta">@teriradichel</span><span class="hljs-meta">@infosec</span>.exchange ❤️ Facebook: 2nd Sight Lab ❤️ YouTube: @2ndsightlab</pre></div><figure id="7286"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*4oxP4LXk8l8c3mpRvO7ejg.png"><figcaption></figcaption></figure></article></body>

The attribute in Fn::ImportValue must not depend on any resources, imported values, or Fn::GetAZs

Error message not really accurate

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

⚙️ 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

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Just for the record I no longer use CloudFormation ImportValue as it leads to too many issues — especially in a multi-account environment. To see the full framework I have created check out these posts:

Got this error deploying a CloudFormation Template:

An error occurred (ValidationError) when calling the CreateChangeSet operation: Template error: the attribute in Fn::ImportValue must not depend on any resources, imported values, or Fn::GetAZs

The error message is misleading because I’m not doing any of those things. I am using a !Sub with an Fn::ImportValue and I simply have a typo in one of the values I want to replace with a parameter.

This:

Should be this (minus the extra “P”):

So if you get this long winded error message, look for typos.

A better error message would be:

“VPCPNameParam is invalid. Do you have a typo in your parameter name?”

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
Error Message
Cloudformation
Importvalue
Attribute
Depend On
Recommended from ReadMedium