Profile Applicability
- Level 2
Description
Amazon MSK supports multiple versions of Apache Kafka, and using the latest version ensures that your clusters benefit from the latest features, performance improvements, and security patches. Running outdated versions may expose clusters to vulnerabilities and limit access to new capabilities.
Rationale
Enhanced Security: The latest versions include critical security updates to protect against vulnerabilities.
Improved Performance: Benefit from optimizations and new features introduced in the latest versions.
Compliance: Aligns with best practices for maintaining secure and up-to-date infrastructure.
Impact
Pros:
Ensures clusters are secure and up-to-date.
Provides access to the latest features and performance improvements.
Reduces the risk of vulnerabilities and exploits.
Cons:
Upgrading may require downtime or careful planning to avoid service disruptions.
Compatibility testing may be needed for applications using the cluster.
Default Value
By default, MSK clusters do not automatically upgrade to the latest version. Upgrades must be initiated manually.
Pre-Requisite
IAM Permissions:
kafka:ListClusters
kafka:DescribeCluster
kafka:UpdateClusterKafkaVersion
AWS CLI installed and configured.
Remediation
Test Plan:
Using AWS Console:
Sign in to the AWS Management Console.
Navigate to the MSK Dashboard.
Select Clusters from the left-hand menu.
Check the Kafka version for each cluster and compare it with the latest supported version.
Using AWS CLI:
List All MSK Clusters:
aws kafka list-clusters --query "ClusterInfoList[*].{ClusterName:ClusterName,CurrentVersion:CurrentBrokerSoftwareInfo.KafkaVersion}"
Compare the listed versions with the latest supported version.
Implementation Steps:
Using AWS Console:
Sign in to the AWS Management Console.
Navigate to the MSK Dashboard.
Select the cluster to upgrade.
Click Actions and choose Update Kafka Version.
Follow the prompts to upgrade to the latest version.
Using AWS CLI:
Upgrade the Kafka Version:
aws kafka update-cluster-kafka-version --cluster-arn <cluster-arn> --current-version <current-version> --target-kafka-version <latest-version>
Verify the Upgrade:
Backout Plan
Using AWS Management Console:
Sign in to the AWS Management Console.
Navigate to Amazon MSK > Clusters.
Select the specific cluster that you updated to the latest version.
Under the Cluster Details page, click Edit to revert the version.
Revert to the previous cluster version (if supported) in the Kafka Version field.
Save the changes to apply the backout.
Using AWS CLI:
List the cluster details to identify the current version and backup the required cluster info:
aws kafka list-clusters --query "ClusterInfoList[*].[ClusterName,CurrentVersion]" --output table
Initiate the backout to the previous Kafka version using the update-cluster-configuration command:
aws kafka update-cluster-configuration \--cluster-arn <cluster-arn> \ --current-version <previous-cluster-version-arn> \ --configuration-info Arn=<previous-configuration-arn>,Revision=<revision-id>
References
CIS Controls
aws kafka describe-cluster --cluster-arn <cluster-arn> --query "ClusterInfo.CurrentBrokerSoftwareInfo.KafkaVersion"