cc-aws-keepalive
Description
Keep Claude Code sessions alive through AWS credential expiration. No more restarting terminal tabs every time your SSO/SAML session expires.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
cc-aws-keepalive
Keep Claude Code sessions alive through AWS credential expiration. No more restarting terminal tabs every time your SSO/SAML session expires.
Problem
When using Claude Code with AWS Bedrock, the AWS SDK caches credentials in memory. After your SSO/SAML session expires (typically every 8-12 hours), all Claude Code sessions become unresponsive and must be restarted — often corrupting conversations and losing context.
Solution
Four Node.js scripts (cross-platform: macOS, Linux, Windows) that hook into Claude Code's credential lifecycle:
| Script | Purpose | CC Setting |
|---|---|---|
aws-cred-export.mjs |
Reads fresh creds from ~/.aws/credentials, bypassing SDK in-memory cache |
awsCredentialExport |
aws-auth-refresh.mjs |
On auth failure, checks if you already re-authed in another terminal | awsAuthRefresh |
aws-cred-check.mjs |
Proactive check before each prompt — warns if expired or nearing expiry | hooks.UserPromptSubmit |
aws-statusline.mjs |
Optional persistent timer in the status bar (e.g., AWS: 4h23m) |
statusLine |
How it works
**Before expiry (proactive):**
- You submit a prompt in Claude Code
- The
UserPromptSubmithook checks credential expiration - If nearing expiry: inline warning with re-auth instructions
- If expired: warns inline — the prompt proceeds and
awsAuthRefreshhandles recovery
**After expiry (reactive):**
- Claude Code hits a Bedrock 403
awsAuthRefreshruns — checks if you already re-authed in another terminalawsCredentialExportreads fresh creds from disk (bypassing SDK memory cache)- Claude Code retries the API call — session continues without restart
The key insight
...
Related Skills
Docker
---
DevOps Kubernetes
---
DevOps AWS Skills
AWS development with CDK best practices, cost optimization MCP servers, and serverless/event-driven architectu
DevOps Composio Split
Manage Split feature flags and experiments
DevOps **claude-code-router**
(25.3k ⭐) - Use Claude Code as the foundation for coding infrastructure, allowing you to decide how to interac
DevOps CLAUDE.md CI/CD Wiki
Community patterns for CLAUDE.md configuration in CI/CD pipelines.
DevOps