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 個月前檢視次數 86 次
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.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南