Getting the Bootstrap Brokers for an Amazon MSK Cluster - Amazon Managed Streaming for Apache Kafka

Getting the Bootstrap Brokers for an Amazon MSK Cluster

Getting the Bootstrap Brokers Using the AWS Management Console

  1. Open the Amazon MSK console at https://console.aws.amazon.com/msk/.

  2. The table shows all the clusters for the current region under this account. Choose the name of a cluster to view its description.

  3. On the Cluster summary page, choose View client information. This shows you the bootstrap servers, as well as the Apache ZooKeeper connection string.

Getting the Bootstrap Brokers Using the AWS CLI

Run the following command, replacing ClusterArn with the Amazon Resource Name (ARN) that you obtained when you created your cluster. If you don't have the ARN for your cluster, you can find it by listing all clusters. For more information, see Listing Amazon MSK Clusters.

aws kafka get-bootstrap-brokers --cluster-arn ClusterArn

The output of this command looks like the following JSON example.

{ "BootstrapBrokerStringTls": "b-3.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9094,b-1.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9094,b-2.exampleClusterName.abcde.c2.kafka.us-east-1.amazonaws.com:9094" }

Getting the Bootstrap Brokers Using the API

To get the bootstrap brokers using the API, see GetBootstrapBrokers.