- Bedrock root 账号生成 Bedrock API 短期密钥
- export 环境变量执行命令
export AWS_BEARER_TOKEN_BEDROCK=bedrock-api-key-YmVkcm9jay
# sonnet-5 激活
curl -X POST \
"https://bedrock-runtime.us-east-1.amazonaws.com/model/global.anthropic.claude-sonnet-5/invoke" \
| """ | |
| Audit AWS Organization accounts: | |
| 1. List all active accounts (including management account) | |
| 2. Check Bedrock Claude usage via CloudWatch metrics in the past 15 months | |
| 3. Retrieve contact information for each account | |
| 4. Classify by region (Mainland China, Hong Kong, Others) and generate report | |
| Prerequisites: | |
| - Run this script from the AWS Organizations MANAGEMENT account | |
| - Python 3.12+ with boto3 installed (pip install boto3) |
export AWS_BEARER_TOKEN_BEDROCK=bedrock-api-key-YmVkcm9jay
# sonnet-5 激活
curl -X POST \
"https://bedrock-runtime.us-east-1.amazonaws.com/model/global.anthropic.claude-sonnet-5/invoke" \
A collection of open issues caused by kiro-cli-term unconditionally replacing every interactive shell session via exec. All issues share the same root cause and have received no maintainer response.
The kiro-cli installer injects shell integration hooks into ~/.zshrc that exec-replace every interactive zsh session with kiro-cli-term (a PTY wrapper). This behavior is inherited from the Amazon Q CLI fork and has no documented opt-out.
安装 kiro-cli 后,安装程序会在 ~/.zshrc 中注入 shell 集成 hook,在每次启动交互式 zsh 时通过 exec 无条件将 shell 进程替换为 kiro-cli-term(一个 PTY wrapper)。这会导致:
kill kiro-cli-term 会直接关闭整个 tab — 因为 exec 替换后它就是 shell 进程本身查询 Amazon Bedrock 模型价格(通过 AWS Price List API),输出对齐 官网定价页。
| #!/usr/bin/env python3 | |
| """批量查询所有 HostedZone 的 DNSQueries 指标,绕过 Metrics Insights 500 条限制""" | |
| import boto3 | |
| from datetime import datetime, timezone, timedelta | |
| PROFILE = "default" | |
| REGION = "us-east-1" | |
| PERIOD = 3600 |
| #!/bin/bash | |
| # 批量查询所有 HostedZone 的 DNSQueries 指标 | |
| # 绕过 Metrics Insights 500 条时间序列限制 | |
| set -e | |
| PROFILE="default" | |
| REGION="us-east-1" | |
| PERIOD=3600 | |
| START_TIME=$(date -u -v-1d +%Y-%m-%dT%H:%M:%SZ) |
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "RTBFabricGatewayManagement", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "rtbfabric:GetRequesterGateway", | |
| "rtbfabric:UpdateRequesterGateway", | |
| "rtbfabric:DeleteRequesterGateway", |
Amazon Bedrock 调用量统计与费用估算工具。从 CloudWatch Logs 中提取 Bedrock 调用日志,结合 AWS Price List API 实时定价,按用户和模型维度汇总 token 用量及费用。
| module aws-location-suggest | |
| go 1.23 | |
| require ( | |
| github.com/aws/aws-sdk-go-v2 v1.41.1 | |
| github.com/aws/aws-sdk-go-v2/config v1.32.7 | |
| github.com/aws/aws-sdk-go-v2/service/geoplaces v1.8.0 | |
| ) |