Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gregtaylor99/20426ef8ca53dcd51641d48b6ad5bae7 to your computer and use it in GitHub Desktop.
Save gregtaylor99/20426ef8ca53dcd51641d48b6ad5bae7 to your computer and use it in GitHub Desktop.
list all registered ELB name from a given EC2 instanceId
#!/bin/bash
instanceId='i-XXXXXXXXXXXXX'
aws elb describe-load-balancers --query \
"LoadBalancerDescriptions[?Instances[?InstanceId=='${instanceId}']].LoadBalancerName"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment