GeiserX

Cc AWS Keepalive — DevOps skill for Claude Code

DevOps community intermediate

Keep Claude Code sessions alive through AWS credential expiry -- proactive expiration warnings, credential refresh bypass for Bedrock SSO/SAML, optional statusline countdown timer.

How to install Cc AWS Keepalive

This entry records only its repository, not the path inside it, so there is no exact command to give. Open GeiserX/cc-aws-keepalive and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Cc AWS Keepalive does

Keep Claude Code sessions alive through AWS credential expiration. No more restarting terminal tabs every time your SSO/SAML session expires.

Alternatives in DevOps

  • Cccc — Coordinate your coding agents like a group chat — read receipts, delivery tracking, and remote ops from your p 1.1k ★
  • Codeg — Aggregate and browse AI coding agent sessions (Claude Code, Codex, Gemini CLI, etc.) in one place 850 ★
  • Skill — Web extraction engine with antibot bypass 549 ★

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):**

  1. You submit a prompt in Claude Code
  2. The UserPromptSubmit hook checks credential expiration
  3. If nearing expiry: inline warning with re-auth instructions
  4. If expired: warns inline — the prompt proceeds and awsAuthRefresh handles recovery

**After expiry (reactive):**

  1. Claude Code hits a Bedrock 403
  2. awsAuthRefresh runs — checks if you already re-authed in another terminal
  3. awsCredentialExport reads fresh creds from disk (bypassing SDK memory cache)
  4. Claude Code retries the API call — session continues without restart

The key insight

...