There will be times when you need your Cluster ARN for running commands using the Command Line Interface (CLI). This will show you where to find this information.
Open the Amazon MSK console at https://console.aws.amazon.com/msk/
Click on the name of the cluster you want the details for
You can click on Copy to copy it to your clipboard for use.
You can use the AWS CLI to get the same details as the Console.
Ensure that you have setup the AWS CLI
Run the following command to get the ARNs for all the clusters in your default region (this should include the one built for the lab, plus any others you may have built)
$ aws kafka list-clusters --output text | grep arn | grep CLUSTERINFOLIST
CLUSTERINFOLIST arn:aws:kafka:us-east-1:xyz:cluster/MSKCluster/0546f493-019f-475a-9903-272f0371ce19-6 MSKCluster 2020-01-30T03:58:50.994Z K138L1TOL8PIJT PER_TOPIC_PER_BROKER 6ACTIVE z-3.mskcluster.xyz.c6.kafka.us-east-1.amazonaws.com:2181,z-1.mskcluster.xyz.c6.kafka.us-east-1.amazonaws.com:2181,z-2.mskcluster.xyz.c6.kafka.us-east-1.amazonaws.com:2181
Your clusterARN is the string arn:aws:kafka:us-east-1:xyz:cluster/MSKCluster/0546f493-019f-475a-9903-272f0371ce19-6
(but will match your region, accountID, and cluster GUID)
If you’re working on the command line, and to save yourself some work, put your ClusterARN into an envrionment variable:
$ export CLUSTER_ARN="arn:aws:kafka:us-east-1:xyz:cluster/MSKCluster/0546f493-019f-475a-9903-272f0371ce19-6"
Then you can refer to the variable in later commands:
$ aws kafka get-bootstrap-brokers --cluster-arn $CLUSTER_ARN