2

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

Niklas Rosencrantz
  • 25,640
  • 75
  • 229
  • 424
GreenyMcDuff
  • 3,292
  • 7
  • 34
  • 66

3 Answers3

7

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.

glasko
  • 121
  • 1
  • 3
4

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 
Dennis Kozevnikoff
  • 2,078
  • 3
  • 19
  • 29
2

i got it working by adding a space in front of the names parameter value. To get it working os independent.

aws ssm get-parameters --names " /levelOne/LevelTwo" --with-decryption  
c0l3
  • 765
  • 6
  • 14