Skip to content

Commit ebe88e7

Browse files
committed
docs(supplemental-docs): rm client modification
1 parent 77a1207 commit ebe88e7

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

supplemental-docs/CLIENTS.md

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -169,26 +169,6 @@ const client = new S3Client({
169169
});
170170
```
171171

172-
Refreshing credentials for an existing client:
173-
174-
```typescript
175-
import { S3Client } from "@aws-sdk/client-s3";
176-
import { fromIni } from "@aws-sdk/credential-providers";
177-
178-
// Initial client setup
179-
const client = new S3Client({
180-
credentials: fromIni({ ignoreCache: true }),
181-
});
182-
183-
// To refresh credentials later:
184-
async function refreshClientCredentials() {
185-
const credProvider = fromIni({ ignoreCache: true });
186-
// Get fresh credentials and update the client
187-
const freshCredentials = await credProvider();
188-
client.config.credentials = freshCredentials;
189-
}
190-
```
191-
192172
For temporary credentials:
193173

194174
You can use the `fromTemporaryCredentials` provider that creates a credential provider function that retrieves temporary credentials from STS AssumeRole API.

0 commit comments

Comments
 (0)