Parameter Store: Overwrite argument ignored?

0

Hello,

I am running the put-parameter as follows

aws ssm put-parameter --no-overwrite --region $REGION --cli-input-json $INPUT

with input looking like this:

{
  "Name": "/key",
  "Value": "whatever",
  "Type": "String",
  "Overwrite": false
}

This results in

An error occurred (ParameterAlreadyExists) when calling the PutParameter operation: The parameter already exists. To overwrite this value, set the overwrite option in the request to true.

I am not sure what I am doing wrong. Any idea?

pbocan
已提问 1 个月前85 查看次数
1 回答
0

Use the --overwrite switch which will create a new version of the parameter.. Remove Overwrite from the json too

TBH its a bit contradicting.

The new version number of a parameter. If you edit a parameter value, Parameter Store automatically creates a new version and assigns this new version a unique ID. You can reference a parameter version ID in API operations or in Systems Manager documents (SSM documents)

profile picture
专家
已回答 1 个月前
profile picture
专家
已审核 1 个月前
  • There is no option to just skip the existing key?

  • Sorry skip?

  • skip if AlreadyExists occurs. If I have a bunch of keys already existing I would like to just continue without override and failing.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则