diff --git a/lib/ex_aws/credentials_ini/file.ex b/lib/ex_aws/credentials_ini/file.ex index 9defe235..41f1f3b1 100644 --- a/lib/ex_aws/credentials_ini/file.ex +++ b/lib/ex_aws/credentials_ini/file.ex @@ -227,6 +227,8 @@ if Code.ensure_loaded?(ConfigParser) do end def parse_ini_file({:ok, contents}, profile_name) do + composite_key = "profile " <> profile_name + contents |> ConfigParser.parse_string() |> case do @@ -234,7 +236,7 @@ if Code.ensure_loaded?(ConfigParser) do merge_special_keys(full, config) |> strip_key_prefix() - {:ok, %{("profile " <> ^profile_name) => config} = full} -> + {:ok, %{^composite_key => config} = full} -> merge_special_keys(full, config) |> strip_key_prefix()