'AWS SSM put parameter Validation Exception
I am getting error when I execute the below command. But as far as I have googled, I see the syntax is correct.
Command 1:
aws ssm put-parameter --name /Finance/Payroll/elixir3131 --value "P@sSwW)rd" --type SecureString
Command 2:
aws ssm put-parameter --name "/Finance/Payroll/elixir3131" --value "P@sSwW)rd" --type SecureString
for both the commands I get :
An error occurred (ValidationException) when calling the PutParameter operation: Parameter name must be a fully qualified name.
AWS CLI Version : aws-cli/1.14.16 Python/2.7.9 Windows/7 botocore/1.8.20
Solution 1:[1]
I have had the same issue using Git-Bash on Windows 10
One way around this 'feature' is to use the --cli-input-json
e.g.
aws ssm put-parameter --cli-input-json '{"name": "/Finance/Payroll/elixir3131", "value": "P@sSwW)rd", "type": "SecureString"}'
There does seem to be some discussion about this feature/issue (and the above solution) here: https://github.com/aws/aws-cli/issues/2507
EDIT: This is the correct command:
aws ssm put-parameter --cli-input-json '{\"Name\": \"/Finance/Payroll/elixir3131d\", \"Value\": \"P@sSwW)rd\", \"Type\": \"SecureString\"}'
Solution 2:[2]
I tried both of your commands. No problems on Windows 10 x64 Pro.
AWS Systems Manager has changed a lot recently. I would upgrade your version of the AWS CLI and try again. Your version was released on Dec-22-2017. The current version is 1.16.38 (10-19-2018).
aws-cli/1.16.15 Python/3.6.1 Windows/10 botocore/1.12.5
Solution 3:[3]
None of the commands in Tim Sibley's answer worked for me, but
aws ssm put-parameter --cli-input-json '{"Name": "/Finance/Payroll/elixir3131", "Value": "P@sSwW)rd", "Type": "SecureString"}'
did.
This command is the same as the first command on that answer but with "name", "value" and "type" capitalized.
Solution 4:[4]
I was getting the same error using aws-sdk
npm package:
ValidationException: Parameter name must be a fully qualified name.
If the Name
parameter contains /
, it must also start with a /
.
Here is a confirmed working typescript example (assuming AWS_PROFILE
and AWS_REGION
env variables are set):
#!/usr/bin/env ts-node
import * as AWS from 'aws-sdk'
const secret = {
Name: "/Finance/Payroll/elixir3131",
Value: "P@sSwW)rd",
Type: "SecureString"
}
const ssm = new AWS.SSM()
ssm.putParameter(secret, (err, data) => {
if (err) {
console.log(err, err.stack);
} else {
console.log(data);
}
});
Response should look like this:
{ Version: 1, Tier: 'Standard' }
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Modi Navon |
Solution 2 | John Hanley |
Solution 3 | cigien |
Solution 4 | GabLeRoux |