You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/integrations/data-ingestion/kafka/msk/index.md
+85-4Lines changed: 85 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,8 @@ import ConnectionDetails from '@site/docs/_snippets/_gather_your_details_http.md
24
24
</iframe>
25
25
</div>
26
26
27
+
> Note: The policy shown in the video is permissive and intended for quick start only. See least‑privilege IAM guidance below.
28
+
27
29
## Prerequisites {#prerequisites}
28
30
We assume:
29
31
* you are familiar with [ClickHouse Connector Sink](../kafka-clickhouse-connect-sink.md),Amazon MSK and MSK Connectors. We recommend the Amazon MSK [Getting Started guide](https://docs.aws.amazon.com/msk/latest/developerguide/getting-started.html) and [MSK Connect guide](https://docs.aws.amazon.com/msk/latest/developerguide/msk-connect.html).
@@ -61,6 +63,76 @@ username=default
61
63
schemas.enable=false
62
64
```
63
65
66
+
## Recommended IAM permissions (least privilege) {#iam-least-privilege}
67
+
68
+
Use the smallest set of permissions required for your setup. Start with the baseline below and add optional services only if you use them.
- Use the Glue block only if you use AWS Glue Schema Registry.
131
+
- Use the Secrets Manager block only if you fetch credentials/truststores from Secrets Manager. Scope the ARN.
132
+
- Use the S3 block only if you load artifacts (e.g., truststore) from S3. Scope to bucket/prefix.
133
+
134
+
See also: [Kafka best practices – IAM](../../clickpipes/kafka/04_best_practices.md#iam).
135
+
64
136
## Performance tuning {#performance-tuning}
65
137
One way of increasing performance is to adjust the batch size and the number of records that are fetched from Kafka by adding the following to the **worker** configuration:
66
138
```yml
@@ -85,7 +157,16 @@ In order for MSK Connect to connect to ClickHouse, we recommend your MSK cluster
85
157
1.**Create a Private Subnet:** Create a new subnet within your VPC, designating it as a private subnet. This subnet should not have direct access to the internet.
86
158
1.**Create a NAT Gateway:** Create a NAT gateway in a public subnet of your VPC. The NAT gateway enables instances in your private subnet to connect to the internet or other AWS services, but prevents the internet from initiating a connection with those instances.
87
159
1.**Update the Route Table:** Add a route that directs internet-bound traffic to the NAT gateway
88
-
1.**Ensure Security Group(s) and Network ACLs Configuration:** Configure your [security groups](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-security-groups.html) and [network ACLs (Access Control Lists)](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html) to allow relevant traffic to and from your ClickHouse instance.
89
-
1. For ClickHouse Cloud, configure your security group to allow inbound traffic on ports 9440 and 8443.
90
-
1. For self-hosted ClickHouse, configure your security group to allow inbound traffic on the port in your config file (default is 8123).
91
-
1.**Attach Security Group(s) to MSK:** Ensure that these new security groups routed to the NAT gateways are attached to your MSK cluster
160
+
1.**Ensure Security Group(s) and Network ACLs Configuration:** Configure your [security groups](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-security-groups.html) and [network ACLs (Access Control Lists)](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html) to allow relevant traffic.
161
+
1. From MSK Connect worker ENIs to MSK brokers on TLS port (commonly 9094).
162
+
1. From MSK Connect worker ENIs to ClickHouse endpoint: 9440 (native TLS) or 8443 (HTTPS).
163
+
1. Allow inbound on broker SG from the MSK Connect worker SG.
164
+
1. For self-hosted ClickHouse, open the port configured in your server (default 8123 for HTTP).
165
+
1.**Attach Security Group(s) to MSK:** Ensure that these security groups are attached to your MSK cluster and MSK Connect workers.
166
+
1.**Connectivity to ClickHouse Cloud:**
167
+
1. Public endpoint + IP allowlist: requires NAT egress from private subnets.
168
+
1. Private connectivity where available (e.g., VPC peering/PrivateLink/VPN). Ensure VPC DNS hostnames/resolution are enabled and DNS can resolve the private endpoint.
169
+
1.**Validate connectivity (quick checklist):**
170
+
1. From the connector environment, resolve MSK bootstrap DNS and connect via TLS to broker port.
171
+
1. Establish TLS connection to ClickHouse on port 9440 (or 8443 for HTTPS).
172
+
1. If using AWS services (Glue/Secrets Manager), allow egress to those endpoints.
0 commit comments