Describe the bug
default_bucket returning incorrect bucket and default_bucket_prefix returning None from sagemaker_core python SDK in SageMaker Unified Studio. This works fine in sagemaker python sdk.
As a temporary workaround, this commit has been merged: aws/amazon-sagemaker-examples@ccdfae2
To reproduce
In a JupyterLab notebook running in SageMaker Unified Studio
from sagemaker_core.helper.session_helper import get_execution_role, Session
sagemaker_session = Session()
s3_bucket_name = sagemaker_session.default_bucket()
default_bucket_prefix = sagemaker_session.default_bucket_prefix
print(f"Test s3_bucket_name: {s3_bucket_name}")
# Prints something like sagemaker-us-east-2-715841365766, when it should print something likeamazon-sagemaker-715841365766-us-east-2-018ae31e0f88
print(f"Test default_bucket_prefix: {default_bucket_prefix}")
# Prints None, when it should print a string
Expected behavior
In psuedocode above.
Additional info
This commit may be updated to pull default_bucket and default_bucket_prefix from sagemaker_core instead of sagemaker once this issue has been fixed.