Open chrismo opened 1 year ago
fwiw, terraform has a similar limitation: https://github.com/hashicorp/terraform-provider-aws/issues/28263
Okay, took me a while to pin down, because that's a super misleading error message (and I'm just adding some code to improve it now). But yes, the upshot is that nobody has written code to support that style of auth config. PRs welcome :)
Thanks for the detailed report.
Incidentally, if you're looking to add support, the place to do it is lib/ex_aws/credentials_ini/file.ex
:)
I can confirm, with {:awscli, "default", 30}
it works but it does not for profiles other than "default"
A bit looked into the code but could not track down the cause. Strangely credentials_ini/file.ex DOES have profile resolution mechanism implemented so there must be wiring issues somewhere.
Ah my previous comment was somewhat off. As @chrismo wrote,
Using the newer sso-session config which supports automatic token refresh.
Expected behavior is that the request would succeed. If the configuration changes back to the legacy config, then the request works.
So I can confirm that the problem is, ex_aws's awscli config provider not yet supporting newer aws sso config structure (sso-session).
For the time being, I'm going to revert my sso config to legacy structure as a workaround.
Environment
mix deps |grep ex_aws
mix deps | grep hackney
Current behavior
Using the newer sso-session config which supports automatic token refresh.
~/.aws/config
runtime.exs
iex
Expected behavior
Expected behavior is that the request would succeed. If the configuration changes back to the legacy config, then the request works.
~/.aws/config
iex