All Products
Search
Document Center

ApsaraMQ for Kafka:Connect an ECS instance to an ApsaraMQ for Kafka instance in a different zone

Last Updated:Mar 10, 2026

Yes. An Elastic Compute Service (ECS) instance and an ApsaraMQ for Kafka instance in different zones can communicate over the private network if both instances are in the same virtual private cloud (VPC). Cross-zone connectivity within a VPC works by default and requires no additional network configuration.

Prerequisites

Before you connect, verify the following:

  • Same VPC: The ECS instance and the ApsaraMQ for Kafka instance are deployed in the same VPC. Instances in different zones within the same VPC communicate over the private network by default.

  • Whitelist: The ECS instance is added to the whitelist of the ApsaraMQ for Kafka instance. For more information, see Configure a whitelist.

What if the instances are in different VPCs?

If the ECS instance and the ApsaraMQ for Kafka instance are not in the same VPC, create a new instance or redeploy an existing instance so that both instances reside in the same VPC.

Important

Back up your data before you create or redeploy an instance to prevent data loss.