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.26k stars 521 forks source link

Add support for credentials_process #911

Closed JoeyBG closed 1 year ago

JoeyBG commented 1 year ago

Closes #664.

I've been testing it locally for a couple weeks, since I now use 1Password to store my AWS credentials.

I did my best to add clear error messages 🙂!

Here's the relevant AWS documentation : https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sourcing-external.html

bernardd commented 1 year ago

Hi @JoeyBG Thanks for the PR, that all looks great. Would you be able to add some docs/examples and some tests to cover the functionality please? Apologies for the delay getting back to you.

JoeyBG commented 1 year ago

Hi @bernardd,

I'll add an example sometime this week - I'm not sure I should add documentation, besides maybe a link to the official AWS doc, since it's basically going to be saying the same thing, and risk being outdated if they change how it works.

I tried adding tests before opening the PR, but I couldn't easily find a way without refactoring the whole module. There don't seem to be any tests for that part. I'll need more guidance from you to proceed.

bernardd commented 1 year ago

You're right - those tests are a bit of a shambles and/or missing entirely. Oh well. In terms of documentation, just a quick example in the README of how to use this feature would be fine, just under the AWS Key configuration section. Cheers.

bernardd commented 1 year ago

Oh wait, I see - this is a config that lives in the AWS config itself, and this just adds support for it. Okay, nevermind documenting it then :)