import boto3

def hello(event, context):
    ssm_client = boto3.client('ssm', region_name="af-south-1") # use region code in which you are working
    response = ssm_client.send_command(
             InstanceIds=[
                "i-09f3d448cd4510c1a" # use instance id on which you want to execute, even multiple is allowd
                     ],
             Targets = [{"Key":"InstanceIds","Values":["i-09f3d448cd4510c1a"]}],
             DocumentName="AWS-RunPowerShellScript",
             Parameters={"commands":["c:\\ssis-launch\\cemis-reports-generate.bat \""+event['Report']+"\" \""+event['ReportParamByEntityType']+"\" \""+event['ReportParamByEntity']+"\" \""+event['ReportExportFormat']+"\" \""+event['ReportEmailOverrideTo']+"\" \""+event['ReportParamByHierarchy']+"\" \""+event['ReportEmailEntityRole']+"\" "+event['ReportEmailSend']+" >> c:\ssis-launch\cemis-reports-generate-error.txt"],"workingDirectory":[""],"executionTimeout":["30"]},
    )

    # Parameters={"commands":["c:\\ssis-launch\\cemis-reports-generate.bat >> c:\ssis-launch\cemis-reports-generate-error.txt"],"workingDirectory":[""],"executionTimeout":["30"]},

    # command_id = response['Command']['CommandId']
    # output = ssm_client.get_command_invocation(
    #      CommandId=command_id,
    #      InstanceId='i-0d8c8d46b34dd0c39',
    #    )
    #print(output)