ConnectRead
Source:
src/AWS/Kafka/Connect.ts
Read-only (consumer) runtime access to an MSK ServerlessCluster’s
data plane.
Grants the MSK IAM-auth actions a Kafka consumer needs
(kafka-cluster:Connect on the cluster, kafka-cluster:ReadData +
kafka-cluster:DescribeTopic on the cluster’s topics, and
kafka-cluster:DescribeGroup + kafka-cluster:AlterGroup on its consumer
groups), publishes the SASL/IAM bootstrap endpoint as environment
variables on the host Function, and resolves a typed
ClusterConnectionInfo at runtime.
The Kafka data plane is VPC-only — the host Function must be attached to
the cluster’s VPC and allowed ingress on port 9098 by the cluster’s
security groups. Provide the implementation with
Effect.provide(AWS.Kafka.ConnectReadHttp).
Connecting to a Cluster
Section titled “Connecting to a Cluster”const connect = yield* Kafka.ConnectRead(cluster);// inside a handler:const { brokers, authentication } = yield* connect;