Timebound AWS IAM Permissions for Claude Code
(or any AI agent)
An MCP server that sits between your AI agent and AWS STS, issuing temporary credentials scoped to specific AWS services and access levels on demand.
https://timebound-iam.com
Timebound IAM是一个MCP服务器,它通过STS AssumeRole发出短期的、服务范围的AWS凭据,以便AI编码代理(如Claude Code)可以在没有长期密钥的情况下访问AWS资源。凭据有时间限制(15分钟到12小时),适用于特定的服务和访问级别(只读或完整),并在到期时自动清理。
安装
- 家酿 (macOS/Linux)
brew install builder-magic/tap/timebound-iam- 去安装
go install github.com/builder-magic/timebound-iam@latest- 二进制下载 --从下载预构建的二进制文件 .
设置
有关完整的安装和设置指南,请参阅 https://timebound-iam.com/installation-and-setup.
- 配置AWS
运行安装向导为代理角色生成IAM信任策略和内联策略:
bin/timebound-iam setup aws
# or specify a named profile
bin/timebound-iam setup aws --profile my-profile按照打印的说明创建 timebound-iam-broker IAM角色在您的帐户中具有生成的策略。
- 添加到克劳德代码
注册MCP服务器,以便Claude Code可以根据需要请求临时凭据:
claude mcp add --scope user timebound-iam -- timebound-iam serve重新启动Claude Code以获取新服务器。
- 验证
验证MCP服务器是否已安装并与一起运行 /mcp 命令:
端到端测试凭证流:
timebound-iam test这将请求短期S3只读凭据并将其写入临时 .env 您可以使用的文件来验证访问权限。
CLI使用情况
Timebound IAM也可以用作独立的CLI,用作用域的临时凭据包装shell脚本。
exec
使用注入到其环境中的临时凭据运行命令:
timebound-iam exec -s s3:full,cloudfront:full -t 30m --profile prod -- ./deploy.sh使用 --dry-run 在不请求凭据的情况下验证标志。使用 --no-confirm 跳过CI或脚本中的交互式提示。
env
印刷品 export 或 unset 与一起使用的语句 eval:
eval "$(timebound-iam env -s s3:ro -t 15m --no-confirm)"
aws s3 ls
eval "$(timebound-iam env --unset)"- 范围
作用域使用该格式 service:level 水平在哪里 ro (只读)或 full多个作用域可以用逗号分隔,也可以重复传递 -s 旗帜:
-s s3:ro,dynamodb:full
-s s3:ro -s dynamodb:full贡献
欢迎任何形式的贡献(建议、错误报告、拉取请求和反馈)。如果你发现了一个bug,你可以提交一个问题或给我发电子邮件rsingh@builder-magic.com.
许可证
该项目根据 Apache许可证,版本2.0.
贡献
除非您另有明确说明,否则根据Apache-2.0许可证的定义,您有意提交以包含在作品中的任何贡献都应按照Apache许可证2.0版本获得许可,而不附带任何额外的条款或条件。
联系人:rsingh@builder-magic.com
