code: def get_logs(self, log_stream_name, get_last=50):
          
          response = self._log_client.get_log_events(
              logGroupName='/aws/batch/job',
              logStreamName=log_stream_name,
              startFromHead=False)
          events = response['events']
          return '\n'.join(e['message'] for e in events[-get_last:])
docs: Retrieve log stream from CloudWatch