> For the complete documentation index, see [llms.txt](https://docs.mechcloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mechcloud.io/cloud-computing/stateless-iac/aws/examples-resources-with-cost/msk/managed-kafka.md).

# Managed Kafka

### Creating a standard broker with minimal parameters

```
resources:
  - type: aws_msk_cluster
    name: test-msk-cluster
    props:
      cluster_name: "my-test-msk-cluster"
      kafka_version: "3.6.0"
      number_of_broker_nodes: 2
      broker_node_group_info:
        client_subnets:
          - "subnet-0123456789abcdef0"  # Replace with your actual subnet ID
          - "subnet-0123456789abcdef1"  # Replace with your actual subnet ID (must be in different AZ)
        instance_type: "t3.small"  # cf documentation wrongly mentions it with 'kafka' prefix
```

#### Example price for above configuration

```
test-msk-cluster (action: create, price: $0.0456/Hrs, quantity: 2, monthly: $67.85)
```

### Creating an express broker with minimal parameters

```
resources:
  - type: aws_msk_cluster
    name: test-msk-express-cluster
    props:
      cluster_name: "my-test-msk-express-cluster"
      kafka_version: "3.6.0"
      number_of_broker_nodes: 2
      broker_node_group_info:
        client_subnets:
          - "subnet-0123456789abcdef0"  # Replace with your actual subnet ID
          - "subnet-0123456789abcdef1"  # Replace with your actual subnet ID (must be in different AZ)
        instance_type: "express.m7g.large"  # Express broker type
      storage_mode: "TIERED"  # Required for Express brokers
```

#### Example price for above configuration

```
test-msk-express-cluster (action: create, price: $0.408/Hrs, quantity: 2, monthly: $607.10)
```
