diff --git a/backend/s3/s3.go b/backend/s3/s3.go index 771ea07d4..4ac6311df 100644 --- a/backend/s3/s3.go +++ b/backend/s3/s3.go @@ -1559,9 +1559,6 @@ func s3Connection(ctx context.Context, opt *Options, client *http.Client) (*s3.S if opt.EnvAuth && opt.AccessKeyID == "" && opt.SecretAccessKey == "" { // Enable loading config options from ~/.aws/config (selected by AWS_PROFILE env) awsSessionOpts.SharedConfigState = session.SharedConfigEnable - // The session constructor (aws/session/mergeConfigSrcs) will only use the user's preferred credential source - // (from the shared config file) if the passed-in Options.Config.Credentials is nil. - awsSessionOpts.Config.Credentials = nil } ses, err := session.NewSessionWithOptions(awsSessionOpts) if err != nil {