Expected: ',', received: ']' AWS SSM RunShellScript

I want to update many instances, so I have made a script with this command:

aws ssm send-command --instance-ids "$y" --document-name AWS-RunShellScript --parameters commands='yum -y update; needs-restarting -r; if \[ $? -eq 1 \]; then exit 194' --cloud-watch-output-config "CloudWatchOutputEnabled=true"

Instead of running the command on the machines specified by $y, it says: Error parsing parameter '--parameters': Expected: ',', received: ']' for input: commands=yum -y update; needs-restarting -r; if \[ 252 -eq 1 \]; then exit 194; else exit 0; fi

Note that the $? is referenced as 252 for some reason.



Comments

Popular posts from this blog

Today Walkin 14th-Sept

Hibernate Search - Elasticsearch with JSON manipulation

Spring Elasticsearch Operations