How to approach configuration as code for Kafka topics in AWS MSK?

626 Views Asked by At

Does AWS MSK support creating topics via configuration, similar what Strimzi does?

1

There are 1 best solutions below

4
On BEST ANSWER

Yes, you can first use CloudFormation or Terraform to create a cluster, or just shell scripts with awscli. Maybe also Pulumi or Crossplane (assuming you have k8s), but have not checked.

Then you can use external modules that work with any Kafka cluster to create topics. Such as this terraform provider, (however, you may need to configure certain auth settings in MSK as I don't think this provider supports IAM configs, for example). Or, if you also have EKS / k8s, you can create topics with Strimzi KafkaTopic operator to still create topics in MSK.