Skip to content

add more ways to load aws credentials#83

Open
emilyalbini wants to merge 1 commit intomainfrom
ea-ooqulxosoxuw
Open

add more ways to load aws credentials#83
emilyalbini wants to merge 1 commit intomainfrom
ea-ooqulxosoxuw

Conversation

@emilyalbini
Copy link
Member

Right now Buildomat only allows specifying AWS credentials by writing the access key in the configuration file (of both the server and the AWS factory). That requires creating an IAM User with persistent credentials, which is not great (I'd like to avoid having credentials laying around in my disk).

This PR changes the way AWS credentials are loaded from the configuration:

  • If an access key ID and a secret access key are defined, they are used to connect to AWS. This is the same behavior as today, so all existing configuration files won't change meaning.
  • If a profile setting is present instead of access_key_id and secret_access_key, the AWS SDK will use its default credential chain to load the credentials from that profile. This is what I'd use on my developer machine to connect to my sandbox AWS account, with AWS SSO.
  • If no setting is present the AWS SDK will use its default credential chain as well, this time without requesting a specific profile. This would be useful on the Buildomat server, as we could fetch temporary credentials from the EC2 Instance Role rather than leaving persistent credentials on disk.

On the implementation side, I preferred extracting the logic into a new aws-common crate rather than duplicating it between the server and the AWS factory. I didn't put it in the common crate because then everything would depend on the AWS SDK.

@emilyalbini emilyalbini requested a review from jclulow March 11, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant