Cryptic error message for a one character downside in AWS CloudFormation
I’m attempting to deploy an AWS CloudFormation template getting this error:
whereas parsing a block mapping
in "<unicode string>", line 18, column 9:
Model: "2012-10-17"
^ (line: 18)
anticipated <block finish>, however discovered '<block sequence begin>'
in "<unicode string>", line 31, column 10:
- Impact: Enable
^ (line: 31)
On this CloudFormation template. Do you see the issue?
Yeah, that pretty error message is mounted like this. Now do you see it?
Severely which CloudFormation would add some syntax particular errors as an alternative of dumping the generic YAML errors to the display screen which aren’t that useful for somebody new to this. I knew particularly what I modified on this template earlier than I obtained the error. As a matter of truth, the repair was not what I modified so I don’t understand how the issue obtained into the template in any respect.
Why on the planet it’s referencing the model is past me. The error is not any the place close to or had something to do with the model.
Have you ever figured it out but? Maybe even after wanting on the corrected model you don’t see it as a result of it’s actually exhausting to identify.
I knew that I added the 2 MFA situations. I’ve written about this MFA situations and probably incorrect clarification of the logic right here, relying in your use case and viewpoint:
I didn’t deliberately change the road of code inflicting the error, nor did I sort or delete something on that line that might have prompted these error. Maybe once I inserted the situation I hit the return key and that prompted the second line with “- Impact: permit” to have one much less area that it ought to have. The indentation of the 2 impact strains don’t align within the first model. I added one area after which my template ran appropriately.
These error messages may very well be much more useful if AWS would spend money on the time, cash, and sources to repair them. It will most likely save their prospects tons of time in improvement. There could be much less assist requests. Unsure if that may be a profit or to not AWS. And moreover, these highway blocks most likely trigger builders to throw their fingers up and skip safety configurations when issues don’t work simply. That’s why I’m writing a whole lot of pattern code to assist folks deploy issues extra simply.
Please, please, please check your code each which method and write user-friendly error messages — it doesn’t matter what code you’re writing.
Should you preferred this story please clap and comply with:
Medium: Teri Radichel or E mail Listing: Teri Radichel
Twitter: @teriradichel or @2ndSightLab
Requests companies by way of LinkedIn: Teri Radichel or IANS Analysis
© 2nd Sight Lab 2022
____________________________________________
Creator:
Cybersecurity for Executives within the Age of Cloud on Amazon
Want Cloud Safety Coaching? 2nd Sight Lab Cloud Safety Coaching
Is your cloud safe? Rent 2nd Sight Lab for a penetration check or safety evaluation.
Have a Cybersecurity or Cloud Safety Query? Ask Teri Radichel by scheduling a name with IANS Analysis.
Cybersecurity & Cloud Safety Assets by Teri Radichel: Cybersecurity and Cloud safety lessons, articles, white papers, displays, and podcasts