Skip to content

Commit

Permalink
docs(supplemental-docs): rm client modification
Browse files Browse the repository at this point in the history
  • Loading branch information
siddsriv committed Jan 30, 2025
1 parent 77a1207 commit ebe88e7
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions supplemental-docs/CLIENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,26 +169,6 @@ const client = new S3Client({
});
```

Refreshing credentials for an existing client:

```typescript
import { S3Client } from "@aws-sdk/client-s3";
import { fromIni } from "@aws-sdk/credential-providers";

// Initial client setup
const client = new S3Client({
credentials: fromIni({ ignoreCache: true }),
});

// To refresh credentials later:
async function refreshClientCredentials() {
const credProvider = fromIni({ ignoreCache: true });
// Get fresh credentials and update the client
const freshCredentials = await credProvider();
client.config.credentials = freshCredentials;
}
```

For temporary credentials:

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

0 comments on commit ebe88e7

Please sign in to comment.