The below is the code which i am running from python to execute commands in aws ec2 instance
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"]})
But it is giving the below error
InvalidInstanceId: An error occurred (InvalidInstanceId) when calling the SendCommand operation:
idsa valid list of EC2 instance IDs? The error message is saying that it isn't. - Mark Bidsa list or a single string? It expects it to be a list. - Mark Bus-east-1region? - Mark B