Amazon MSK ExecModule
Overview
AwsMskModule reads cluster inventory and status from the Amazon Managed Streaming for Apache Kafka (Amazon MSK) control plane. Use it to reconcile a regional cluster inventory, review the Kafka versions that AWS reports for provisioned clusters, or attach a current cluster record to an incident handoff.
Both operations cover provisioned and serverless clusters. A cluster's reported state helps a workflow decide whether to investigate or check again. Application connectivity and message flow require separate checks from the intended Kafka client network.
Usage
- Create an Amazon MSK connection in the Integration Account Console. Verify the connection and confirm that its status is
READY. - In Workflow Studio, add Amazon MSK to a task and select the connection under General > Connection.
- Choose the operation and region. Use a name prefix or cluster type to narrow an inventory page, or supply the full cluster ARN for a lookup.
- Check
statusbefore processing the result. For inventory, passnextTokento the next invocation whilehasMoreis true.
Inputs
| Input | Type | Required | Default | Purpose |
|---|---|---|---|---|
operation | string | No | list_clusters | list_clusters or describe_cluster. |
region | string | Yes | — | Commercial or AWS GovCloud region containing the MSK resources. |
clusterNameFilter | string | No | — | For list_clusters, return clusters whose names begin with this case-sensitive prefix. Use 1–64 letters, digits, or hyphens. |
clusterTypeFilter | string | No | — | For list_clusters, restrict results to PROVISIONED or SERVERLESS. Omit it to include both types. |
pageSize | integer | No | 25 | Maximum clusters requested per list page, from 1 to 100. A lookup accepts the editor’s default of 25. |
nextToken | string | No | — | Opaque continuation token from the preceding list page, up to 4,096 characters without whitespace or control characters. |
clusterArn | string | For exact lookups | — | Full MSK cluster ARN in the selected region. |
Outputs
| Output | Meaning |
|---|---|
status | success or error. |
operation / region | Recognized operation and AWS region when available. |
clusters | Normalized clusters from one inventory page. |
cluster | Normalized result for the exact cluster ARN. |
hasMore / nextToken | Whether AWS returned another inventory page and the token to request it. |
requestId | AWS request reference when available. |
error | Redacted error code, message, retryability, and HTTP status when available. |
Each cluster result includes clusterArn and clusterName and can also include clusterType, state, and creationTime. When AWS supplies them for a provisioned cluster, results can also include kafkaVersion and brokerNodeCount. Inventory workflows should allow for these fields to be absent on serverless clusters.
IntegrationAccount Requirements
Use a verified Amazon MSK connection with account name AWS and status READY. Store the AWS key pair in the protected AWS Access Key ID and AWS Secret Access Key fields. The module uses AWS Signature Version 4 to sign regional control-plane requests. Keep the key pair in the connection and out of workflow inputs. This connection uses an access key pair without an AWS session token.
Allow kafka:ListClustersV2 for inventory. AWS requires the IAM policy's resource field to be * for this action. Allow kafka:DescribeClusterV2 on the specific cluster ARNs that the workflow needs to look up. The name and type filters narrow the results of an inventory request. Control access through the selected account and its IAM policy. Amazon MSK IAM actions and resource types
Configuration
Select a commercial or AWS GovCloud region where Amazon MSK is available. The module derives the standard regional HTTPS service endpoint from that region and signs the request for it. Custom endpoints and headers are unsupported. For an inventory across multiple accounts or regions, run a separate invocation for each connection and region.
Operations
list_clustersreads a single page of provisioned or serverless cluster summaries. AWS ListClustersV2 APIdescribe_clusterreturns selected cluster metadata for the supplied cluster ARN. Leave the list filters and continuation token blank. AWS DescribeClusterV2 API
Errors and Failure Modes
- For
VALIDATION_ERROR, check the operation, region, page size, and the ARN or filters that apply to that operation. - For
INTEGRATION_ACCOUNT_ERROR, verify that the AWS connection isREADY, verified, and has both protected key fields populated. - For
CLUSTER_NOT_FOUND, check the exact ARN, account, and region. ForAWS_MSK_HTTP_403, check the IAM permission for the corresponding operation. Use the request ID when available. - For
DESTINATION_DENIED, check that the task uses the standard regional MSK endpoint. ForINVALID_PROVIDER_RESPONSE, check the cluster ARN or pagination inputs and investigate the provider response if the failure persists. - For
NETWORK_ERRORor a retryable AWS error such asAWS_MSK_HTTP_429, keep concurrency low and use bounded backoff. The module attempts up to two retries for transient failures.
Example
An on-call workflow can look up the MSK cluster that carries checkout events before assigning an incident.
{
"operation": "describe_cluster",
"region": "us-west-2",
"clusterArn": "arn:aws:kafka:us-west-2:111122223333:cluster/checkout-events/12345678-1234-1234-1234-1234567890ab-1"
}
The successful result includes a cluster record like this one.
{
"status": "success",
"operation": "describe_cluster",
"region": "us-west-2",
"cluster": {
"clusterArn": "arn:aws:kafka:us-west-2:111122223333:cluster/checkout-events/12345678-1234-1234-1234-1234567890ab-1",
"clusterName": "checkout-events",
"clusterType": "PROVISIONED",
"state": "ACTIVE",
"creationTime": "2026-02-10T14:30:00Z",
"kafkaVersion": "3.7.x",
"brokerNodeCount": 3
}
}
The incident workflow can record the ARN and AWS-reported state for the owner. It can then pair that record with existing consumer lag and broker connectivity checks before choosing an escalation path.
Notes
- Inventory returns one page per call. Keep the connection, region, and filters fixed while following its continuation token. Allow for fewer clusters than the requested page size.
- Keep regional fan-out bounded to reduce AWS throttling. Amazon MSK endpoints and quotas
- Both operations are read-only and safe to repeat. Use the cluster ARN as the inventory key when reconciling results.
- The scope is cluster metadata. Topic management, producing or consuming records, and cluster configuration changes require other tools.