Skip to content

Commit 39ac5c6

Browse files
committed
refactor: avoid getting shim until needed
1 parent 01ec7f5 commit 39ac5c6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/core/src/shared/awsClientBuilderV3.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ export class AWSClientBuilderV3 {
139139
}
140140

141141
public createAwsService<C extends AwsClient>(serviceOptions: AwsServiceOptions<C>): C {
142-
const shim = this.getShim()
143142
const opt = (serviceOptions.clientOptions ?? {}) as AwsClientOptions
144143
const userAgent = serviceOptions.userAgent ?? true
145144
const keepAlive = serviceOptions.keepAlive ?? true
@@ -162,6 +161,7 @@ export class AWSClientBuilderV3 {
162161
}
163162

164163
if (!opt.credentials && !opt.token) {
164+
const shim = this.getShim()
165165
opt.credentials = async () => {
166166
const creds = await shim.get()
167167
if (creds.expiration && creds.expiration.getTime() < Date.now()) {

packages/core/src/shared/clients/codecatalystClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ export async function createClient(
208208
connection: SsoConnection,
209209
regionCode = getCodeCatalystConfig().region,
210210
endpoint = getCodeCatalystConfig().endpoint,
211-
maxRetries: number = 1,
211+
maxRetries: number = 5,
212212
authOptions: AuthOptions = {}
213213
): Promise<CodeCatalystClient> {
214214
const sdkClient = await createCodeCatalystClient(connection, regionCode, endpoint, maxRetries)

0 commit comments

Comments
 (0)