Enable tiered storage on an existing Amazon MSK cluster using Amazon CLI - Amazon Managed Streaming for Apache Kafka
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Enable tiered storage on an existing Amazon MSK cluster using Amazon CLI

Note

You can enable tiered storage only if your cluster's log.cleanup.policy is set to delete, as compacted topics are not supported on tiered storage. Later, you can configure an individual topic's log.cleanup.policy to compact if tiered storage is not enabled on that particular topic. See Topic-level configuration for more details on supported configuration attributes.

  1. Update the Kafka version – Cluster versions aren't simple integers. To find the current version of the cluster, use the DescribeCluster operation or the describe-cluster Amazon CLI command. An example version is KTVPDKIKX0DER.

    aws kafka update-cluster-kafka-version --cluster-arn ClusterArn --current-version Current-Cluster-Version --target-kafka-version 3.6.0
  2. Edit cluster storage mode. The following code example shows editing the cluster storage mode to TIERED using the update-storage API.

    aws kafka update-storage --current-version Current-Cluster-Version --cluster-arn Cluster-arn --storage-mode TIERED