Generated banner for Migrate To Msk
Generated logo for Migrate To Msk

Migrate To Msk

AWSOfficialPublished by AWS

  • Skill
  • Workflow
  • Cloud and DevOps
  • Apache-2.0
  • Low risk
  • Has scripts

From the author

Helps migrate self-managed Apache Kafka workloads to Amazon MSK Express. Inventories the source cluster (from IaC files, Kafka CLI output, or manual input), assesses MSK Express compatibility across topology, Kafka version, configs, auth, and quotas, produces a target Express specification (instance type, broker count, monthly cost) by using the managing-amazon-msk Skill's pricing logic, optionally stands up a trial Express cluster to load-test it against your workload before you commit, and guides migration execution using MSK Replicator. Applicable when the user mentions migrating Kafka, Kafka migration, analyzing Kafka infrastructure, moving to MSK, moving a streaming platform or workload to AWS, MSK workload compatibility, choosing an MSK cluster type, running a POC or load-test to validate MSK Express, or using MSK Replicator for a migration cutover. Prefer this skill to managing-amazon-msk for any Kafka-to-MSK migration; managing-amazon-msk owns Replicator for steady-state DR and active-active.
— the description by AWS

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a comprehensive, three-phase framework for migrating self-managed Apache Kafka clusters to Amazon MSK Express. It guides users through inventory discovery, compatibility assessment, and performance simulation to ensure a smooth transition. By analyzing existing infrastructure, the skill identifies potential configuration gaps, calculates target sizing, and provides cost projections, while also offering support for data replication using MSK Replicator.

What it does

  • Inventories source Kafka clusters from IaC files, CLI output, or manual input.
  • Assesses compatibility across topology, Kafka versions, configurations, auth, and quotas.
  • Generates target MSK Express specifications, including broker counts and cost estimates.
  • Facilitates optional load-testing via temporary MSK Express trial clusters.
  • Provides guidance on using MSK Replicator for migration cutovers.
  • Produces standardized artifacts for cluster configuration and compatibility findings.

When to use it

  • When planning a migration from self-managed Kafka to Amazon MSK Express.
  • When you need to assess the compatibility of your current Kafka setup with MSK Express.
  • When you require an accurate sizing and cost projection for an MSK Express target.
  • When you want to validate performance through a proof-of-concept load test before migrating.
  • When you need a structured approach to inventorying your existing streaming infrastructure.

Advantages

  • Reduces migration risk through automated compatibility and topology assessment.
  • Provides data-driven cost and sizing recommendations based on actual workload metrics.
  • Supports informed decision-making with optional pre-migration performance simulation.
  • Standardizes the migration process across discovery, assessment, and execution phases.
  • Integrates with existing IaC workflows for efficient inventory collection.

Usage examples

“I need to migrate my on-premises Kafka cluster to MSK Express. Where do I start?”
The agent will explain the three-phase migration process (Discovery, Assessment, Simulation) and ask for your infrastructure details or IaC files to begin the discovery phase.
“Here is my Terraform directory for our Kafka cluster. Can you assess if it is compatible with MSK Express?”
The agent will perform the discovery phase to generate a cluster configuration and then proceed to the assessment phase to validate compatibility and provide sizing recommendations.
“I have a cluster-config.json file. How do I get a cost estimate for moving to MSK Express?”
The agent will run the assessment phase using your configuration file to produce a compatibility report and a pricing summary for the recommended MSK Express setup.
“How do I test MSK Express performance with my current workload?”
The agent will guide you through the simulation phase, helping you deploy a temporary MSK Express cluster to run load tests and review performance metrics.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/aws/migrate-to-msk/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip migrate-to-msk.zip -d .agents/skills

Documentation by AWS

Migrating to MSK Express

Overview

This skill helps customers migrate self-managed Apache Kafka workloads to Amazon MSK Express. It provides three phases — Discovery, Assessment, and an optional Simulation — that can be run end-to-end or individually depending on the customer's needs.

Scope

This skill covers migrations from self-managed Apache Kafka (on-premises, EC2, Docker, Kubernetes, or other non-MSK deployments) to MSK Express. Migrations from MSK Standard (Provisioned) to MSK Express are out of scope.

Prerequisites

The AWS MCP server is recommended for documentation lookups and informational questions, but is not required. The assessment scripts are pure file processors with no AWS API calls.

Intent Routing

Route the customer's request based on their intent:

1. Open/exploratory question ("How do I migrate to MSK?")

