utilization: aws [options] <command> <subcommand> [<subcommand> …] [parameters]
There are a selection of points that may trigger a CLI command to fail. Whenever you get the “Unknown possibility” error message take an in depth take a look at your command as you most likely have a typo.
For instance, if you’re making an attempt to get an AWS Methods Supervisor parameter:
identify="xyz"
aws ssm get-parameter --name $identify
Then you definitely may need issues out of order and the CLI is studying identify as a parameter identify as a substitute of the worth:
identify="xyz"
aws ssm get-parameter $identify --name
One other concern I simply had was that I had further areas in a concatenated model of my command:
identify=" xyz"
aws ssm get-parameter --name $identify
Apparently the CLI (at the least for SSM Parameters) doesn’t strip the areas originally of enter and makes use of an area as a delimiter when parsing the command. You will discover issues like this by printing out your command:
echo "aws ssm get-parameter --name $identify"
Which reveals you the issue:
aws ssm get-parameter --name xyz
Take away the undesirable areas with sed:
identify=" xyz"
identify=$identify | sed 's/ //g'
aws ssm get-parameter --name $identify
If this helped you otherwise you had this downside, please clap!
Teri Radichel — Observe me @teriradichel on Twitter
© 2nd Sight Lab 2022
____________________________________________
About this weblog:
Need to study extra about Cybersecurity and Cloud Safety? Take a look at: 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 take a look at 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 lessons, articles, white papers, displays, and podcasts