title: Amazon Sagemaker. AccessDeniedException when calling the InvokeEndpoint operation
body: <p>I have deployed an Endpoint on Amazon SageMaker.
  Now I am trying to Invoke it.</p>
  
  <p>If I run this code in Sagemaker's Jupyter Notebook: </p>
  
  <pre><code>client = boto3.client('sagemaker-runtime')
  endpoint_name = 'DEMO-XGBoostEndpoint'
  body = ','.join(['1.0'] * 6)
  response = client.invoke_endpoint(EndpointName=endpoint_name,
                                 ContentType='text/csv',
                                 Body=body)
  response['Body'].read()
  </code></pre>
  
  <p>it works properly.</p>
  
  <p>But if I run the same code, with added credentials for boto3 client, from my machine:</p>
  
  <pre><code>client = boto3.client('sagemaker-runtime', 
                         aws_access_key_id=ACCESS_ID,
                         aws_secret_access_key= ACCESS_KEY)
  endpoint_name = 'DEMO-XGBoostEndpoint'
  body = ','.join(['1.0'] * 6)
  response = client.invoke_endpoint(EndpointName=endpoint_name,
                                 ContentType='text/csv',
                                 Body=body)
  response['Body'].read()
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>ClientError: An error occurred (AccessDeniedException) when calling the InvokeEndpoint operation: User: arn:aws:iam::249707424405:user/yury.logachev is not authorized to perform: sagemaker:InvokeEndpoint on resource: arn:aws:sagemaker:us-east-1:249707424405:endpoint/demo-xgboostendpoint-2018-12-12-22-07-28 with an explicit deny</p>
  </blockquote>
  
  <p>If I run the latter piece of code (with added credentials as a parameters of client) on Sagemaker's Jupyter Notebook, I also get the same error.</p>
  
  <p>I understand that the solution should be linked with roles, policies etc, but could not find out it.</p>