Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS CLI SSM get-parameters InvalidParameters on Windows

I'm using

GitBash v2.17.0

AWS CLI v1.16.67

Windows 10

Problem

I've created a SecureString parameter in the AWS SSM Parameter Store. For sake of example, let's call the parameter

/levelOne/levelTwo  

I'm trying to retrieve the parameter using the AWS CLI. To do this I am using the following command:

aws ssm get-parameters --names '/levelOne/LevelTwo' --with-decryption  

The problem is that the result returned is this:

enter image description here

As you can see, the parameter is being prefixed with C:/Program Files/Git. Can anyone explain what I have done wrong please?

Thanks

like image 496
GreenyMcDuff Avatar asked Oct 20 '25 04:10

GreenyMcDuff


2 Answers

This is caused by POSIX path conversion in MinGW.

You can work around this by substituting // for the leading /, and then replacing the subsequent forward slashes with backslashes, e.g.

aws ssm get-parameters --names '//levelOne\levelTwo'

This command will only run correctly in MinGW, i.e. it will fail in Bash or Windows CMD.

like image 198
glasko Avatar answered Oct 22 '25 22:10

glasko


I faced the same issue. Check the region selected while you create the parameter store from the console. The reason for this is that Aws-ssm is regional service.

aws ssm get-parameters --names "/levelOne/LevelTwo" --region us-west-1 --with-decryption 
like image 31
wassim bezine Avatar answered Oct 22 '25 22:10

wassim bezine



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!