Managing Amazon Msk
AWSOfficialPublished by AWS
- Skill
- Tool integration
- Cloud and DevOps
- Apache-2.0
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides domain expertise for operating Amazon MSK Provisioned clusters. It covers performance troubleshooting, consumer lag diagnosis, storage management, cluster sizing, client configuration, and CloudWatch monitoring. It distinguishes between Standard and Express broker architectures, providing specific workflows for maintenance, topic management, and MSK Replicator setup. The skill also includes guidance on integrating with S3 via Streaming Tables and Data Delivery for General Purpose S3.
What it does
- Provides configuration patterns for Kafka producers and consumers.
- Offers workflows for managing MSK cluster configurations and custom domain names.
- Includes a sizing script for determining broker counts and instance types.
- Details procedures for MSK Replicator setup for DR and cross-account replication.
- Outlines monitoring and alerting strategies using CloudWatch metrics.
- Guides the setup of Streaming Tables and Data Delivery for S3.
When to use it
- When configuring or tuning Kafka clients for MSK connectivity.
- When sizing a new MSK cluster or choosing between Standard and Express brokers.
- When troubleshooting performance issues, consumer lag, or storage constraints.
- When setting up cross-cluster replication or disaster recovery.
- When integrating MSK with S3 for data lake or streaming table requirements.
Advantages
- Provides clear decision frameworks for Standard vs. Express broker types.
- Includes automated sizing logic via provided scripts.
- Centralizes operational procedures for common MSK maintenance tasks.
- Offers specific guidance for complex configurations like custom advertised listeners.
Usage examples
- “How do I choose between MSK Standard and Express brokers for my workload?”
- The agent will guide you through the size-and-choose-cluster.md reference and run the msk_sizing.py script to compare costs and performance characteristics.
- “My consumer lag is increasing, what should I check?”
- The agent will provide a troubleshooting workflow based on troubleshoot-consumer-lag.md, covering rebalance issues and consumer group health.
- “How do I configure a custom domain name for my MSK brokers?”
- The agent will explain how to use the custom.advertised.listeners configuration property as detailed in configure-cluster.md.
- “What are the recommended producer settings for MSK?”
- The agent will provide the table of recommended values for settings like linger.ms, batch.size, and acks from the configure-clients.md reference.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/aws/managing-amazon-msk/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip managing-amazon-msk.zip -d .agents/skills
Documentation by AWS
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 use instance types prefixed with express.m7g and are the default recommendation for almost all MSK workloads — they typically cost less, not just less effort. Up to 3x ingress per broker (MSK Express broker types) means fewer brokers for the same load, and storage is billed per GB-hour on data actually retained rather than provisioned up front on EBS that cannot shrink. They also scale 20x faster, rebalance partitions 180x faster (Intelligent Rebalancing), recover 90% quicker (MSK Express broker types), and have no maintenance windows. 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. See size-and-choose-cluster.md for the full Standard vs Express decision framework.
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 |
Creating/applying MSK configurations (server.properties); custom domain names on brokers via custom.advertised.listeners (advertised listeners, static/custom bootstrap endpoint) — validation rules, apply/rollback, scaling; migrating from the dynamic per-broker kafka-configs.sh override to the static property | configure-cluster.md |
| Client-side connectivity for a custom domain: NLB + ACM certificate + Route 53 fronting, TLS handshake/termination, mTLS through an NLB, cross-zone load balancing | configure-clients.md (Custom Domain Name Connectivity section) |
Create, update, delete, list, or describe Kafka topics; when to use the native topic APIs / CfnTopic vs. a Kafka admin client | manage-topics.md |
| MSK Replicator setup, migration, DR, active-active/active-passive, cross-account replication, self-managed-to-MSK or MSK-to-MSK, loop-prevention/topic-naming behavior | msk-replicator.md |
Replication throughput per partition, how many partitions a replicator needs, why replicator scaling isn't increasing throughput, replicator quotas (topics, ingress, record size), ReplicationLatency/MessageLag/ReplicatorThroughput | msk-replicator.md (Size partition count section) |
| Setting up monitoring, dashboards, alarms | monitor-and-alarm.md |
| Full CloudWatch metric list (Standard or Express) | Prefer monitor-and-alarm.md for strategic recommendations and how to interpret metrics, only search documentation if you need to understand a metric not included in this reference file (MSK Standard CloudWatch Metrics, MSK Express CloudWatch Metrics) for full list |
| Rolling restart impact, patching, maintenance resilience | maintenance-operations.md |
| Deliver streaming data to Apache Iceberg tables on S3 Tables with low cost in a fully managed service (Streaming Tables) — setup, IAM, schema, create/update/delete/list/describe channels | streaming-tables.md |
| Deliver topic data to S3 bucket as JSON/ByteArray/String objects with low cost in a fully managed service (Data Delivery for General Purpose S3 buckets) — setup, IAM, output key templates, create/update/delete/list/describe channels | data-delivery-for-general-purpose-s3.md |
| Build a lakehouse / data lake from Kafka; make streaming data queryable in Athena | streaming-tables.md |
| Alternative to Kafka Connect S3 Sink or Amazon Data Firehose for MSK; zero-ops streaming delivery to S3 | data-delivery-for-general-purpose-s3.md |
| Streaming Tables / Data Delivery CloudWatch metrics and alarms, DLQ errors, failed deliveries, channel state transitions, freshness lag | streaming-tables-troubleshooting.md |
| "Can I use Streaming Tables / Data Delivery on MSK Serverless / Standard brokers?" — eligibility routing | streaming-tables.md (answer is always: Express brokers only, use Firehose, Flink, or Kafka Connect for Standard and Serqverless - Firehose integration for Amazon MSK) |
| What are the current supported Kafka versions for MSK? | Supported Apache Kafka versions |
| Does MSK support KRaft clusters, and how do I migrate between ZooKeeper and KRaft mode clusters? | zk-to-kraft-migration.md |
| What are the current quotas for MSK Express (ingress, egress, partitions, broker count, etc.)? | MSK Express Quotas |
| What are the current quotas for MSK Standard (partitions, broker count, etc.)? | MSK Standard Quotas, and MSK Standard best practices for partition count limits |
| What broker-level configuration changes can I make on MSK Express or Standard brokers? | MSK Configuration |
Available scripts
scripts/msk_sizing.py— MUST be run for any sizing question (broker count, instance choice, cost). Prices from the live AWS Pricing API when AWS credentials withpricing:GetProductsare available, and falls back to an embeddedus-east-1snapshot when they are not, so it runs with or without credentials. 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.
Common Workflows
Create/apply Amazon MSK configurations and set custom domain names — creating an Amazon MSK configuration (server.properties with the fileb:// real-newline requirement), applying it with update-cluster-configuration, and setting broker custom domain names via custom.advertised.listeners: see configure-cluster.md. For the NLB/certificate/DNS connectivity that fronts a custom domain, see configure-clients.md.
Files
- ATTRIBUTION.mdAdded by AutoGineer918 B
- LICENSELicence file added by AutoGineer9.9 KiB
- NOTICELicence file added by AutoGineer67 B
- SKILL.md11.0 KiB
- references/configure-clients.md13.3 KiB
- references/configure-cluster.md11.3 KiB
- references/data-delivery-for-general-purpose-s3.md15.7 KiB
- references/maintenance-operations.md13.0 KiB
- references/manage-storage.md8.5 KiB
- references/manage-topics.md7.0 KiB
- references/monitor-and-alarm.md15.4 KiB
- references/msk-replicator.md18.9 KiB
- references/size-and-choose-cluster.md17.2 KiB
- references/streaming-tables-troubleshooting.md5.3 KiB
- references/streaming-tables.md19.5 KiB
- references/troubleshoot-consumer-lag.md11.5 KiB
- references/troubleshoot-performance.md9.3 KiB
- references/zk-to-kraft-migration.md728 B
- scripts/msk_sizing.pyScript62.6 KiB
references/msk-replicator.md
MSK Replicator
Cross-cluster replication for migration, disaster recovery, active-active/active-passive, and multi-Region fan-out. Determine the topology and account layout first: which account each cluster lives in, which account the replicator itself will run in, and whether either cluster is Amazon MSK or third-party Kafka. That determines the KafkaClusterProperty type for each side, which in turn determines the auth, networking, and secret configuration described below.
Choosing the KafkaClusterProperty type for each side
AWS::MSK::Replicator's KafkaClusters list takes exactly two KafkaClusterProperty entries, each typed as either AmazonMskCluster or ApacheKafkaCluster. Choose the type based on whether the replicator can resolve the cluster natively, not just on whether it happens to be running Kafka:
| Scenario | Local cluster type | Remote cluster type |
|---|---|---|
| Both clusters are Amazon MSK, in the same AWS account as the replicator | AmazonMskCluster | AmazonMskCluster |
| One cluster is Amazon MSK in a different AWS account than the replicator | AmazonMskCluster (the one in the replicator's account) | ApacheKafkaCluster (the one in the other account — reference it as self-managed even though it is genuinely MSK) |
| Remote cluster is genuinely third-party/self-managed Kafka | AmazonMskCluster (your MSK side) | ApacheKafkaCluster |
Use AmazonMskCluster and reference the cluster by ARN whenever the replicator and that cluster share an account — this gets you IAM auth and skips the cluster-ID lookup entirely. Use ApacheKafkaCluster whenever the replicator cannot resolve the cluster's ARN directly, which includes any cross-account Amazon MSK cluster. When the remote side is ApacheKafkaCluster because it's a cross-account Amazon MSK cluster, apply the MSK-specific auth and secret rules below. When it's genuinely third-party Kafka, configure auth to match however that broker is actually set up instead.
Set vpcConfig only on the AmazonMskCluster entry
Configure the replicator's ENI placement (subnetIds, securityGroupIds) exclusively on the AmazonMskCluster entry's vpcConfig. vpcConfig is not a supported field on ApacheKafkaCluster and the API rejects it:
The vpcConfig parameter is only supported for AmazonMskCluster.Make sure the VPC behind the AmazonMskCluster entry already has a network path to the remote broker (VPC peering, PrivateLink, Transit Gateway, or Direct Connect) — the replicator uses existing routing and does not establish new connectivity for you.
Add a self-referencing ingress rule for the Kafka ports (9092/9094/9096/9098) on the security group used in vpcConfig, so the replicator's own ENIs can reach the local cluster's brokers over that same security group.
Use SASL/SCRAM mechanism SHA512 when the remote cluster is Amazon MSK
When the remote side is a cross-account Amazon MSK cluster referenced as ApacheKafkaCluster, set clientAuthentication.saslScram.mechanism to 'SHA512'. Amazon MSK only enables SCRAM-SHA-512 for SASL/SCRAM, never SHA-256, even though AWS's published CreateReplicator examples for self-managed sources show "mechanism": "SHA256" (that value applies to third-party brokers actually configured for SHA-256). Using SHA256 against an MSK broker fails with:
Client SASL mechanism 'SCRAM-SHA-256' not enabled in the server,
enabled mechanisms are [SCRAM-SHA-512]Look up the real Kafka cluster ID for apacheKafkaClusterId
Set apacheKafkaClusterId to the cluster's actual Kafka cluster ID, retrieved directly from the broker:
kafka-cluster.sh cluster-id --bootstrap-server <broker>:9096 --config <sasl.properties>Do not pass a human-readable name or label — the field accepts any string at creation time with no validation, but the replicator will fail once it attempts to connect, reporting ConnectivityError.SourceApacheClusterIdInvalid or TargetApacheClusterIdInvalid after sitting in CREATING for several minutes. Look up the cluster ID separately for every physical cluster you reference this way — a Standard and an Express cluster in the same account have distinct cluster IDs even if they serve the same logical workload.
Create a copy of the SASL/SCRAM secret in the replicator's own account
Store the replicator's clientAuthentication.saslScram.secretArn in a Secrets Manager secret that lives in the same account as the replicator, even when the remote cluster and its own copy of the same secret live in a different account (required for BatchAssociateScramSecret on that cluster). In cross-account setups this means maintaining two Secrets Manager secrets with the same username/password: one in the source cluster's account for BatchAssociateScramSecret, and one in the replicator's account purely for the replicator config. The API enforces this directly:
The secretArn must be in the same account as the replicator.Verify SCRAM secret association explicitly — do not rely on API success alone
After calling BatchAssociateScramSecret (directly or via a custom resource), confirm the association succeeded by running:
aws kafka list-scram-secrets --cluster-arn <arn>BatchAssociateScramSecret can return HTTP 200 while every secret in the request fails to associate — the per-secret failure is nested in responseElements.unprocessedScramSecrets, visible only in CloudTrail, not surfaced as an API error. A common cause is a missing KMS grant:
"unprocessedScramSecrets": [{
"secretArn": "arn:aws:secretsmanager:...:secret:AmazonMSK_...",
"errorCode": "InvalidSecretArn",
"errorMessage": "You are not authorized to invoke the CreateGrant operation on the KMS key that is used to encrypt the secret."
}]MSK performs the KMS CreateGrant call as the IAM principal that invoked BatchAssociateScramSecret (e.g. a Lambda execution role behind a custom resource), not as the kafka.amazonaws.com service principal. Grant kms:CreateGrant and kms:DescribeKey on the secret's KMS key to that calling identity, scoped to the key's ARN, rather than to the MSK service principal on the key policy.
Set topicNameConfiguration explicitly — do not rely on the default
Set topicNameConfiguration: { type: 'IDENTICAL' } whenever you need replicated topics to keep the exact source topic name — for example, transparent active-active/active-passive failover without reconfiguring clients, or any scenario that depends on the replicator's loop-prevention behavior (the __mskmr header check only matters when source and target topic names can collide). If you omit topicNameConfiguration, the replicator defaults to PREFIXED_WITH_SOURCE_CLUSTER_ALIAS, producing names like <source-cluster-alias>.<original-topic-name> — a different, valid choice when you don't need name parity, but treat it as a deliberate choice rather than an assumed default.
For bidirectional replication using IDENTICAL naming:
Create both directions' replicators (forward and reverse) in the same AWS account.
Reference each physical cluster with a single, consistent type (
AmazonMskClusterorApacheKafkaCluster) across both replicator definitions. Do not swap a cluster's type between the two directions — this breaks cross-account alias resolution and causes records to be re-replicated instead of being recognized as already-replicated.
Size partition count before scaling the replicator
Partition count on the source and target clusters is the binding constraint on replication throughput, not replicator capacity. Replicator scaling only converts into throughput when there are enough partitions to spread load across, so check partition count first whenever throughput sits below target or ReplicationLatency climbs. AWS's own remedy for rising ReplicationLatency is to check whether the clusters have enough partitions.
Scaling cannot rescue an under-partitioned topic: 2 GB/s spread over 5 topic-partitions is unreachable at any replicator size, while the same 2 GB/s over ~100 partitions is achievable. Throughput also has to be balanced across those partitions — one hot partition caps the topic regardless of how many partitions exist.
Published sizing table
The recommended minimum partition counts:
| Target throughput | Minimum partitions |
|---|---|
| 50 MB/s | 167 |
| 100 MB/s | 334 |
| 250 MB/s | 833 |
| 500 MB/s | 1666 |
| 1000 MB/s | 3333 |
Every row is exactly 0.3 MB/s per partition — the conservative cross-Region figure. Use the table as published for cross-Region replication. For same-Region it over-provisions by roughly 10-30x, so treat it as a safe upper bound rather than a requirement and size from the per-partition ranges below.
Per-partition throughput ranges
Capacity-modelling estimates only. These move with record size, batching, and cluster and replicator configuration, and are not service commitments — do not quote them to customers as guaranteed numbers.
| Topology | Typical per topic-partition | Tuned ceiling observed |
|---|---|---|
| Cross-Region | ~300 KB/s | 10-30 MB/s with tuned record batching, cluster configs, and replicator configs |
| Same-Region | 3-10 MB/s | — |
Aggregate throughput in the multiple-GB/s range is reachable same-Region when load spreads evenly over a sufficient partition count, subject to the per-replicator quota below. If customer is unable to reach desired throughput, recommend opening an AWS Support Case to investigate.
Quotas that cap a single replicator
| Dimension | Quota | Adjustable |
|---|---|---|
| Replicators per account | 15 | Yes, via AWS Support |
| Topics per replicator | 750, selected in sorted order | Yes, via AWS Support |
| Ingress throughput per replicator | 1 GB/s | Yes, via AWS Support |
| Record size, cross-Region | 10 MB (message.max.bytes) | Yes, via AWS Support |
| Record size, same-Region | 20 MB (message.max.bytes) | Yes, via AWS Support |
The 1 GB/s ingress cap lands exactly where the published sizing table tops out, so anything past ~1 GB/s has to shard across multiple replicators — bounded in turn by 15 per account. The 750-topic cap is the other reason to shard, and it selects in sorted order, so topics past the limit are skipped silently rather than reported as an error. Track TopicCount to confirm the replicator picked up every topic you expected.
Provision source and target clusters for replication traffic on top of existing production load — the replicator consumes from the source (egress) and produces to the target (ingress). AWS recommends identical capacity on both sides.
Confirm throughput from metrics, not configuration
Replicator metrics live in the AWS/Kafka namespace under the ReplicatorName dimension, in the target cluster's Region, and are available per-topic via ReplicatorName, Topic:
| Metric | Use |
|---|---|
ReplicatorThroughput | Bytes/s actually replicated. A per-topic drop points at connectivity or cluster health — check KafkaClusterPingSuccessCount and AuthError next. |
ReplicatorBytesInPerSec | Bytes/s processed, including loop-filtered records. This is the billed quantity. |
ReplicationLatency | Source-produce to target-write, per partition (Maximum). Rising latency usually means too few partitions. |
MessageLag | How far the replicator trails the source cluster — not source-to-target lag. Watch it reach 0 to confirm a catch-up or migration cutover finished. |
ReplicationFailures | Should be 0. Non-zero points at record size, timestamp, or batch-size violations — check record size against the 10/20 MB caps above. |
ThrottleTime | Per ClusterAlias. Above 0 means brokers are throttling the replicator; 0 alongside healthy latency and throughput means throttling is tuned correctly. |
Under IDENTICAL topic naming, ReplicatorBytesInPerSec exceeds ReplicatorThroughput by the volume of loop-filtered records, and you are billed on the larger number — bidirectional IDENTICAL setups pay data processing and transfer charges on records that get filtered rather than written. Under PREFIXED_WITH_SOURCE_CLUSTER_ALIAS nothing is filtered and the two metrics match, which makes an unexpected gap between them a useful signal that loop filtering is active.
A topic whose ReplicationLatency falls to 0 while the source topic's MessagesInPerSec stays non-zero indicates a topic-level authorization failure, not an idle topic — AuthError does not cover topic-level auth errors. Check the replicator's service execution role against that topic.
Grant kafka-cluster:DeleteTopic alongside standard produce/consume permissions
Include kafka-cluster:DeleteTopic in any IAM policy that will need to remove topics, including the replicator's own internal bookkeeping topics during cleanup. A standard produce/consume/create-topic policy set (Connect, DescribeTopic, CreateTopic, AlterTopic, WriteData, ReadData) does not include it by default, and its absence only surfaces as TopicAuthorizationException at delete time.
See the IAM Replicator permissions reference for the full set of kafka:* control-plane permissions the replicator's own service execution role needs beyond AWSMSKReplicatorExecutionRole.
Clean up internal bookkeeping topics explicitly
Enumerate and delete the replicator's internal bookkeeping topics as an explicit step in any teardown — deleting the replicator does not remove them. Each replication direction creates topics on both clusters resembling:
__amazon_msk_replicator_configs_<name>_<uuid>
__amazon_msk_replicator_offsets_<name>_<uuid>
__amazon_msk_replicator_status_<name>_<uuid>
__amazon_msk_replicator_source_heartbeats_<name>-<suffix>
__amazon_msk_replicator_target_heartbeats_<name>-<suffix>
mskr-offset-syncs.<cluster-id>.internal / .incoming.internal
checkpoints.internal / outgoing.checkpoints.internalSee manage-topics.md for topic deletion.
Enable log delivery at creation time
Configure logDelivery.replicatorLogDelivery.cloudWatchLogs when you create the replicator, not afterward. Without it, describe-replicator's terse StateInfo field is the only diagnostic signal available if something goes wrong. Adding log delivery to an existing replicator triggers a resource replacement (a new replicator, restarting replication from the configured starting position), so enable it up front instead.
aws kafka describe-replicator --replicator-arn <arn> --query 'ReplicatorState,StateInfo'Poll both StateInfo and CloudWatch Logs while a replicator is CREATING
Check describe-replicator's StateInfo field and the configured CloudWatch log group together, since either one may surface the actionable error first depending on the failure mode, and CREATING can take anywhere from a few minutes to 30+ minutes:
An invalid
apacheKafkaClusterIdproduces no CloudWatch log output at all until the replicator gives up —StateInfois the only signal.An auth mechanism mismatch or bad credentials produces continuous CloudWatch log noise throughout
CREATING.
Verify loop-prevention with an end-to-end produce/consume check, not resource state alone
Confirm replication is working correctly — and not looping — with a produce-then-double-read check, repeated per cluster type if you have separate Standard/Express replicator pairs:
Produce one record on the source topic.
Consume from earliest offset on the target topic — expect exactly 1 record.
Re-consume from earliest offset on the source topic — expect exactly 1 record (confirms the reverse replicator did not bounce the record back).
ReplicatorState: RUNNING and a correct list-scram-secrets result are necessary checks but do not by themselves confirm the absence of a duplicate-write loop.
Example: same-account MSK-to-MSK (CDK)
const local: msk.CfnReplicator.KafkaClusterProperty = {
amazonMskCluster: { mskClusterArn: sourceCluster.attrArn },
vpcConfig: {
subnetIds: vpc.privateSubnets.map((s) => s.subnetId),
securityGroupIds: [replicatorSecurityGroup.securityGroupId],
},
};
const remote: msk.CfnReplicator.KafkaClusterProperty = {
amazonMskCluster: { mskClusterArn: targetCluster.attrArn },
vpcConfig: {
subnetIds: vpc.privateSubnets.map((s) => s.subnetId),
securityGroupIds: [replicatorSecurityGroup.securityGroupId],
},
};Example: cross-account MSK-to-MSK (remote referenced as self-managed)
const local: msk.CfnReplicator.KafkaClusterProperty = {
amazonMskCluster: { mskClusterArn: localCluster.attrArn },
vpcConfig: {
subnetIds: vpc.privateSubnets.map((s) => s.subnetId),
securityGroupIds: [replicatorSecurityGroup.securityGroupId],
},
};
const remote: msk.CfnReplicator.KafkaClusterProperty = {
// No vpcConfig here - only valid on the AmazonMskCluster entry.
// Connectivity comes from local's VPC via peering/TGW/PrivateLink to the
// remote account's broker IPs.
apacheKafkaCluster: {
apacheKafkaClusterId: remoteApacheKafkaClusterId, // real cluster ID from kafka-cluster.sh, not a label
bootstrapBrokerString: remoteBootstrapBrokerString,
},
clientAuthentication: {
saslScram: {
mechanism: 'SHA512', // required when the remote is Amazon MSK
secretArn: localCopyOfRemoteSecret.secretArn, // must live in the replicator's own account
},
},
encryptionInTransit: { encryptionType: 'TLS' },
};References
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
- 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/managing-amazon-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 managing-amazon-msk.zip