Explain what this skill offers:

This skill helps you migrate to MSK Express in three phases:

Phase 1 — Discovery: Inventory your source Kafka cluster — brokers, topics, partition counts, configs, authentication, and workload metrics — plus two target decisions that drive cost: consumer rack affinity and any negotiated AWS pricing. I can discover this from IaC files (Terraform, CDK, Docker Compose, Kubernetes manifests), provide commands for you to run on your cluster, or you can provide the information manually. Output: migrate-to-msk-skill-artifacts/<cluster_name>/cluster-config.json.

Phase 2 — Assessment: Validate your cluster against MSK Express across 5 compatibility pillars (topology, Kafka version, configs, auth, quotas) and produce a target Express specification using the managing-amazon-msk Skill's pricing logic. I'll flag what Express will refuse vs what Express will silently convert. Outputs: compatibility.<cluster_name>.json, the pricing results in Markdown msk_sizing_pricing.md, and msk-sizing-inputs.<cluster_name>.json.

Phase 3 — Simulation: Spin up an MSK Express cluster with load-testing infrastructure to see how Express performs on your own workload, then run a vended test (End-to-End Latency or Broker Restart Under Load) and review the results on a CloudWatch dashboard.

Data replication: For migrating data to your Express cluster, you can use MSK Replicator. I can provide guidance on setup and configuration.

Where would you like to start? I can begin with discovery if you point me to your infrastructure code or describe your cluster, or jump to assessment if you already have a cluster-config.json file, or go straight to simulation if you already know your target Express configuration.

Guardrails for this overview response:

  • This response is an overview and a routing question only. Do NOT begin, simulate, or pre-empt any phase.

  • Do NOT produce or estimate assessment output here — no verdicts, pillar findings, compatibility conclusions, broker counts, instance recommendations, or cost figures. Those values exist only after you run the Phase 2 scripts against a real cluster-config.json.

  • Do NOT open, read, or summarize the internals of compatibility.py, simulation_load_test_config.py, or the reference files to explain how a phase works. Describe the phases at the level shown above; do not walk the customer through the implementation.

  • When the customer chooses a phase, run that phase's scripts or flow to produce real results. Always operate the skill to answer — never answer from having read its source. For the exact commands, see "Running the assessment" in references/assessment-compatibility.md for Phase 2, and references/simulation.md for Phase 3.

2. Discovery intent (DEFAULT when IaC files are provided)

If the customer provides a directory path, IaC files, or says "here's our infra" — this is discovery intent. Run ONLY Phase 1 (Discovery). Do NOT run assessment, do NOT suggest migration steps, do NOT mention blockers or compatibility. Produce the migrate-to-msk-skill-artifacts/<cluster_name>/cluster-config.json file and stop.

3. Assessment intent

Customer explicitly asks to assess or has a migrate-to-msk-skill-artifacts/<cluster_name>/cluster-config.json file already produced. Run Phase 2 (Assessment) only.

4. Simulation intent

Customer wants to test MSK Express with their workload. They can provide cluster sizing directly (instance type, broker count, Kafka version) or reference an earlier assessment. Proceed directly to Phase 3 — Simulation. An assessment is helpful but not required — the simulation asks for sizing inputs directly.

5. Informational questions

Customer asks about Express capabilities, constraints, configuration differences, authentication support, pricing, or compaction behavior without providing cluster-specific data. Use AWS documentation tools (aws___search_documentation, aws___read_documentation) if available to look up the answer from MSK Express documentation. If MCP tools are not available, reference the MSK Express documentation and answer based on knowledge of AWS MSK.

6. Migration strategy questions

Customer asks about MSK Replicator compatibility, version upgrade paths, MirrorMaker 2, or migration strategies. MSK Replicator is the native AWS-supported solution for data replication and works for both MSK-to-MSK and non-MSK-to-MSK migrations. Use AWS documentation tools (aws___search_documentation, aws___read_documentation) if available to retrieve current requirements and supported configurations. If MCP tools are not available, reference the MSK Replicator documentation and answer based on knowledge of AWS MSK.


Phase 1 — Discovery

Purpose: Inventory the source cluster to build a migration profile.

Input: One of:

  • A directory path containing IaC files (CDK, CloudFormation, Docker Compose, Kubernetes manifests, Terraform)

  • Output from Kafka CLI commands the customer runs on their cluster

  • Manual information provided by the customer in conversation

