Open kxkannan opened 1 year ago
FYI, this seems to happen in release 2.4.2
. I don't see this error in 2.4.1
Saw this trying to use ex_aws_sts for assumed role access. During the call to case adapter.adapt_auth_config(auth, profile, expiration) do
the plugin initiates a new request which attempts to access the Genserver again. That is a deadlock and so fails.
That still happens in 2.4.1 as well though. That seems like a fundamental problem with the assumed role authentication use case.
e.g.
config :ex_aws,
secret_access_key: [{:awscli, "fb2b_staging", 30}],
access_key_id: [{:awscli, "fb2b_staging", 30}],
awscli_auth_adapter: ExAws.STS.AuthCache.AssumeRoleCredentialsAdapter,
awscli_credentials: %{
"default" => %{
secret_access_key: [{:awscli, "default", 30}],
access_key_id: [{:awscli, "default", 30}],
},
"fb2b_staging" => %{
role_arn: "arn:aws:iam::xxxxxxx:role/fb2b-developer-role",
source_profile: "default"
}
}
Thanks for the report. This one's gonna need some thinking - the short version is that the the auth cache is trying to update itself which is triggering a request which is (for some reason) trying to get credentials by calling the auth cache. I'm going to have to do some digging to figure out exactly what the right solution is.
Linking this up with https://github.com/ex-aws/ex_aws_sts/issues/35, the issue on the ex_aws_sts
plugin page
Environment
mix deps |grep ex_aws
: ex_aws 2.4.2mix deps | grep hackney
: hackney 1.18.1Current behavior
Include code samples, errors and stacktraces if appropriate.
Expected behavior
This error shouldn't appear.
Used to work until I updated to Elixir 1.14.4 and Erlang 25.3.