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
demandé il y a un mois85 vues
1 réponse
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
répondu il y a un mois
profile picture
EXPERT
vérifié il y a un mois
  • 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.

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions