Skip to content

Commit

Permalink
s3: don't consume default AWS environment variables
Browse files Browse the repository at this point in the history
The AWS SDK has better logic for reading environment variables and passing them down to the correct credentials provider.
  • Loading branch information
malt3 committed Feb 24, 2025
1 parent ad27c1a commit c2a6311
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions authenticate/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,35 +304,20 @@ type configFragment struct {
func configFromContext(ctx context.Context, uri *url.URL) (configFragment, error) {
sources := []lookupchain.Source{
// acces key id
&lookupchain.Env{
Source: "env",
Name: "AWS_ACCESS_KEY_ID",
Binding: BindigAccessKeyID,
},
&lookupchain.Keyring{
Source: "env",
Service: "tweag-credential-helper:aws-access-key-id",
Binding: BindigAccessKeyID,
},

// secret access key
&lookupchain.Env{
Source: "env",
Name: "AWS_SECRET_ACCESS_KEY",
Binding: BindingSecretAccessKey,
},
&lookupchain.Keyring{
Source: "env",
Service: "tweag-credential-helper:aws-secret-access-key",
Binding: BindingSecretAccessKey,
},

// default region
&lookupchain.Env{
Source: "env",
Name: "AWS_DEFAULT_REGION",
Binding: BindingRegion,
},
&lookupchain.Keyring{
Source: "env",
Service: "tweag-credential-helper:aws-default-region",
Expand Down

0 comments on commit c2a6311

Please sign in to comment.