Error parsing parameter '--targets': Expected: '=', received: ''' for input: '[Key:InstanceIds]'

Viewed 1892
aws ssm send-command --document-name "arn:aws:ssm:---" --targets \'[{"Key":"InstanceIds","Values":['"$instance_id"']}]\' --parameters \'{}\' --timeout-seconds 600 --max-concurrency "50" --max-errors "0" --region us-east-1

just trying to execute this command and yet i get the error about the

Error parsing parameter '--targets': Expected: '=', received: ''' for input: '[Key:InstanceIds]'

any assistance?

1 Answers

This is the wrong format for the --targets argument.

It should instead be formatted as the below syntax as seen in the documentation.

--targets "Key=instanceids,Values=$instance_id"
Related