title: How to write python command line arguments in boto3 to execute on EC2 Instance (SSM)
body: <pre><code>import boto3
  
  def execute_commands_on_linux_instances(client, commands, instance_ids):
  resp = client.send_command(
      DocumentName="AWS-RunShellScript", # One of AWS' preconfigured documents
      Parameters={'commands': commands},
      InstanceIds=instance_ids
  
  ssm_client = boto3.client('ssm', region_name = 'us-west-2')
  commands = ["python test.py arg1 arg2 arg3"]
  instance_ids = ["i-xxxxxxxxxx"]
  execute_commands_on_linux_instances(ssm_client, commands, instance_ids)
  </code></pre>
  
  <p><strong>Anyone know how to pass python command line arguments into Boto3 SSM client?</strong></p>
  
  <p>I'm able to write the command line argument within the EC2 instance as</p>
  
  <pre><code>python test.py arg1 arg2 arg3
  </code></pre>
  
  <p>The command above works.</p>
  
  <p><strong>However executing the argument within SSM, it says the python file is not found.</strong> </p>
  
  <p>I re-checked the directory and it seems that when I type -ls it retrieves a list of Amazon functions instead of a list of files. 
  Anyone know how to re-write this command line argument or know any documentation to write this within the boto3.client? Much appreciated.</p>