Skip to content

tiledbsoma.open() on S3 hangs with no error when credentials come from an AWS SSO profile (aws sso login) #4465

Description

@royassis

What happened

Opening a SOMA object on S3 from a shell authenticated via aws sso login (an SSO profile only — no static keys, no AWS_* env vars). All of the following are from the same shell:

  • aws s3 ls s3://<bucket>/<prefix>/ (AWS CLI) → succeeds — the data is reachable and the SSO creds are valid for S3
  • boto3 reads from S3 → succeeds
  • tiledbsoma.open(...)hangs (no return, no error)
  • Setting valid AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / AWS_SESSION_TOKEN (e.g. via aws configure export-credentials --format env) → the same open() returns immediately
  • With a stale / invalid static key instead → open() returns quickly with 403 InvalidAccessKeyId

Things we tried that did not change the hang:

  • Refreshing the SSO session (running aws sso login again)
  • vfs.s3.connect_timeout_ms / vfs.s3.request_timeout_ms = 5000
  • AWS_EC2_METADATA_DISABLED=true

Repro

import tiledbsoma

# Shell authenticated via `aws sso login` (SSO profile only; no AWS_* env vars).
# `aws s3 ls s3://<bucket>/<prefix>/` succeeds in this same shell (data is reachable).
ctx = tiledbsoma.SOMATileDBContext()
tiledbsoma.open("s3://<private-bucket>/<prefix>/", soma_type="SOMAExperiment", context=ctx)
# -> hangs (no return, no error)

Environment

  • tiledbsoma 2.3.0 (latest on PyPI)
  • OS: Linux (Ubuntu on WSL2)
  • Python 3.12 and 3.13
  • Region: us-east-1

Question

Is a hang expected when credentials can't be resolved from the chain, or should open() surface an error here? Happy to share more detail or test a patch.

Filed with AI assistance (Claude), based on hands-on debugging; behavior reproduced manually.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions