title: Python Notebook Invoke Endpoint Sagemaker from Local
body: <p>I am trying to invoke an Amazon Sagemaker Endpoint from a local python notebook. This is the code I am using.  </p>
  
  <pre><code>import boto3
  
  aws_access_key_id = '...............'
  aws_secret_access_key = '................'
  tkn = '..........'
  region_name = '............'
  
  amz = boto3.client('sagemaker-runtime',
                     aws_access_key_id=aws_access_key_id,
                     aws_secret_access_key=aws_secret_access_key,
                     aws_session_token=tkn,
                     region_name=region_name)
  
  
  response = amz.invoke_endpoint(
      EndpointName='mymodel',
      Body=b'bytes'
  )               
  </code></pre>
  
  <p>However, this doesn't work. Do I have to specify something else in <em>Body</em> ?   </p>