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
s3_region = 'eu-west-1'
sns_arn = '<>' # for notification
sns_role_arn = '<>' # to push the notificatan the role must have assume role permission
dynamodb_table = '<>' # to store the status and shell param