ex-aws / ex_aws

A flexible, easy to use set of clients AWS APIs for Elixir
https://hex.pm/packages/ex_aws
MIT License
1.27k stars 526 forks source link

Add support for AWS SSO credentials #866

Closed james-gibson-fr closed 2 years ago

james-gibson-fr commented 2 years ago

Work to resolve https://github.com/ex-aws/ex_aws/issues/843 based on the fork from @joeybaer. Huge thank you to both Joey and @patrickcsullivan for help and feedback on the PR!

Adds support in ExAws.CredentialsIni.File to pull the credentials expected throughout ex_aws from the temporary credentials provided by aws sso login stored in .aws/sso/cache/. This way users (like me) don't have to run a script prior to running elixir to generate the credentials and can instead just rely on the sso config like the aws cli does.

Sorry for a bit of spam creating this, didn't anticipate it would show up in the issue itself whenever I added a link to the issue from a PR description

bernardd commented 2 years ago

This looks fantastic, thanks @james-gibson-fr (and @joeybaer and @patrickcsullivan). Would you be kind enough to run mix format over it (using Elixir 1.13) and check that mix dialyzer passes if you haven't already? Once that's done we'll get it merged :)

james-gibson-fr commented 2 years ago

Done! Had to change a bit to fix an error from mix dialyzer but it seems happy now

Total errors: 0, Skipped: 0, Unnecessary Skips: 0
done in 0m0.65s
done (passed successfully)
bernardd commented 2 years ago

Perfect, thanks for getting this over the line @james-gibson-fr.