[‘ ‘] value passed to — parameter-overrides must be of format Key=Value
Incorrect CloudFormation error message when using AWS profiles
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
⚙️ Check out my series on Automating Cybersecurity Metrics | Code.
🔒 Related Stories: Bugs | AWS Security | Secure Code
💻 Free Content on Jobs in Cybersecurity | ✉️ Sign up for the Email List
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I could see how this error could be extremely confusing to someone who hasn’t programmed for years and knows what kind of non-sensical error messages can be generated by parsers.
Once again this error message really didn’t have to do what the stated error message. There was nothing wrong with the value I was passing into a CloudFormation template.
The problem was that the parser that executes the AWS CLI cloudformation deploy command doesn’t correctly recognize a new switch on the command line. I put the profile option at the end of the command and the parser thought it was part of the parameter overrides just before that switch. I fixed it by simply moving the profile option before the parameter overrides option. This parsing error could have security implications but I don’t have time to think about that any further.
Basically I changed this:
aws cloudformation deploy \
--stack-name $groupname \
--template-file cfn/group_batch_job_admins.yaml \
--parameter-overrides \
groupnameparam=$groupname \
--profile $profileto this:
aws cloudformation deploy \
--profile $profile \
--stack-name $groupname \
--template-file cfn/group_batch_job_admins.yaml \
--parameter-overrides \
groupnameparam=$groupnameFollow 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 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
