aws / aws/amazon-sagemaker-examples

[Seq2Seq Example : Access denied error when downloading pretrained model from AWS S3 bucket ]

Open
#3,584 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
11k
Forks
7k
Avg merge
8h 29m
Merged PRs (30d)
8

Description

**Link to the notebook**
[Add the link to the notebook.](https://github.com/aws/amazon-sagemaker-examples/tree/main/introduction_to_amazon_algorithms/seq2seq_translation_en-de)

**Describe the bug**
When downloading the pretrained model from the AWS S3 bucket , I get an access denied error on the bucket

**To reproduce**
A clear, step-by-step set of instructions to reproduce the bug.

use_pretrained_model = True
model_name = "example-model"
!curl https://s3-us-west-2.amazonaws.com/seq2seq-data/model.tar.gz > model.tar.gz
!curl https://s3-us-west-2.amazonaws.com/seq2seq-data/vocab.src.json > vocab.src.json
!curl https://s3-us-west-2.amazonaws.com/seq2seq-data/vocab.trg.json > vocab.trg.json
upload_to_s3(bucket, prefix, 'pretrained_model', 'example.tar.gz')
model_data = "s3://{}/{}/pretrained_model/example.tar.gz".format(bucket, prefix)

**Logs**
If applicable, add logs to help explain your problem.
You may also attach an `.ipynb` file to this issue if it includes relevant logs or output.

ClientError: An error occurred (AccessDenied) when calling the ListObjectsV2 operation: Access Denied

Contributor guide

Open the contributing guide

Research direction

Open the Seq2Seq translation notebook at introduction_to_amazon_algorithms/seq2seq_translation_en-de and inspect the pretrained-model download commands for seq2seq-data/model.tar.gz and the vocabulary files. Reproduce the curl download and subsequent upload_to_s3/model_data flow, then verify that the pretrained model can be downloaded and used without the reported S3 AccessDenied error.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, jupyter-notebook
Domain
cloud, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.