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
asked a month ago76 views
1 Answer
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
EXPERT
answered a month ago
profile picture
EXPERT
reviewed a month ago
  • 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.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions