Question Eduard Lebedyuk · Jul 13, 2023 How can I run an iris sql command using AWS SSM? I'm trying to execute SQL on a EC2 via SSM: import boto3 instanceid = "i-123456789" sql = """SELECT path FROM Security.Applications WHERE ID = '/csp/sys'""" template = """su - irisusr -c 'cat << EOF | iris sql iris -U %SYS """ + sql + """ q EOF' """ template = [line.strip() for line in template.splitlines()] template = """\n""".join(template) ssm_client = boto3.client('ssm') response = ssm_client.send_command( InstanceIds=[instanceid], DocumentName="AWS-RunShellScript", Comment=AWS, Parameters={'commands': template}) #AWS #Cloud #SQL #InterSystems IRIS 0 0 0 178