Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

"CreateBucket operation: Access Denied..." when calling Session.default_bucket() #1935

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
kianho opened this issue Oct 1, 2020 · 1 comment

Comments

@kianho
Copy link

kianho commented Oct 1, 2020

Describe the bug
Calling default_bucket() on a sagemaker.session.Session object, when specifying a custom default_bucket, raises:

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

when the default bucket already exists

possibly related to #1174

To reproduce

bucket = "bucket-that-exists"
boto_session = boto3.session.Session(region_name="ap-southeast-2")
sm_session = sagemaker.Session(boto_session, default_bucket=bucket)

sm_session.default_bucket()
  • I added a command to L387 of src/sagemaker/session.py to display the number of keys in the bucket to verify that the intended default bucket is accessed:

image

  • bucket.creation_date returns None even when the bucket exists
  • could be tricky to reproduce, the execution role has limited permissions (can only list, upload/download, to/from this bucket), for example aws s3 ls is denied, let me know if there is any more info you need

image

Expected behavior
sm_session.default_bucket() should return the same default bucket name specified when constructing the sagemaker session object.

Screenshots or logs
If applicable, add screenshots or logs to help explain your problem.
image

System information
A description of your system. Please provide:

  • SageMaker Python SDK version: 2.12.0 (boto3 1.14.60)
  • Python version: Python 3.6.10 :: Anaconda, Inc.
@ajaykarpur
Copy link
Contributor

Does your role have access to the bucket?

It looks like #1174 was addressed in #1176.

@aws aws locked and limited conversation to collaborators May 20, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

4 participants