question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing Support for Assumed IAM Roles (aws_session_token credentials)

See original GitHub issue

I 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:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
eschwartzcommented, Jun 14, 2018

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.

1reaction
piskvorkycommented, Jun 14, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AssumeRole - AWS Security Token Service
You can use the role's temporary credentials in subsequent AWS API calls to access resources in the account that owns the role. You...
Read more >
Troubleshooting IAM roles - AWS Documentation - Amazon.com
When you assume a role using the AWS Management Console, make sure to use the exact name of your role. Role names are...
Read more >
Using temporary credentials with AWS resources
Use temporary security credentials from IAM STS to make programmatic requests for AWS resources with the AWS SDKs or API calls.
Read more >
Assume role credentials - AWS SDKs and Tools
Assuming a role involves using a set of temporary security credentials that you can use to access AWS resources that you might not...
Read more >
Requesting temporary security credentials - AWS Identity and ...
A set of temporary security credentials. These consist of an access key ID, a secret access key, and a session token. The role...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found