Output: migrate-to-msk-skill-artifacts/<cluster_name>/cluster-config.json — saved to the working directory.

Discovery rules
  • Before doing ANYTHING else in discovery, you MUST read references/discovery.md in full. It defines the input methods, the REQUIRED response template, the forbidden content, and the cluster-config.json schema. Do NOT respond until you have read it, and follow its template EXACTLY.

  • ALWAYS save migrate-to-msk-skill-artifacts/<cluster_name>/cluster-config.json in the working directory.

  • Do NOT proceed to Phase 2 without explicit customer confirmation.


Phase 2 — Assessment

Purpose: Assess the cluster against MSK Express requirements and produce a target Express specification (instance type, broker count, monthly cost projection).

Input: migrate-to-msk-skill-artifacts/<cluster_name>/cluster-config.json from Phase 1.

Outputs:

  • migrate-to-msk-skill-artifacts/<cluster_name>/compatibility.<cluster_name>.json — five-pillar verdict.

  • migrate-to-msk-skill-artifacts/<cluster_name>/msk_sizing_pricing.md — the managing-amazon-msk Skill's pricing report with broker count and cost recommendations.

  • migrate-to-msk-skill-artifacts/<cluster_name>/msk-sizing-inputs.<cluster_name>.json — a record of the six input values for sizing logic.

Assessment has two independent halves; run them in either order, and a failure in one does not block the other:

  • Compatibility — scripts/compatibility.py, a pure file processor (no live AWS API calls) run via uv run with PEP 723 inline dependencies. It validates the source across five pillars — topology, Kafka version, configs, auth, and quotas — and emits one verdict per pillar (INFO, ADVISORY, or ACTION_REQUIRED, worst-of for the overall). Use those three strings verbatim.

  • Sizing — not a script in this skill. Load the managing-amazon-msk Skill and run its scripts/msk_sizing.py with the workload inputs derived from cluster-config.json, passing --broker-classes express and --region for the target Region. The script prices from the live AWS Pricing API when credentials are available and from an embedded us-east-1 snapshot when they are not.

Assessment rules
  • Read references/assessment-compatibility.md before responding. It carries the invocation commands, the per-pillar thresholds and evidence codes, the verdict definitions, the full forbidden-behavior list, and the required response template covering both artifacts. Do not freestyle the post-script summary.

  • Read references/assessment-sizing.md before running sizing. It carries the input derivations (several are not one-to-one — getting them wrong silently produces a wrong broker count), the target-block flags for rack affinity and negotiated discounts, the Region and pricing-source handling, the Express-only presentation rule, and the source-footprint comparison.

  • Surface any ACTION_REQUIRED evidence to the user for awareness, but do not gate further phases on it. Express may still accept the workload with mitigations.

  • Do NOT pivot back into discovery. Assessment operates on the existing cluster-config.json as-is. Partial data is fine — the scripts emit ADVISORY evidence (METRICS_MISSING, AZ_COUNT_UNKNOWN, etc.) for missing fields; surface those findings and stop. Do not propose Kafka CLI commands, IaC walks, scripts, or questionnaires to fill the gaps.

  • Report broker counts and costs only as read verbatim from the sizing script output. Never round, re-derive, or estimate them. Report the pricing source the script used alongside the costs; when it is static, the rates are an embedded snapshot, not confirmed current pricing.


Phase 3 — Simulation (optional)

Deploy a temporary, isolated MSK Express cluster and client fleet in the customer's account so they can see how Express performs on their own workload, then run one of two vended tests (End-to-End Latency, Broker Restart Under Load) and hand over a CloudWatch dashboard. Follow the 12-step conversational flow and all deploy, sizing, and guardrail details in references/simulation.md; the deterministic artifacts it drives are scripts/simulation_load_test_config.py and the static assets/simulation-stack.yaml.


Execution model

Scripts run on the customer's local machine via uv run. They declare their own dependencies (PEP 723) and are pure file processors — no AWS API calls, no network access, and no third-party dependencies (standard library only).

Security Considerations

