Thursday, September 15, 2022
HomeCyber SecurityCapabilities calling Capabilities. Errors with Bash and CloudFormation… | by Teri Radichel...

Capabilities calling Capabilities. Errors with Bash and CloudFormation… | by Teri Radichel | Bugs That Chunk | Sep, 2022


Errors with Bash and CloudFormation parameter-overrides

At this time was oddly annoying. A bunch of code I had examined repeatedly stopped working. A selected stack was failing repeatedly that has labored for a very long time now. I’ve a check script within the root of this listing and been working it day-after-day with no errors:

At this time I ran components of that check script and sure sources did not deploy. I used to be getting errors about lacking parameters when the parameters are clearly handed in.

Then I modified the code round and received errors about invalid characters in my parameter overrides. This additionally was false. I’ve written about the issue with hidden characters you may’t at all times see when calling AWS CLI features so you may’t inform what the issue is earlier than.

I’ve additionally written a submit about areas in CloudFormation:

which appears to be a preferred submit for plagiarism for no matter cause:

Sooner or later I utterly modified the parameters I used to be passing into my parameter overrides. I seen that the CloudFormation stack, because it was deploying, by no means up to date and indicated it had acquired the brand new parameters. At this level I utterly deleted the stack and began over.

Sooner or later, I had modified my code to make use of a brand new perform. I had a whole lot of code calling the outdated perform so I merely modified the contents of the outdated perform to acquire and go the values to the brand new perform. That is the place the issue apparently lied, although this has all be working so I don’t know why it out of the blue began failing now.

I had not up to date my EC2 occasion working on AWS up so far, however I did once I began getting the errors. Though there have been some kernel updates, this didn’t resolve my downside.

After deleting the stack and validating that CloudFormation was passing the up to date parameters, I modified my code that was calling the outdated perform to name the brand new perform. That resolved the issue.

However what actually was the issue?

The issue has to do with the truth that I had two AWS parameter overrides and there was an area between the 2. After I tried to place quotes across the parameters handed into the perform as I wrote about beforehand:

This didn’t resolve the issue. And in reality, with some adjustments, AWS was complaining that there have been invalid characters in my consumer and group names so I presume that meant that someway a quote character was getting wrapped in quotes someplace and handed as a part of the parameter worth.

The opposite odd factor is that this was all working and out of the blue had a typo in a parameter title. How did that get there?? Hmmm.

A really unusual day certainly.

If in case you have features calling features in bash, you’ll should be very cautious passing parameters with areas round between features.

Teri Radichel

When you favored this story please clap and comply with:

Medium: Teri Radichel or E-mail Checklist: Teri Radichel
Twitter: @teriradichel or @2ndSightLab
Requests companies by way of LinkedIn: Teri Radichel or IANS Analysis

© 2nd Sight Lab 2022

____________________________________________

Writer:

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 Sources by Teri Radichel: Cybersecurity and Cloud safety courses, articles, white papers, displays, and podcasts



RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments