Before we expand the cluster, and in preparation for a later exercise (reassigning partitions) we are going to create a topic on the pre-resized cluster, so we can then reassign partitions after.
Create a topic
You will be using the kafka native tools for this, not the AWS cli.
We are going to create a topic with 10 partitions, 3 replicas.
/home/ec2-user/kafka/bin/kafka-topics.sh --create --zookeeper $MYZK --topic test10 --partitions 10 --replication-factor 3
This will create a topic that we will use to highlight rebalancing partitions after cluster expansion
Now you can move on to expanding your cluster