title: Errors while using sagemaker api to invoke endpoints
body: <p>I've deployed an endpoint in sagemaker and was trying to invoke it through my python program. I had tested it using postman and it worked perfectly ok. Then I wrote the invocation code as follows</p>
  
  <pre><code>import boto3
  import pandas as pd
  import io
  import numpy as np
  
  def np2csv(arr):
      csv = io.BytesIO()
      np.savetxt(csv, arr, delimiter=',', fmt='%g')
      return csv.getvalue().decode().rstrip()
  
  
  runtime= boto3.client('runtime.sagemaker')
  payload = np2csv(test_X)
  
  runtime.invoke_endpoint(
      EndpointName='&lt;my-endpoint-name&gt;',
      Body=payload,
      ContentType='text/csv',
      Accept='Accept'
  )
  </code></pre>
  
  <p>Now whe I run this I get a validation error</p>
  
  <pre><code>ValidationError: An error occurred (ValidationError) when calling the InvokeEndpoint operation: Endpoint &lt;my-endpoint-name&gt; of account &lt;some-unknown-account-number&gt; not found.
  </code></pre>
  
  <p>While using postman i had given my access key and secret key but I'm not sure how to pass it when using sagemaker apis. I'm not able to find it in the documentation also. </p>
  
  <p>So my question is, how can I use sagemaker api from my local machine to invoke my endpoint?</p>