Skip to content

Commit

Permalink
print iam role
Browse files Browse the repository at this point in the history
  • Loading branch information
tihuan committed Dec 23, 2024
1 parent 0ca2e83 commit 366e793
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions server/common/utils/data_locator.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ def discover_s3_region_name(uri): # type: ignore
bucket = urlparse(uri).netloc
print(f"Attempting to discover region for bucket: {bucket}")
client = boto3.client("s3")

# DEBUG
# DEBUG
# DEBUG Check identity of assumed role
sts_client = boto3.client("sts")
response = sts_client.get_caller_identity()
print(f"Assumed role details: {response}")

try:
res = client.head_bucket(Bucket=bucket)
print(f"Received response for head_bucket: {res}")
Expand Down

0 comments on commit 366e793

Please sign in to comment.