Open a terminal and paste the following command. (Make sure you have the AWS CLI v2 installed as guided in the Prerequisites section)
Refer Service Linked Roles if you want to learn more about them.
aws iam create-service-linked-role --aws-service-name es.amazonaws.com
Here is the expected output for the previous command.
Click Next.
Choose a key name in the region you’re in. (Could be the key you created earlier). Identify the IP address of your laptop (Google my ip) and put it in the the SSHLocation box in the format <IPAddress>/32
Click Next
Click Next on the next page.
Scroll down, check the checkbox next to I acknowledge that AWS CloudFormation might create IAM resources with custom names in the Capabilities section and click on Create stack.
It could take up to 15 minutes for the stack to run. Once the status of the stack changes to CREATE_COMPLETE, the stack is done creating. Please wait for the stack to complete and then proceed further.
Go to the Amazon MSK console. Click on the MSK cluster that was created by CloudFormation (default MSKCluster-MMStack1)
Click on View client information on the top right side of the page under Cluster summary.
Click on Copy under Bootstrap servers and paste it in a notepad application.
Click on Copy under Zookeeper connect and paste it in a notepad application. Click on Done.