Установка
SKILL.md
Amazon MSK
Overview
Domain expertise for operating Amazon MSK Provisioned clusters with Standard and Express broker types. Covers performance troubleshooting, consumer lag diagnosis, storage management, cluster sizing, client configuration, and CloudWatch monitoring.
Execute commands using available tools from the AWS MCP server when connected — it provides sandboxed execution, audit logging, and observability. When the MCP server is not available, fall back to the AWS CLI or shell as needed.
Standard brokers use customer-managed EBS volumes for storage. You choose instance types (kafka.m5/m7g families), provision EBS, and manage storage scaling.
Express brokers provide fully managed, pay-as-you-go storage with no EBS provisioning. They use instance types prefixed with express.m7g, offer up to 3x more throughput per broker, and have no maintenance windows.
Critical Warnings
- NEVER reboot brokers while
UnderReplicatedPartitions> 0 (Standard only — Express brokers do not emit URP) — this risks data loss and extended outages - NEVER recommend partition reassignment without first checking replication status — reassignment during URP compounds the problem
linger.ms=0is the #1 cause of "high CPU" on MSK — ALWAYS check client batch configuration before recommending broker scaling- EBS throughput ceilings are invisible in Kafka metrics — ALWAYS check EBS volume metrics (
VolumeWriteBytes,BurstBalance) when diagnosing Standard broker latency - Express brokers have NO customer-managed EBS — do NOT recommend EBS expansion or provisioned throughput for Express clusters
- Express brokers enforce fixed replication factor of 3 and
min.insync.replicas=2— do NOT attempt to create topics with RF=1 on Express. If RF=1 is needed, use Standard brokers.
Which Workflow Do You Need?
Determine the broker type first: aws kafka describe-cluster-v2 --cluster-arn <arn>. Check Provisioned.BrokerNodeGroupInfo.InstanceType — if it starts with express., it is an Express cluster.
| Customer Intent | Reference |
|---|---|
| High CPU, high latency, slow cluster, traffic shaping | troubleshoot-performance.md |
| Consumer lag increasing, rebalance storms, stuck consumer groups | troubleshoot-consumer-lag.md |
| Disk filling up, retention planning, tiered storage | manage-storage.md |
| Choosing Standard vs Express, sizing a cluster, partition limits, broker count, monthly cost | size-and-choose-cluster.md |
| Producer/consumer configuration, IAM/SCRAM/TLS auth | configure-clients.md |
| Setting up monitoring, dashboards, alarms | monitor-and-alarm.md |
| Full CloudWatch metric list (Standard or Express) | Search AWS docs for "MSK CloudWatch metrics Standard brokers" or "MSK CloudWatch metrics Express brokers" |
| Rolling restart impact, patching, maintenance resilience | maintenance-operations.md |
Available scripts
scripts/msk_sizing.py— MUST be run for any sizing question (broker count, instance choice, cost). See size-and-choose-cluster.md for the required workflow and script reference.
Guardrail — where this skill's own files live (MCP vs local install)
This skill can be loaded two ways, and they resolve the skill's own bundled files — the references/ documents and the scripts/ files
from different places. Determine how the skill was loaded before you read a reference or run a script:
- Loaded through the AWS MCP
retrieve_skilltool call. The skill is not installed on the local filesystem; its reference files and scripts do not exist on disk. You MUST fetch each reference or script through the sameretrieve_skilltool by passing thefileparameter (for example,file="references/configure-clients.md"orfile="scripts/msk_sizing.py"), and run a script from the content that tool returns. Do NOTfile_readthese paths from the local or working directory, and do NOT search the filesystem for them — they are not there, and any local file that happens to match the name is unrelated to this skill. - Installed locally (the skill lives in a local skills directory such as
.claude/skills/managing-amazon-msk/,~/.claude/skills/managing-amazon-msk/, or.kiro/skills/managing-amazon-msk/). Read references and run scripts from the local skill directory using the relative paths shown throughout this documentation.
This distinction applies only to the skill's own packaged files. Every artifact
created during a session or supplied by users are read from and written to
the user's working directory regardless of how the skill was loaded. Never
fetch or write customer data through retrieve_skill.
Quick Diagnostics
These 5 checks cover the most common MSK issues. Use them before loading a reference file.
-
CpuUser + CpuSystem > 60%: Check
RequestHandlerAvgIdlePercent(PER_BROKER level). If < 30%, request threads are saturated. Check clientbatch.sizeandlinger.msbefore recommending scaling. -
KafkaDataLogsDiskUsed > 85% (Standard only): Expand EBS immediately via
aws kafka update-broker-storage. Identify high-growth topics via per-topicBytesInPerSec. Express clusters useStorageUsedmetric instead and storage is fully managed. -
UnderReplicatedPartitions > 0 (Standard only): Check if a maintenance operation or broker restart is in progress. If URP is decreasing, wait for recovery. Do NOT restart brokers or reassign partitions during URP. Express brokers do not emit this metric — monitor
ProduceThrottleTime,FetchThrottleTime, and consumer lag instead. -
Consumer OffsetLag increasing: Determine if broker-side (high
ProduceTotalTimeMsMean, CPU saturation) or client-side (slow processing, insufficient consumers). Per-partition lag from PER_TOPIC_PER_PARTITION monitoring level helps isolate hot partitions. -
BytesInPerSec near throughput ceiling: For Standard, check EBS volume type and calculate:
BytesInPerSec × ReplicationFactorvs volume throughput limit. For Express, check against the per-broker sustained performance limits in the quotas.
Common Workflows
Describe cluster:
aws kafka describe-cluster-v2 --cluster-arn <cluster-arn>
List brokers:
aws kafka list-nodes --cluster-arn <cluster-arn>
Get bootstrap brokers:
aws kafka get-bootstrap-brokers --cluster-arn <cluster-arn>
Expand Standard broker storage:
aws kafka update-broker-storage \
--cluster-arn <cluster-arn> \
--current-version <cluster-version> \
--target-broker-ebs-volume-info '[{"KafkaBrokerNodeId": "All", "VolumeSizeGB": <target-size>}]'
Get CloudWatch metrics (example: CpuUser per broker):
aws cloudwatch get-metric-statistics \
--namespace AWS/Kafka \
--metric-name CpuUser \
--dimensions Name="Cluster Name",Value="<cluster-name>" Name="Broker ID",Value="<broker-id>" \
--start-time <start> --end-time <end> --period 300 --statistics Average
Create cluster configuration (server.properties):
The --server-properties argument MUST be a real Kafka properties file with one key=value per line, separated by actual newline (\n) characters — NOT the literal two-character escape sequence \n. The MSK API accepts the bytes as-is; if you pass "k1=v1\nk2=v2" as a single string with escaped newlines, MSK stores ONE invalid property line and the cluster will fail to apply it.
Recommended pattern: write the properties to a local file with real newlines, then pass it via fileb:// so the CLI uploads the raw bytes verbatim. Verify by reading the revision back with describe-configuration-revision and base64-decoding ServerProperties — you should see one property per line.
cat > server.properties <<'EOF'
auto.create.topics.enable=false
default.replication.factor=3
min.insync.replicas=2
unclean.leader.election.enable=false
num.io.threads=32
num.network.threads=16
log.retention.hours=168
EOF
aws kafka create-configuration \
--name <config-name> \
--kafka-versions "3.6.0" \
--server-properties fileb://server.properties
For per-instance-size thread tuning (num.io.threads, num.network.threads) and durability defaults, see size-and-choose-cluster.md and configure-clients.md.
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
aws kafka update-broker-storage returns "storage is optimizing" | Previous storage expansion still in cool-down (minimum 6 hours) | Wait for optimization to complete. Check cluster state with describe-cluster-v2. |
ClusterState is MAINTENANCE | Standard brokers undergoing patching. Express brokers stay ACTIVE during maintenance. | Wait for cluster to return to ACTIVE. Do not perform update operations during MAINTENANCE. |
Consumer GROUP_COORDINATOR_NOT_AVAILABLE | Coordinator broker is temporarily unavailable during rolling restart or overloaded | Retry with backoff. Check if maintenance is in progress. |
NotEnoughReplicasException on produce | Fewer brokers in ISR than min.insync.replicas (default: 2) | Check URP metric (Standard only). For Express, check ProduceThrottleTime and broker health instead — URP is not available. If a broker is down for maintenance, this is transient. Do not lower min.insync.replicas. |
Additional Resources
- MSK Best Practices - Standard
- MSK Best Practices - Express
- MSK Client Best Practices
- MSK CloudWatch Metrics
- MSK Quotas
- MSK Configuration
Вставить в README
Ссылка на карточку для вашего README — без картинок и счётчиков.
[DarkPlay: managing-amazon-msk](https://darkplay.ru/ai/skills/aws-agent-toolkit-for-aws-managing-amazon-msk)
Из того же репозитория
Похожие скиллы и другие разделы каталога
Самые востребованные скиллов раздела по установкам и звёздам.
find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.Соседние разделы каталога: возможно, нужный инструмент живёт там.
Chief Of Staffaffaan-m · Личный руководитель коммуникаций, который сортирует почту, Slack, LINE и Messenger…
amazon-location-serviceanthropics · Помогает разработчикам добавлять карты, поиск мест, геокодирование, маршрутизацию и…
aws-agentsanthropics · Создание, развёртывание и эксплуатация AI-агентов на AWS. Навыки для генерации агентов с…
brightdata-pluginanthropics · Веб-скрапинг, поиск в Google, извлечение структурированных данных и интеграция…
dataverseanthropics · Навыки агента для разработки, анализа и управления Microsoft Dataverse с помощью…
migration-to-awsanthropics · Планирование миграции с Google Cloud Platform (и AI-нагрузок OpenAI/Gemini) на AWS…
pineconeanthropics · Интеграция векторной базы данных Pinecone. Упрощает разработку с Pinecone благодаря…
postizanthropics · CLI для автоматизации соцсетей: планирование постов, управление интеграциями, загрузка…
sagemaker-aianthropics · Создание, обучение и развёртывание AI-моделей с экспертизой AWS AI/ML прямо в ваших…
brightdata-pluginanthropics · Веб-скрапинг, поиск Google, извлечение структурированных данных и интеграция MCP-сервера…Лучшие ИИ-инструменты для генерации видео
Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,
VEED.IOVeed
MootionMootion
Sora (OpenAI)OpenAI
viralpulse.appViralpulse
Viral Maker AIViral-makerЛучшие ИИ-инструменты для генерации текста и копирайтинга
Подборка нейросетей для генерации текстов и копирайтинга. Сервисы, которые помогают создавать статьи, посты и рекламные объявления с нуля или по черновику, экономя часы рутинной ра
NeuroscribeNeuroscribe
GoGPTGogpt
НейроТекстерNeuro-texter
ChatGPTOpenAI
Cosmo ScribeCosmoscribe
Memo HelperCopilot33
LibraChatLibrachatЛучшие ИИ-инструменты для генерации изображений
Подборка нейросетей для генерации изображений от фотореализма до концепт-арта. Сервисы, которые экономят часы ручной работы, создавая визуал для блогов, рекламы и дизайна за минуты
MagviMagvi
DALL-E 3OpenAI
SupaLabSupalab
Freestyling.aiFreestyling
ArtGeneration.meArtgeneration
BigjpgBigjpg
Художник от VKVK
Avato AI12ai
Virton AIVirton