Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression for assume role example #130

Closed
charignon opened this issue Feb 23, 2020 · 3 comments
Closed

Regression for assume role example #130

charignon opened this issue Feb 23, 2020 · 3 comments

Comments

@charignon
Copy link

Thank you for your interest in helping to improve Cognitect's aws-api!

Dependencies

When I run the example for assume role with the following set of dependencies:

{:deps {com.cognitect.aws/api       {:mvn/version "0.8.408"}
        com.cognitect.aws/endpoints {:mvn/version "1.1.11.686"}
        com.cognitect.aws/kms       {:mvn/version "791.2.615.0"}
        com.cognitect.aws/sts       {:mvn/version "773.2.578.0"}
        com.cognitect.aws/iam       {:mvn/version "788.2.609.0"}}}

it works fine

But when I use the more recent dependencies

{:deps {com.cognitect.aws/api       {:mvn/version "0.8.437"}
        com.cognitect.aws/endpoints {:mvn/version "1.1.11.726"}
        com.cognitect.aws/kms       {:mvn/version "791.2.615.0"}
        com.cognitect.aws/sts       {:mvn/version "773.2.578.0"}
        com.cognitect.aws/iam       {:mvn/version "788.2.609.0"}}}

It hangs seemingly forever (I let it run a few minutes) on:

(aws/invoke iam-with-assumed-role {:op :GetUser :request {:UserName (:UserName me)}})

The code example is the one provided in the repo that I linked above.

Stack traces

No stack trace

@dchelimsky FYI

@charignon
Copy link
Author

All the other aspects of the demo seem to be working fine except this.

@dchelimsky
Copy link
Contributor

The problem is that we've got a shared threadpool of 1 for credentials providers here:

(Executors/newScheduledThreadPool 1 (reify ThreadFactory
. The assumed-role-credentials-provider issues its request first, which triggers a request to the inner sts's client, except that one queues up, waiting for the first one to return before the pool will give it a thread to work with.

I'm working on a workaround (until we fix it properly) and will post it here.

@dchelimsky
Copy link
Contributor

I couldn't come up with a good workaround, so I just fixed it in release 0.8.445.

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

No branches or pull requests

2 participants