avatarTeri Radichel

Summary

The article discusses a common error message encountered when using AWS CloudFormation templates and provides a solution to the problem.

Abstract

The article discusses a common error message encountered when using AWS CloudFormation templates, which can be confusing and difficult to understand. The author describes how they encountered this error message while working on a template and provides a solution to the problem. The error message in question is "Mapping values are not allowed here," which is caused by a syntax error in the template. The author explains that the problem can be solved by adding a semicolon after the parameter name and indenting the line with the parameter type.

Opinions

  • The author suggests that error messages can sometimes be confusing and difficult to understand.
  • The author recommends writing code in small pieces to make it easier to find and fix errors.
  • The author emphasizes the importance of proper syntax when working with AWS CloudFormation templates.
  • The author provides a specific solution to a common error message encountered when using AWS CloudFormation templates.
  • The author provides links to additional resources on AWS security and application security.
  • The author provides information about their background and expertise in cybersecurity.
  • The author promotes their company and services for penetration tests, assessments, and consulting.
  • The author encourages readers to follow them on social media and sign up for their email list.

Mapping Values are Not Allowed Here — Missing Colon

Indentation error in CloudFormation template

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

⚙️ Check out my series on Automating Cybersecurity Metrics. The Code.

🔒 Related Stories: AWS Security | Application Security | CloudFormation

💻 Free Content on Jobs in Cybersecurity | ✉️ Sign up for the Email List

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

Sometimes error messages don’t mean much to me. Mapping values are not allowed here. What’s a mapping value? Where is here? Because actually this error message occurs on a line after a syntax problem. This is a common issue with parsers because they have to read past the point of the error and it’s tricky and inefficient to report backwards.

I knew I had a working AWS CloudFormation template and the only change was an AWS Parameter. Always a good idea to write your code a small piece at a time so you can easily find tricky errors with error messages that don’t clearly explain what the problem is.

In this case, I’d written a parameter like this in my template:

Parameters:
  paramnamesuffix
  Type: String

There are two problems with the code above that may have contributed to this error. The first is that I failed to add a semicolon after the parameter name (paramnamesuffix). The second is that the line with the parameter type should be indented.

So my code should look like this:

Parameters:
  paramnamesuffix:
    Type: String

That solved the problem in this case.

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 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
Cloudformation
Mapping Values
Not Allowed Here
AWS
Error Message
Recommended from ReadMedium