Connection to AWS MSK is like connecting to any Kafka cluster.
It depends on how you had setup your MSK ? (VPC - Subnet)
Check whether you can access from your local or need to be on VPN.
Also see how your brokers endpoints are configured and exposed -
Ex:
- Plaintext (broker:9092)
- TLS (broker:9094)
If its plaintext, its as simple as setting bootstrap.servers.
Otherwise, you need to add below mentioned properties to access your MSK cluster.
security.protocol: SSL
ssl.truststore.location: jks
ssl.truststore.password: pwd
Please let me know if you still have questions.