Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
aws avatar

Managing Amazon Msk

  • 1.7k installs
  • 2.2k repo stars
  • Updated August 4, 2026
  • aws/agent-toolkit-for-aws

>-.

About

>-. 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.

  • **Standard brokers** use customer-managed EBS volumes for storage. You choose instance types (kafka.m5/m7g families), pr
  • NEVER reboot brokers while `UnderReplicatedPartitions` > 0 (Standard only — Express brokers do not emit URP) — this risk
  • NEVER recommend partition reassignment without first checking replication status — reassignment during URP compounds the
  • `linger.ms=0` is the #1 cause of "high CPU" on MSK — ALWAYS check client batch configuration before recommending broker
  • EBS throughput ceilings are invisible in Kafka metrics — ALWAYS check EBS volume metrics (`VolumeWriteBytes`, `BurstBala

Managing Amazon Msk by the numbers

  • 1,665 all-time installs (skills.sh)
  • +357 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #127 of 1,435 DevOps & CI/CD skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

managing-amazon-msk capabilities & compatibility

Capabilities
**standard brokers** use customer managed ebs vo · never reboot brokers while `underreplicatedparti · never recommend partition reassignment without f · `linger.ms=0` is the #1 cause of "high cpu" on m
Use cases
documentation
From the docs

What managing-amazon-msk says it does

>-
SKILL.md
npx skills add https://github.com/aws/agent-toolkit-for-aws --skill managing-amazon-msk

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1.7k
repo stars2.2k
Last updatedAugust 4, 2026
Repositoryaws/agent-toolkit-for-aws

How do I apply managing-amazon-msk using the workflow in its SKILL.md?

>-

Who is it for?

Developers following the managing-amazon-msk skill for the tasks it documents.

Skip if: Tasks outside the managing-amazon-msk scope described in SKILL.md.

When should I use this skill?

User mentions managing-amazon-msk or related triggers from the skill description.

What you get

Working managing-amazon-msk setup aligned with the documented patterns and constraints.

Files

SKILL.mdMarkdownGitHub ↗

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=0 is 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 IntentReference
High CPU, high latency, slow cluster, traffic shapingtroubleshoot-performance.md
Consumer lag increasing, rebalance storms, stuck consumer groupstroubleshoot-consumer-lag.md
Disk filling up, retention planning, tiered storagemanage-storage.md
Choosing Standard vs Express, sizing a cluster, partition limits, broker count, monthly costsize-and-choose-cluster.md
Producer/consumer configuration, IAM/SCRAM/TLS authconfigure-clients.md
Setting up monitoring, dashboards, alarmsmonitor-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 resiliencemaintenance-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.

Quick Diagnostics

These 5 checks cover the most common MSK issues. Use them before loading a reference file.

1. CpuUser + CpuSystem > 60%: Check RequestHandlerAvgIdlePercent (PER_BROKER level). If < 30%, request threads are saturated. Check client batch.size and linger.ms before recommending scaling.

2. KafkaDataLogsDiskUsed > 85% (Standard only): Expand EBS immediately via aws kafka update-broker-storage. Identify high-growth topics via per-topic BytesInPerSec. Express clusters use StorageUsed metric instead and storage is fully managed.

3. 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.

4. 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.

5. BytesInPerSec near throughput ceiling: For Standard, check EBS volume type and calculate: BytesInPerSec × ReplicationFactor vs 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

ErrorCauseFix
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 MAINTENANCEStandard 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_AVAILABLECoordinator broker is temporarily unavailable during rolling restart or overloadedRetry with backoff. Check if maintenance is in progress.
NotEnoughReplicasException on produceFewer 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

Related skills

FAQ

What does managing-amazon-msk do?

>-

When should I use managing-amazon-msk?

Invoke when >-.

Is managing-amazon-msk safe to install?

Review the Security Audits panel on this page before installing in production.

DevOps & CI/CDmonitoring

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.