Skip to content

Commit

Permalink
Fix SSO error for non-SSO regions
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardd committed Aug 17, 2022
1 parent 0b23512 commit 0b63c5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ex_aws/credentials_ini/file.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ if Code.ensure_loaded?(ConfigParser) do
def security_credentials(profile_name) do
config_credentials = profile_from_config(profile_name)
shared_credentials = profile_from_shared_credentials(profile_name)
config = ExAws.Config.http_config(:sso)

case config_credentials do
%{
sso_start_url: sso_start_url,
sso_account_id: sso_account_id,
sso_role_name: sso_role_name
} ->
config = ExAws.Config.http_config(:sso)
case get_sso_role_credentials(sso_start_url, sso_account_id, sso_role_name, config) do
{:ok, sso_creds} -> {:ok, Map.merge(sso_creds, shared_credentials)}
{:error, _} = err -> err
Expand Down

0 comments on commit 0b63c5d

Please sign in to comment.