Missing Support for Assumed IAM Roles (aws_session_token credentials)
See original GitHub issueI was very excited to find this library, as I needed a solution streaming large datasets to S3. Unfortunately, it looks like it can’t support credentials from an assumed IAM role.
From what I can tell, the only way to configure AWS credentials is by embedding the credentials in the S3 URI:
s3://my_aws_key_id:key_secret@my_bucket/lines.txt
But in order to use an assumed IAM role, I need the access_key_id, the secret_access_key and a session_token.
It would make more sense to me if I could pass in a boto3 session directly to smart open. Boto3 allows a number different methods for configuring credentials, so I would rather use an existing sessions, than try to rewrite the wheel in this library.
If you can give me some direction, I can look into opening a PR. Otherwise, my options are to fork, or to roll my own streaming wrapper…
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:5 (5 by maintainers)
So I’m sorry – I apparently didn’t look at existing PRs, before opening this issues. Looks like we have a couple PRs working on this already: #149 and #130. I’ll see if I can help shepherd those through.
A PR will be great, as that functionality sounds useful. We already came across such request several times, so the demand is clearly there and it’s well scoped.
There was a related PR recently, #194 – feel free to use that as the starting point.