Find Load Balancer Name using Instance ID

Hetul Sheth
Mar 14, 2023

In certain situations, you may possess only an instance ID and need to ascertain whether it is a constituent of a Load Balancer or Target Group. Unfortunately, there exists no built-in AWS solution for checking this information directly from the instance. However, the following Bash script can aid in promptly obtaining this information, thus saving valuable time.

You can run this script by saving it to a file, making it executable with the chmod +x command, and then running it with the ./script.sh or bash script.shcommand (assuming that the script is named script.sh)

Hope you find this helpful

--

--

Hetul Sheth

AWS Certified Solutions Architect, Developer and SysOps Admin Associate | Azure Certified