Import image/video from bucket

0

I set up domain, user and IAM to use Sagemaker studio when I created it, I custom my default bucket. But when I run Session().default_bucket() it returns sagemaker-<region>-<account_id> but I would like to return my custom bucket. Secondly, when I import an image or video from sagemaker-<region>-<account_id> whit S3 URI (s3: //sagemaker-<region>-<account_id>/test.jpg, s3: //sagemaker-<region>-<account_id>/test.mp4) I have error message Video not found.

1개 답변
1
수락된 답변

To set your own bucket as default bucket you can create the session with

session = sagemaker.Session(default_bucket="your-custom-bucket")

session.default_bucket() # == "your-custom-bucket"

You also need to ensure the the sagemaker execution role has the right permissions on the bucket.

For your second question you need to ensure that the objects exist (confirm using the S3 console) and that the Sagemaker execution role allow access to the bucket and the objects within.

See https://sagemaker.readthedocs.io/en/stable/api/utility/session.html#

AWS
전문가
답변함 6달 전
  • I know it but I would not like to set up my default bucket every time. When can I setup it in my S3Policy IAM role or Sagemaker domain settings?

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