Apply these controls at every phase. For additional detail, see MSK Security best practices and MSK IAM access control.

  1. Encryption in transit (mandatory). Enforce TLS for client-broker traffic on the MSK Express target (EncryptionInTransit.ClientBroker = TLS).

  2. Encryption at rest (mandatory). Provision the target cluster with a customer-managed KMS key (or AWS-managed if your compliance posture allows).

  3. Authentication — prefer IAM over long-lived credentials. Configure the MSK Express target with IAM authentication as the sole client auth method. This gives ephemeral, role-based credentials with full CloudTrail coverage.

  4. Credential storage — use AWS Secrets Manager. Store SASL/SCRAM and TLS credentials for source cluster access in Secrets Manager. Never pass passwords as CLI arguments.

  5. Network isolation. Deploy MSK clusters in private subnets. Use security groups scoped to specific CIDR ranges or security group references. Do NOT use 0.0.0.0/0 ingress rules.

  6. CloudTrail logging and CloudWatch alarms. Ensure CloudTrail is enabled in the target account and covers kafka.amazonaws.com API calls. Configure alarms:

    • ClientAuthenticationFailure — surge indicates credential problems or attack

    • ConnectionCloseCount — abnormal spike may indicate connection-flooding

    • CloudTrail metric filters for denied kafka-cluster:* actions

    • Connection-rate alarms approaching the 100 conn/sec/broker IAM limit

  7. Sensitive data handling. Discovery and assessment outputs contain broker addresses, auth hints, and broker config values. Treat these as sensitive — do not paste into public channels or ticketing systems without redaction.

Troubleshooting

Per-pillar findings, including the source topology and out-of-range config cases, are explained in references/assessment-compatibility.md.

Files

references/assessment-compatibility.md

Assessment — Compatibility

This reference describes the compatibility assessment for migrating a self-managed Apache Kafka cluster to MSK Express. It documents the five pillars that scripts/compatibility.py evaluates — topology, Kafka version, configs, auth, and quotas — together with the AWS-doc-anchored thresholds and the per-finding verdicts each pillar emits.

compatibility.py is a pure file processor: input is the discovery contract migrate-to-msk-skill-artifacts/<cluster_name>/cluster-config.json; output is compatibility.<cluster_name>.json. No live cluster or AWS API calls.

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 (compatibility.py, simulation_load_test_config.py) — from different places. Determine how the skill was loaded before you read a reference or run a script:

  • Loaded through the AWS MCP retrieve_skill tool 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 same retrieve_skill tool by passing the file parameter (for example, file="references/assessment-compatibility.md" or file="scripts/compatibility.py"), and run a script from the content that tool returns. Do NOT file_read these 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/migrate-to-msk/, ~/.claude/skills/migrate-to-msk/, or .kiro/skills/migrate-to-msk/). Read references and run scripts from the local skill directory using the relative paths shown throughout this documentation (uv run scripts/compatibility.py ...).

This distinction applies only to the skill's own packaged files. The customer's data is always on the local filesystem in both modes: the input IaC files, the discovery cluster-config.json, and every artifact under migrate-to-msk-skill-artifacts/<cluster_name>/ are read from and written to the customer's working directory regardless of how the skill was loaded. Never fetch or write customer data through retrieve_skill.

Running the assessment

Run both scripts with uv run, which resolves each script's declared dependencies automatically. Resolve the script location first per the guardrail above — when this skill was loaded through the MCP retrieve_skill tool, fetch each script via retrieve_skill with the file parameter and run that content; when it is installed locally, run it from the local skill directory. Pass the discovery cluster-config.json as input, and write the outputs into the same per-cluster artifacts directory:

# Compatibility -> compatibility.<cluster_name>.json
uv run scripts/compatibility.py \
  migrate-to-msk-skill-artifacts/<cluster_name>/cluster-config.json \
  --out-dir migrate-to-msk-skill-artifacts/<cluster_name>

Sizing is not a script in this skill. Load the managing-amazon-msk Skill and run its scripts/msk_sizing.py with the workload inputs derived from cluster-config.json, passing --broker-classes express. Write the summary to migrate-to-msk-skill-artifacts/<cluster_name>/msk_sizing_pricing.md and the input record to msk-sizing-inputs.<cluster_name>.json. See assessment-sizing.md for the full flow, the Express-only presentation rule, and the source-footprint comparison.

Compatibility and sizing are independent: run them in either order, and a failure in one does not block the other.

Source of truth (AWS public docs)

Every threshold and rule below is anchored to one of these AWS public documentation pages. When AWS publishes updates, refresh the constants in compatibility.py and re-run tests.

Apache Kafka per-version defaults (used to filter the full config dump):

Assessment scope — forbidden behavior

Assessment operates on the existing cluster-config.json produced by Phase 1 (Discovery). It is NOT discovery, and it does NOT pivot back into discovery when the input is incomplete.

