-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Description
I was recently trying SSM, and found the following two issues with aws-cli when I copied the command from the AWS webpage:
aws ssm send-command --document-name "AWS-UpdateLinuxAmi" --document-description "Update a Linux AMI. By default this will update distribution packages and Amazon software." --instance-ids "i-0123456789" --parameters '{"TargetAmiName":["UpdateLinuxAmi_from_{{SourceAmiId}}on{{global:DATE_TIME}}"],"InstanceType":["t2.micro"],"PreUpdateScript":["none"],"PostUpdateScript":["none"],"IncludePackages":["all"],"ExcludePackages":["none"],"SourceAmiId":["ami-c51e3eb6"],"InstanceIamRole":["SystemsManagerEC2Role"],"AutomationAssumeRole":["SystemsManagerAutomationRole"]}' --timeout-seconds 600 --region eu-west-1
usage: aws [options] [ ...] [parameters]
If I leave in the --document-description I get:
Unknown options: --document-description, Update a Linux AMI. By default this will update distribution packages and Amazon software.
If I remove this, it seems to fall apart parsing the parameters:
"Error parsing parameter '--parameters': Expected: '=', received: ''' for input:
'{TargetAmiName:[UpdateLinuxAmi_from_{{SourceAmiId}}on{{global:DATE_TIME}}],InstanceType:[t2.micro],PreUpdateScript:[none],PostUpdateScript:[none],IncludePackages:[all],ExcludePackages:[none],SourceAmiId:[ami-c51e3eb6],InstanceIamRole:[SystemsManagerEC2Role],AutomationAssumeRole:[SystemsManagerAutomationRole]}'
^"
Any ideas what could be wrong? New to AWS CLI to be honest.