Open
Description
I noticed s3 started mutating the config by adding this $source object which even though it says "e" it doesn't look like it's an error. https://github.com/aws/aws-sdk-js-v3/pull/6546/files#diff-a3590b50e293ad26b5fac14d669025732f47d6c0da0f83527e317ab3848919caR364
"credentials": {
"accessKeyId": "minioadmin",
"secretAccessKey": "minioadmin",
"$source": {
"CREDENTIALS_CODE": "e"
}
}
I think in createS3Client if we just change it from
return new BaseClient(finalConfig);
to
return new BaseClient(cloneDeep(finalConfig));
so it doesn't mutate the config passed to createS3Client, and ensure no other s3 functions are mutating things it should be good.