aws / amazon-sagemaker-examples

Example 📓 Jupyter notebooks that demonstrate how to build, train, and deploy machine learning models using 🧠 Amazon SageMaker.
https://sagemaker-examples.readthedocs.io
Apache License 2.0
9.8k stars 6.67k forks source link

[Bug Report] Forbidden(403) on Introduction to JumpStart - Sentence Pair Classification #4590

Open brunodoamaral opened 3 months ago

brunodoamaral commented 3 months ago

Link to the notebook Add the link to the notebook.

Describe the bug On session 2. Select a pre-trained model, the s3 bucket returns "forbidden" for url s3://jumpstart-cache-prod-us-east-1/models_manifest.json ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden

The above exception occurs on a "optional" cell, but if not executed an NameError: name 'dropdown' is not defined is raised on 3.1. Retrieve JumpStart Artifacts & Deploy an Endpoint

To reproduce Just run the code on a regular user account.

Logs

---------------------------------------------------------------------------
ClientError                               Traceback (most recent call last)
Cell In[10], line 5
      2 import ipywidgets as widgets
      4 # download JumpStart model_manifest file.
----> 5 boto3.client("s3").download_file(
      6     f"jumpstart-cache-prod-{aws_region}", "models_manifest.json", "models_manifest.json"
      7 )
      8 with open("models_manifest.json", "rb") as json_file:
      9     model_list = json.load(json_file)

(...)

File ~/anaconda3/envs/python3/lib/python3.10/site-packages/botocore/client.py:1009, in BaseClient._make_api_call(self, operation_name, api_params)
   1005     error_code = error_info.get("QueryErrorCode") or error_info.get(
   1006         "Code"
   1007     )
   1008     error_class = self.exceptions.from_code(error_code)
-> 1009     raise error_class(parsed_response, operation_name)
   1010 else:
   1011     return parsed_response

ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden