技能 aws-sso-login
🔐

aws-sso-login

安全 🌐 网络访问📁 文件系统访问⚙️ 外部命令

驗證 AWS SSO 工作階段

AWS SSO 工作階段會在 8-12 小時後過期,導致 CLI 存取被封鎖。此技能可自動化重新驗證程序,並提供適當的設定檔處理,實現無縫的雲端操作。

支持: Claude Codex Code(CC)
📊 69 充足
1

下载技能 ZIP

2

在 Claude 中上传

前往 设置 → 功能 → 技能 → 上传技能

3

开启并开始使用

测试它

正在使用“aws-sso-login”。 Authenticate to AWS SSO using profile 'web-hosting'

预期结果:

  • Executing: aws sso login --profile web-hosting
  • Browser opened for authentication
  • Please complete authentication in the browser
  • Authentication successful!
  • SSO session established for profile 'web-hosting'
  • Session is valid for 8-12 hours

正在使用“aws-sso-login”。 Refresh my expired SSO session for production

预期结果:

  • Using profile 'production' for authentication
  • Initiating SSO login flow
  • Browser authentication required
  • Session refreshed successfully
  • You can now run AWS CLI commands with the production profile

安全审计

安全
v5 • 1/17/2026

This skill contains only documentation with no executable code. It describes standard AWS SSO authentication procedures using official AWS CLI commands. All static findings are false positives caused by the scanner misinterpreting documentation text as code patterns.

2
已扫描文件
248
分析行数
3
发现项
5
审计总数
审计者: claude 查看审计历史 →

质量评分

38
架构
100
可维护性
85
内容
19
社区
100
安全
91
规范符合性

你能构建什么

每日 AWS 存取工作流程

在執行基礎設施指令之前,自動化透過 SSO 對 AWS 帳戶進行早間驗證

為部署重新整理工作階段

在延長的部署或維護期間,重新整理過期的 SSO 工作階段

切換不同的 AWS 帳戶

使用各種 SSO 設定檔快速驗證不同的 AWS 帳戶

试试这些提示

基本 SSO 登入
Use the aws-sso-login skill to authenticate with my default AWS profile
特定設定檔登入
Authenticate to AWS SSO using the profile 'production-account'
檢查目前身份
After SSO login, run aws sts get-caller-identity to confirm which account I'm authenticated to
SSO 後假設角色
First authenticate via SSO, then assume the CloudFormation deployment role for account 123456789012

最佳实践

  • 在專案 README 中記錄預設設定檔名稱,以確保團隊間的一致性
  • 在長時間執行操作前檢查工作階段到期時間,以避免執行中途失敗
  • 為每個環境(開發、預發布、生產)使用特定設定檔,以獲得更好的存取控制

避免

  • 在技能呼叫中硬編碼設定檔名稱 - 應改用專案設定
  • 嘗試自動化瀏覽器驗證 - SSO 需要手動互動
  • 忽略工作階段到期警告 - 務必在關鍵操作前重新整理

常见问题

哪些 AWS CLI 版本支援 SSO?
需要 AWS CLI v2 或更新版本才能支援 SSO。v1.x 版本不包含 SSO 功能。
SSO 工作階段持續多久?
工作階段通常會在 8-12 小時後過期,具體時間取決於組織的 AWS SSO 設定。
這可以在無周邊環境中運作嗎?
使用 --no-browser 旗標取得手動 URL,但仍需要瀏覽器驗證。
我的驗證資料安全嗎?
憑證會儲存在本機的 AWS CLI 快取中,絕不會傳輸到外部服務。
如果驗證失敗怎麼辦?
檢查 ~/.aws/config 中的 SSO 設定,並確認可存取 AWS SSO 端點的網路連線。
這與 aws-azure-login 相比有何不同?
這使用原生的 AWS SSO,而 aws-azure-login 則專門用於 Azure AD 與 AWS 的整合。

开发者详情

文件结构

📄 SKILL.md