When in Assessment, you MUST NOT:

  • Discuss the discovery phase, mention "Phase 1", or describe how cluster-config.json is produced.

  • Propose, suggest, or display any method for gathering more cluster information — no Kafka CLI commands (kafka-topics.sh, kafka-configs.sh, kafka-broker-api-versions.sh, etc.), no IaC file walks, no Python discovery scripts, no boto3 calls, no manual questionnaires, no "would you like me to fetch X from your cluster?" prompts.

  • Ask the user to provide additional cluster fields, peaks, configs, or topics. The contract is fixed at the input file.

Two exceptions, both cost assumptions about the target rather than facts about the source cluster, and both material to the estimate: whether consumers will use rack-aware fetching (target.rack_affined_consumers) and whether the customer has a negotiated discount to apply (target.pricing_discount_pct). Discovery collects both into the target block — read them from cluster-config.json first. Ask only for the ones that are null or absent, once, together, before running sizing — see "Negotiated pricing" and "Consumer rack affinity" in assessment-sizing.md. Asking them does not license any other question.

Partial data is fine. When required fields are missing or empty (no metrics block, no num_azs, no broker configs, etc.), the scripts already emit ADVISORY evidence describing the gap (METRICS_MISSING, AZ_COUNT_UNKNOWN, etc.). Surface those verdicts to the user as-is and stop. Do not offer to gather the missing data yourself. If the user wants better assessment fidelity, they can re-run Phase 1 — but suggesting that is a routing decision the user makes, not something Assessment proposes mid-flow.

