Skip to content

Commit 858c3a4

Browse files
committed
chore(client-sts): rename variable
1 parent 2ba842b commit 858c3a4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

clients/client-sts/src/defaultStsRoleAssumers.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const resolveRegion = async (
8484
*/
8585
export const getDefaultRoleAssumer = (
8686
stsOptions: STSRoleAssumerOptions,
87-
stsClientCtor: new (options: STSClientConfig) => STSClient
87+
STSClient: new (options: STSClientConfig) => STSClient
8888
): RoleAssumer => {
8989
let stsClient: STSClient;
9090
let closureSourceCreds: AwsCredentialIdentity;
@@ -104,7 +104,8 @@ export const getDefaultRoleAssumer = (
104104
);
105105
const isCompatibleRequestHandler = !isH2(requestHandler);
106106

107-
stsClient = new stsClientCtor({
107+
stsClient = new STSClient({
108+
profile: stsOptions?.parentClientConfig?.profile,
108109
// A hack to make sts client uses the credential in current closure.
109110
credentialDefaultProvider: () => async () => closureSourceCreds,
110111
region: resolvedRegion,
@@ -146,7 +147,7 @@ export type RoleAssumerWithWebIdentity = (
146147
*/
147148
export const getDefaultRoleAssumerWithWebIdentity = (
148149
stsOptions: STSRoleAssumerOptions,
149-
stsClientCtor: new (options: STSClientConfig) => STSClient
150+
STSClient: new (options: STSClientConfig) => STSClient
150151
): RoleAssumerWithWebIdentity => {
151152
let stsClient: STSClient;
152153
return async (params) => {
@@ -164,7 +165,8 @@ export const getDefaultRoleAssumerWithWebIdentity = (
164165
);
165166
const isCompatibleRequestHandler = !isH2(requestHandler);
166167

167-
stsClient = new stsClientCtor({
168+
stsClient = new STSClient({
169+
profile: stsOptions?.parentClientConfig?.profile,
168170
region: resolvedRegion,
169171
requestHandler: isCompatibleRequestHandler ? (requestHandler as any) : undefined,
170172
logger: logger as any,

0 commit comments

Comments
 (0)