You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An AWS request is made (to S3 in my case) and The ExAws.Config.AuthCache delegates to AssumeRoleCredentialsAdapter. AssumeRoleCredentialsAdapter resolves the awscli stuff, but to actually make the assume role, it has to make another request using the source profile credentials. In get_security_credentials ExAws.request` occurs for that. ExAws then goes back to ExAws.Config.AuthCache to try and resolve and cache the default credentials. But that's a GenServer so calling back into creates a deadlock and the GenServer terminates with an error.
The only workaround I've found is to disable "refreshable" on the source profile auth:
def adapt_auth_config(%{source_profile: source_profile} = auth, _, expiration, loader) do
source_profile_auth = loader.(source_profile) |> Map.put(:refreshable, false)
get_security_credentials(auth, source_profile_auth, expiration)
end
I don't exactly know what the implications of that are, but I assume that the base credentials could expire and it would just stop working after some time. This is OK for me right now because this is just for local development, but might not work in a long-running scenario.
The text was updated successfully, but these errors were encountered:
Environment
Current behavior
Using AssumeRoleCredentialsAdapter just doesn't seem to work at all.
In the application config/dev.exs, I configured ex_aws to use AssumeRoleCredentialsAdapter and my awscli config:
My local config uses a role_arn and a source_profile to allow me to assume role from another account:
An AWS request is made (to S3 in my case) and The ExAws.Config.AuthCache delegates to AssumeRoleCredentialsAdapter. AssumeRoleCredentialsAdapter resolves the awscli stuff, but to actually make the assume role, it has to make another request using the source profile credentials. In
get_security_credentials
ExAws.request` occurs for that. ExAws then goes back to ExAws.Config.AuthCache to try and resolve and cache the default credentials. But that's a GenServer so calling back into creates a deadlock and the GenServer terminates with an error.Expected behavior
STS should be able to assume role
The only workaround I've found is to disable "refreshable" on the source profile auth:
I don't exactly know what the implications of that are, but I assume that the base credentials could expire and it would just stop working after some time. This is OK for me right now because this is just for local development, but might not work in a long-running scenario.
The text was updated successfully, but these errors were encountered: