def send_command()

in source/lib/ssm.py [0:0]


    def send_command(self, instance_id, document_name, replace_dict):
        try:
            bucket_name = replace_dict.get('${_s3bucket}')
            self.logger.debug('SSM Bucket Name: {}'.format(bucket_name))
            response = ssm_client.send_command(
                InstanceIds=[instance_id],
                DocumentName=document_name,
                TimeoutSeconds=120,
                OutputS3BucketName=bucket_name,
                OutputS3KeyPrefix='ssm-logs',
                Parameters={"commands": self.create_command(replace_dict)},
                Comment='EFS Backup Solution: Performs cleanup, '
                        'upload logs files to S3, updates DDB and lifecycle hook. '
            )
            self.logger.debug(dumps(response, indent=4, cls=DateTimeEncoder))
            return response
        except Exception as e:
            self.logger.error("unhandled exception: SimpleSystemsManager_send_command", exc_info=1)
            return 'unhandled exception'