Skip to content

Commit c0cf066

Browse files
committed
docs(supplemental-docs): typo fix
1 parent a3da633 commit c0cf066

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

supplemental-docs/CLIENTS.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -165,18 +165,19 @@ import { fromIni } from "@aws-sdk/credential-provider-ini";
165165

166166
// Create client with credentials that will reload from file
167167
const client = new S3Client({
168-
credentials: fromIni({ ignoreCache: true })
169-
});
170-
```
168+
credentials: fromIni({ ignoreCache: true }),
169+
});
170+
```
171171

172172
Refreshing credentials for an existing client:
173+
173174
```typescript
174175
import { S3Client } from "@aws-sdk/client-s3";
175176
import { fromIni } from "@aws-sdk/credential-provider-ini";
176177

177178
// Initial client setup
178179
const client = new S3Client({
179-
credentials: fromIni({ ignoreCache: true })
180+
credentials: fromIni({ ignoreCache: true }),
180181
});
181182

182183
// To refresh credentials later:
@@ -189,22 +190,22 @@ async function refreshClientCredentials() {
189190
```
190191

191192
For temporary credentials:
193+
192194
```typescript
193-
import { fromTemporaryCredentials } from "@aws-sdk/credential-provider";
195+
import { fromTemporaryCredentials } from "@aws-sdk/credential-providers";
194196

195197
// Better approach for temporary credentials that need regular refreshing
196198
const client = new S3Client({
197199
credentials: fromTemporaryCredentials({
198-
// your temporary credentials config
199-
})
200-
});
200+
// your temporary credentials config
201+
}),
202+
});
201203
```
202204

203205
- When using with AWS clients, the credential provider function is handled automatically.
204206
- For temporary credentials that need regular refreshing, `fromTemporaryCredentials` is recommended over manual refresh with `ignoreCache`.
205207
- Creating a new client instance ensures fresh credentials.
206208

207-
208209
### AWS Profile `profile`
209210

210211
Available since [v3.714.0](https://github.com/aws/aws-sdk-js-v3/releases/tag/v3.714.0).

0 commit comments

Comments
 (0)