Skip to content

Add support for assuming a role arn with sts#167

Open
icholy wants to merge 1 commit intotreeverse:mainfrom
icholy:sts_assume
Open

Add support for assuming a role arn with sts#167
icholy wants to merge 1 commit intotreeverse:mainfrom
icholy:sts_assume

Conversation

@icholy
Copy link
Copy Markdown

@icholy icholy commented Feb 27, 2026

This adds a role_arn config option which uses sts:Assume to create temporary credentials for the s3 operations.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 27, 2026

CLA assistant check
All committers have signed the CLA.

@icholy
Copy link
Copy Markdown
Author

icholy commented Feb 27, 2026

ruff is complaining that the _prepare_credentials method is too complex. I extracted my code into a method and I don't think there's any way for me to make it shorter without refactoring surrounding code. But that feels out-of-scope for this PR.

@skshetry
Copy link
Copy Markdown
Collaborator

@icholy, can this be upstreamed to s3fs? If it is possible, I'd prefer that and then wire the support here and/or in dvc.

@icholy
Copy link
Copy Markdown
Author

icholy commented Mar 18, 2026

@skshetry I'll see if they're open to it.

@skshetry
Copy link
Copy Markdown
Collaborator

Thanks @icholy. One more thing, s3fs and DVC uses aiobotocore instead of botocore, so if the aiobotocore provides async version of the APIs, then that'd be preferred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants