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
gefragt vor einem Monat86 Aufrufe
1 Antwort
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
EXPERTE
beantwortet vor einem Monat
profile picture
EXPERTE
überprüft vor einem Monat
  • 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.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen