ccswitch refresh
Synopsis
Section titled “Synopsis”ccswitch refresh <name> [--token <token>]Description
Section titled “Description”Replaces a bedrock-key profile’s bearer token and re-derives its expiry, without recreating the profile. Reads the new token from --token or the AWS_BEARER_TOKEN_BEDROCK environment variable.
Use this when a short-lived Bedrock token has expired or is about to expire.
refresh only applies to bedrock-key. To replace an api-key or custom profile’s credential, re-run ccswitch add --force with the same profile name.
Options
Section titled “Options”| Option | Description |
|---|---|
--token <token> |
The new bearer token (otherwise reads $AWS_BEARER_TOKEN_BEDROCK) |
Examples
Section titled “Examples”# Re-export a fresh token, then refreshexport AWS_BEARER_TOKEN_BEDROCK=bedrock-api-key-...ccswitch refresh bedrock-prod
# Or pass it directlyccswitch refresh bedrock-prod --token bedrock-api-key-...Related
Section titled “Related”- Expiry tracking — how expiry is derived and tracked
- Bedrock token expired — troubleshooting
This site uses GoatCounterfor page counts — no cookies, no personal data, no tracking across sites.