Kafka instances can be accessed within a VPC, across VPCs, through DNAT, or over public networks. Before accessing a Kafka instance, configure a security group.
Assume that the security groups of the client and Kafka instance are sg-53d4 and Default_All, respectively. You can specify a security group or IP address as the destination in the following rule. A security group is used as an example.
To ensure that your client can access the Kafka instance, add the following rule to the security group configured for the client:
Direction |
Protocol & Port |
Destination |
---|---|---|
Outbound |
All |
Default_All |
To ensure that your client can access the Kafka instance, add the following rule to the security group configured for the instance.
Direction |
Protocol & Port |
Source |
---|---|---|
Inbound |
All |
sg-53d4 |
Configure security group rules according to Table 5.
Direction |
Protocol |
Port |
Source |
Description |
---|---|---|---|---|
Inbound |
TCP |
9011 |
198.19.128.0/17 |
Accessing a Kafka instance using VPC Endpoint (VPCEP) |
Inbound |
TCP |
9011 |
0.0.0.0/0 |
Accessing a Kafka instance using DNAT |
Configure security group rules according to Table 5.