2

My topology is illustrated by the following diagram (originally published in this blog):

enter image description here

In this case, the broker is RabbitMQ. Also, the NLB nodes reside in public subnets within the same AZs as the private subnets (3 pairs in total).

I am provisioning the RabbitMQ broker and the NLB using CloudFormation.

In order to setup the targets for the NLB listeners, I need to acquire the IP Addresses of each of the Rabbit MQ nodes. However, I cannot figure how to do so programmatically.

It seems CloudFormation does not expose the node addresses as an output. I was also unable to figure out how to find them using the CLI commands for MQ. They are also not shown in the MQ console.

I am able to manually find them by examining the VPC endpoint that gets created or by searching through the EC2 Network Interfaces. In my case, this is somewhat straightforward as the clustered MQ brokers are assigned to a dedicated security group.

So, I assume I could utilize the CLI to search through the Network Interfaces, filtering by the SG. But, is this really the best/intended method? I want to make sure I am not overlooking some other method via CloudFormation or the MQ CLI to find these addresses...

Thanks for your time and help,

Rob Davis
  • 1,299
  • 1
  • 10
  • 22

0 Answers0