title: Value at 'body' failed to satisfy constraint: Member must not be null
body: <p>I'm trying to run a prediction using a sagemaker endpoint. The input format is comma separated features and | separated observations.
  However when I try to iterate over the input data and invoke the end point on every iteration like this :</p>
  <pre><code>ENDPOINT_NAME = &quot;my_endpoint&quot;
  runtime= boto3.client('runtime.sagemaker')
  results = []
  for r in request_body.split('|'):
      response = runtime.invoke_endpoint(EndpointName=ENDPOINT_NAME,
                                          ContentType='text/csv',
                                          Body=r)
  result = json.loads(response['Body'].read().decode())
  results.append(result)
  </code></pre>
  <p>I get the following error:</p>
  <blockquote>
  <p>ValidationError: an error occurred (ValidationError) when calling the InvokeEndpoint operation: 1 validation error detected: Value at 'body' failed to satisfy constraint: Member must not be null</p>
  </blockquote>
  <p>As a sanity check I ran :</p>
  <pre><code>for r in request_body.split('|'):
      print(r)
  </code></pre>
  <p>And I get the result I expect to get:</p>
  <pre><code>3.0,0.0,4795.0,0.0,1.0,24.0,30.0,25.0,3.0
  3.0,2.0,3818.0,0.0,3.0,10.0,22.0,11.0,11.0
  5.0,0.0,3565.0,0.0,1.0,79.0,89.0,80.0,-66.0
  5.0,-1.0,3227.7,0.0,0.0,16.0,17.0,17.0,1.0
  5.0,0.0,3375.0,0.0,2.0,21.0,45.0,22.0,6.0...etc
  </code></pre>
  <p>Which leads me to believe that the logic in extracting the separate observations is sound, but somehow when I execute the call I get this null value error.</p>
  <p>The idea is to get ordered predictions so that I can later map them to an id that is not part of the training features and hence not in the dataset.</p>
  <p>Thank you in advance.</p>