Is it possible to use the AWS CLI tool to list the Kafka MSK topics and display the configuration of them?
Question posted in Amazon Web Sevices
The official Amazon Web Services documentation can be found here.
The official Amazon Web Services documentation can be found here.
2
Answers
You have to use Kafka native Java API. Please check how to use kafka on its own, before you start using MKS.
As others have mentioned, the AWS MSK service (therefore the APIs exposed by the AWS CLI) is for setting up and managing the Kafka cluster. But the actual interactions with the cluster still happen via Kafka Admin tooling.
MSK provides a quick start guide which takes you through setting up a client EC2 machine, downloading the Kafka binaries, and using the tools in the binaries to create a topic.
https://docs.aws.amazon.com/msk/latest/developerguide/create-client-machine.html
https://docs.aws.amazon.com/msk/latest/developerguide/create-topic.html
I would recommend reviewing that basics guide, and then reviewing a bit more of the Kafka documentation about what other configurations and mutations are available via the Kafka CLI Tools.