you must have following pre-requsite
instance_id = '' # hard-code for example
document_name = '<>' # run command document name
command_param = {'commands': ['sh /root/shellscript.sh '+ shellparam]}, # shell script path
s3_bucket = 'mybucket' # to store the logs