title: InvalidInstanceId: An error occurred (InvalidInstanceId) when calling the SendCommand operation
body: <p>The below is the code which i am running from python to execute commands in aws ec2 instance</p>
  
  <pre><code>import boto3
  ec2 = boto3.client('ssm',region_name='us-east-1',aws_access_key_id='xxxxxxxxxxxxxxx',aws_secret_access_key='xxxxxxxxx')
  a = ec2.send_command(InstanceIds=ids, DocumentName='AWS-RunShellScript', Comment='abcdabcd', Parameters={"commands":["ifconfig"]})
  </code></pre>
  
  <p>But it is giving the below error</p>
  
  <pre><code>InvalidInstanceId: An error occurred (InvalidInstanceId) when calling the SendCommand operation: 
  </code></pre>