File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -115,15 +115,6 @@ func (s *S3) Connect(ctx context.Context) error {
115
115
if s .Config .Region != "" {
116
116
awsConfig .Region = s .Config .Region
117
117
}
118
- if s .Config .AccessKey != "" && s .Config .SecretKey != "" {
119
- awsConfig .Credentials = credentials.StaticCredentialsProvider {
120
- Value : aws.Credentials {
121
- AccessKeyID : s .Config .AccessKey ,
122
- SecretAccessKey : s .Config .SecretKey ,
123
- },
124
- }
125
- }
126
-
127
118
awsRoleARN := os .Getenv ("AWS_ROLE_ARN" )
128
119
if s .Config .AssumeRoleARN != "" || awsRoleARN != "" {
129
120
stsClient := sts .NewFromConfig (awsConfig )
@@ -142,6 +133,15 @@ func (s *S3) Connect(ctx context.Context) error {
142
133
)
143
134
}
144
135
136
+ if s .Config .AccessKey != "" && s .Config .SecretKey != "" {
137
+ awsConfig .Credentials = credentials.StaticCredentialsProvider {
138
+ Value : aws.Credentials {
139
+ AccessKeyID : s .Config .AccessKey ,
140
+ SecretAccessKey : s .Config .SecretKey ,
141
+ },
142
+ }
143
+ }
144
+
145
145
if s .Config .Debug {
146
146
awsConfig .Logger = newS3Logger (s .Log )
147
147
awsConfig .ClientLogMode = aws .LogRetries | aws .LogRequest | aws .LogResponse
You can’t perform that action at this time.
0 commit comments