If the input is malformed (compatibility.py's validate_input raises), report the error from the script and stop. Do not improvise around it.

Response Template

After running compatibility.py and the managing-amazon-msk sizing script, your response MUST follow the template below exactly. One template covers both artifacts in a single response.

FORBIDDEN content — do NOT include any of the following:

  • Free-form narrative summaries beyond what the template allows.

  • Editorial framings ("looks good overall", "this is a clean migration", "you're in great shape", "minor issues only", etc.). State facts; let the user judge.

  • Numeric scores, percentages, or "readiness scores". The skill emits categorical verdicts only.

  • Recommendations to run discovery again, fetch more cluster data, or invoke any Kafka CLI / IaC walk / questionnaire (see "Assessment scope" above).

  • MSK Replicator commands or any migration execution detail. That belongs to a later conversation, not the assessment response.

  • "Action items", "Next steps", or "Recommendations" sections beyond the one mandated below.

  • Broker counts or cost figures you did not read from the sizing script output. Report the script's Express pick verbatim; never round, re-derive, or estimate.

  • Standard instance types, broker counts, or costs, unless the customer asked to compare classes (see "Present Express only" in assessment-sizing.md).

Template
## Assessment Complete — <cluster_name>

**How to read these results:**

- **`INFO`** — This setting already matches how MSK Express works. No action needed — it's listed so you can see it was checked.
- **`ADVISORY`** — Your cluster differs from MSK Express here, and Express adjusts or replaces this for you during migration. You can migrate as-is, but we recommend reviewing it so the change in behavior is expected; where a setting behaves differently, validate in a test environment first.
- **`ACTION_REQUIRED`** — MSK Express won't accept this configuration as-is, so it can't be migrated unchanged. We'll walk you through what to adjust before you migrate.
**Overall verdict:** <INFO | ADVISORY | ACTION_REQUIRED>

### Compatibility — by pillar

| Pillar | Verdict | Findings |
|---|---|---|
| Topology | <verdict> | <count> finding(s) |
| Kafka version | <verdict> | <count> finding(s) |
| Configs | <verdict> | <count> finding(s) |
| Auth | <verdict> | <count> finding(s) |
| Quotas | <verdict> | <count> finding(s) |

### Findings

(One bullet per evidence object emitted by compatibility.py. List only
non-INFO findings. Use the `code` and `detail` from the evidence verbatim.
Group by pillar in the same order as the table.)

- **`<EVIDENCE_CODE>`** [<severity>] — <detail string from compatibility.py>
- ...

If there are zero non-INFO findings, replace this section with:
"No advisories or action-required items. All five pillars: INFO."

### Recommended Express target

**`<express instance type>` — <N> brokers — $<total>/mo (us-east-1)**

Bottleneck: <ingress | egress | partitions | storage>. <One sentence on the demand
vs per-broker capacity that drives the count, from the script's output.>

Your source cluster runs <source broker count> broker(s)<, instance type
`<broker_instance_type>` when present>. <State the delta against the recommended
target. When the target is smaller, explain why per "Compare the recommendation
against the source footprint" in assessment-sizing.md. When
`broker_instance_type` is absent, compare broker counts only and say the
instance-level comparison was not possible.>

Full breakdown — inputs, per-instance options, cost components, and cost-optimization
opportunities:

`migrate-to-msk-skill-artifacts/<cluster_name>/msk_sizing_pricing.md`

Verify the per-cluster broker quota before provisioning: **60 brokers with KRaft,
30 with ZooKeeper** (adjustable via Service Quotas). Cost figures use public
on-demand pricing for the Region you sized against — see the
[Amazon MSK pricing page](https://aws.amazon.com/msk/pricing/). State the Region and,
when the sizing run reported a `static` pricing source, say the rates came from the
script's embedded snapshot rather than a live lookup.

### Artifacts produced

- `migrate-to-msk-skill-artifacts/<cluster_name>/compatibility.<cluster_name>.json`
- `migrate-to-msk-skill-artifacts/<cluster_name>/msk_sizing_pricing.md`
- `migrate-to-msk-skill-artifacts/<cluster_name>/msk-sizing-inputs.<cluster_name>.json`

---

Would you like to discuss data replication strategy or revisit any of the
findings above?
Rules
  • The response MUST start with ## Assessment Complete — <cluster_name> using the cluster_name from the input.

  • The response MUST open with the "How to read these results:" legend exactly as shown, then the overall verdict.

  • Use the verdict strings (INFO / ADVISORY / ACTION_REQUIRED) verbatim in the legend, verdict, table, and findings. Do not translate to "Pass / Warn / Fail" or any other vocabulary.

  • The findings list reproduces evidence code and detail strings as-is. Do not paraphrase the script's wording, do not drop the code, do not reorder severity components within a finding.

  • The "Recommended Express target" section carries the instance type, broker count, and monthly cost read verbatim from the sizing script. Do not add cost sections beyond it, and do not restate the per-instance option table — that lives in msk_sizing_pricing.md.

  • Do NOT add a confidence rating, risk score, or quality bar.

  • Do NOT add migration timeline estimates.

  • The closing question is fixed: ask whether to discuss data replication strategy or revisit findings. No alternative phrasings.

Pillars

compatibility.py runs five pillars; the pillar-roll-up is the worst per-finding severity.

1. Topology (assess_topology)

The 3-AZ requirement, KRaft availability, and the 3-broker minimum come from the Express broker overview page. The target broker count is determined by the sizing script, not carried over from the source, so this pillar does not compare the source broker count against a per-cluster ceiling.

CodeSeverityWhen
AZ_COUNT_UNKNOWNADVISORYtopology.num_azs missing
AZ_COUNT_NOT_3ADVISORYtopology.num_azs ≠ 3 (note: Express always uses 3 AZs)
BROKER_COUNT_LT_3ADVISORYtopology.num_brokers < 3 (note: Express minimum is 3; exact count comes from the sizing script)
KRAFT_REQUIRED_FOR_VERSIONADVISORYkafka.version is 3.9 and kafka.coordination_mechanism is ZooKeeper

A single-broker or single-AZ source emits these two advisories rather than an action item: Express fixes it at the target by deploying across 3 AZs with ≥3 brokers regardless of the source layout.

2. Kafka version (assess_kafka_version)

Per the Express broker overview page, MSK Express supports Apache Kafka versions 3.6, 3.8, and 3.9. Any version outside that set is ADVISORY: your cluster runs a different version, so after migrating your workload will run on a new Kafka version. Confirm your client libraries and applications are compatible with the Express Kafka version you choose — Kafka clients are generally compatible across minor versions, but we recommend validating in a test environment before migrating. See the Apache Kafka upgrade notes at https://kafka.apache.org/documentation/#upgrade for details. Sources older than Apache Kafka 2.8.1 additionally cannot be data-migrated with MSK Replicator (which requires a 2.8.1+ source); use a MirrorMaker 2 based solution for data migration in that case.

CodeSeverityWhen
VERSION_SUPPORTEDINFOkafka.version ∈ {3.6, 3.8, 3.9}
VERSION_NOT_IN_EXPRESS_SETADVISORYany other version (older, newer, or a gap such as 3.7); message adds the MirrorMaker 2 note when kafka.version < 2.8.1
3. Configs (assess_configs)

Largest pillar. Covers broker-level (broker_configs) and topic-level (topics[].configs) configs.

Default-value filtering. Discovery passes the FULL Kafka config dump (every config the source exposed). compatibility.py compares each value against the Apache Kafka default for the source's kafka.version; values matching the default produce no evidence. Only divergences from default are evaluated against the rules below. See BROKER_DEFAULTS_BY_VERSION and TOPIC_DEFAULTS_BY_VERSION in the script.

Express config buckets (sourced from the Express read/write and read-only broker configuration pages):

  • Editable — configurable on Express. Your values carry over.

  • Read-only — Express enforces a fixed value (sometimes instance-derived). Custom overrides are silently replaced.

  • Range-restricted — editable, but with a documented bounded range; out-of-range values are rejected.

  • Forced — read-only with a known fixed enforcement value.

  • Non-exposed — not a configurable property on MSK Express. This value is managed internally and may differ from your current setting. We recommend validating on a test cluster to confirm the behavior meets your expectations before migrating production traffic.

The exact sets are constants in compatibility.py (EXPRESS_BROKER_RW, EXPRESS_BROKER_RO, EXPRESS_BROKER_RANGES, EXPRESS_BROKER_FORCED, and the topic-level equivalents).

Decision matrix (applied to non-default values only):

Membership of keyVerdict
Editable and within rangeINFO (no evidence emitted)
Editable with a range, and value out of rangeACTION_REQUIRED (*_CONFIG_OUT_OF_RANGE)
In forced set, value ≠ forced valueADVISORY (*_CONFIG_FORCED_VALUE)
Read-only (not in forced)ADVISORY (*_CONFIG_READ_ONLY)
Not in editable or read-only setsADVISORY (*_CONFIG_NOT_EXPOSED)

Per-topic replication factor: replication_factor ≠ 3 → ADVISORY (TOPIC_RF_NOT_3); Express creates topics with a replication factor of 3 regardless.

Documented bounded ranges (Express read/write configurations page):

ConfigBound
log.cleaner.max.compaction.lag.ms[1 day = 86_400_000 ms, +∞]
max.compaction.lag.ms (topic)[1 day = 86_400_000 ms, +∞]

max.compaction.lag.ms < 1 day is the only Express-rejected topic-config bound encoded in compatibility.py. Adjust it on the source before migration.

Forced values (Express read-only configurations page):

ConfigExpress value
default.replication.factor3
min.insync.replicas (broker + topic)2
transaction.state.log.min.isr2
unclean.leader.election.enable (broker + topic)false
4. Auth (assess_auth)

MSK Express supports four client authentication mechanisms — unauthenticated, TLS (AWS Private CA), SASL/SCRAM (Secrets Manager), and IAM (SASL/AWS_MSK_IAM or SASL/OAUTHBEARER, both carrying an AWS IAM token via the AWS MSK IAM libraries). TLS in transit is required for every authenticated mechanism; plaintext is only possible with unauthenticated access. The discovery contract carries two closed-enum fields, security.encryption_in_transit and security.authentication; a missing field or an explicit UNKNOWN is treated as undetermined and flagged ADVISORY (it is not a hard failure). Unrecognized values are rejected at validation time.

The supported mechanisms (unauthenticated, TLS, SASL/SCRAM, IAM) carry over as-is and emit no evidence (INFO).

CodeSeverityWhen
AUTH_OAUTHBEARER_NOT_SUPPORTEDACTION_REQUIREDsecurity.authentication = SASL_OAUTHBEARER (custom OAuth provider; MSK Express accepts OAUTHBEARER only as an AWS IAM token transport, not with external identity providers)
AUTH_UNKNOWNADVISORYsecurity.authentication = UNKNOWN or missing (verify it is a supported mechanism)
AUTH_MECHANISM_NOT_SUPPORTEDACTION_REQUIREDsecurity.authentication = OTHER (e.g. SASL/GSSAPI/Kerberos, SASL/PLAIN — not supported by Express)
ENCRYPTION_NOT_TLSACTION_REQUIREDsecurity.encryption_in_transit ≠ TLS and an authenticated mechanism is in use (TLS / SASL/SCRAM / IAM) — Express requires TLS for these; update clients before migrating
ENCRYPTION_UNKNOWNADVISORYsecurity.encryption_in_transit = UNKNOWN or missing (confirm clients can use TLS)

Unauthenticated access is INFO — Express supports it, and plaintext is permitted in that case, so no encryption finding fires. Mechanism-specific re-credentialing work (SASL/SCRAM secret prefix, IAM policies, TLS Private CA association) is out of scope for compatibility — handled by migration planning.

5. Quotas (assess_quotas)

Compatibility checks absolute Express ceilings — workload can't fit any Express configuration. Sizing checks per-instance fit.

All values below come from the Express broker quotas page.

LimitValue
Max ingress / broker (max-quota at m7g.16xlarge)750 MBps
Max egress / broker (max-quota at m7g.16xlarge)1875 MBps
Max partitions / broker32_000
Max IAM connections / broker3_000
Max throughput / partition15 MB/s
CodeSeverityWhen
METRICS_MISSINGADVISORYmetrics block absent
INGRESS_OVER_MAX_BROKERADVISORYpeak_bytes_in_per_broker_mbps > 750
EGRESS_OVER_MAX_BROKERADVISORYpeak_bytes_out_per_broker_mbps > 1875
PARTITIONS_OVER_MAX_BROKERADVISORYpeak_partitions_per_broker > 32_000
CONNECTIONS_OVER_IAM_LIMITADVISORYsecurity.authentication ∈ {SASL_IAM, SASL_OAUTHBEARER} AND peak_connections_per_broker > 3_000
PARTITION_THROUGHPUT_OVER_LIMITADVISORYaverage per-partition throughput (peak_in × num_brokers / total_partitions) > 15 MB/s

The per-partition check is approximate; hot partitions can exceed 15 MB/s while the cluster average is fine.

Output schema

{
  "cluster_name": "<from input>",
  "assessed_at": "<ISO-8601>",
  "overall": "INFO | ADVISORY | ACTION_REQUIRED",
  "pillars": {
    "topology":      {"verdict": "...", "evidence": [...]},
    "kafka_version": {"verdict": "...", "evidence": [...]},
    "configs":       {"verdict": "...", "evidence": [...]},
    "auth":          {"verdict": "...", "evidence": [...]},
    "quotas":        {"verdict": "...", "evidence": [...]}
  },
  "summary": {
    "action_required_codes": [...],
    "advisory_codes":        [...],
    "info_codes":            [...]
  }
}

Each evidence object carries code, severity (per-finding, used for summary bucketing), detail, plus optional topic, config_key, observed, limit, enforced.

Refresh procedure

The script is the source of truth. This reference documents the rules scripts/compatibility.py enforces — the AWS-doc-anchored data and the classification matrix. Do not re-implement the script from this document. Always invoke scripts/compatibility.py directly. If the script's behavior diverges from this reference, the script wins; update this reference instead.

When AWS publishes updates to the anchor docs:

  1. Re-fetch the AWS public docs linked at the top of this file.

  2. Diff against the constants at the top of compatibility.py.

  3. Update BROKER_DEFAULTS_BY_VERSION / TOPIC_DEFAULTS_BY_VERSION if Apache Kafka adds a new supported version.

  4. Run python3 -m pytest scripts/tests/.

Security considerations

  • Discovery input may contain credentials. cluster-config.json is produced by the discovery phase. Before passing it to compatibility.py, verify it does not contain SASL passwords, API keys, TLS private keys, or other credential material. The discovery contract intentionally captures security.authentication (the mechanism) but never the secret itself; if your discovery output includes anything resembling a credential, redact it before processing or sharing.

  • Output files reveal cluster topology and configuration. The compatibility.<cluster_name>.json output enumerates broker configs, topic configs, partition counts, and authentication mode. Treat it as sensitive: store with restrictive permissions (e.g., chmod 600), keep it inside the migrate-to-msk-skill-artifacts/<cluster_name>/ directory, and do not paste it into public channels, ticketing systems, or shared chat without redaction.

  • Do not log raw config values. The script's evidence detail strings include observed config values; this is intentional for human review but means logs containing this output should be retained under the same controls as the cluster-config input.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs an MCP server, Needs Python

Security

What our scanner noticed· Low risk

  • Instructions that use the network
  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
AWS
Publisher
AWS (Official)
Source
aws/agent-toolkit-for-aws · plugins/aws-data-analytics/skills/migrate-to-msk · commit 0a218f8
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • NOTICE (added by AutoGineer from NOTICE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced
Also distributed in
aws/agent-toolkit-for-aws

AutoGineer is not affiliated with or endorsed by AWS or AWS.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download migrate-to-msk.zip